Gusto / it-cpe-opensource

Tools used by the CPE team at Gusto to manage our endpoints and software deployment systems.
Other
59 stars 29 forks source link

Improve allow/deny list #53

Closed w0de closed 2 years ago

w0de commented 3 years ago

This PR improves the allow and deny lists by turning them into dicts of this structure:

{
  "name": "version"
}

Where version may be null or a regex version. Additionally, the allowlist has been changed - no longer does the allowlist take precedence, instead the allowlist should be used to pin particular versions of a package. For instance, setting

"allowlist": {
     "Zoom": "9.*"
}

pins Zoom to 9.x versions - only they will be promoted. To blanket deny promotion to a pkg, the denylist can be used with a null value (or "all") for version.

Also in this PR I've replaced deprecated methods called on plistlib and logger.