-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement allowlist framework for dependencies (#1443)
* implement allowlist framework for dependencies Signed-off-by: Paul S. Schweigert <[email protected]> Allow operators to specify an allowlist of dependencies and allowed versions. The allowlist is stored in a config file. A sample allowlist might look like: allowlist = { "wheel": ["0.44.0", "0.43.2"] } which would imply that the wheel package is allowed, but only versions 0.43.2 and 0.44.0 . For this PR, the allowlist is empty, which means all dependencies are allowed, and it is stored locally. In a future PR, this should move into a Kubernetes configmap so that it can be updated without having to rebuild the container. Each dependency can optionally specify a list of allowed versions. If the list is empty, then all versions of the dependency are allowed. An example: allowlist = { "wheel": [] } This could also be adapted to store a minimum allowed version instead of listing all allowed versions, depending on requirements. * option to allowlist all versions of dependency Signed-off-by: Paul S. Schweigert <[email protected]> * lint Signed-off-by: Paul S. Schweigert <[email protected]> * specify encoding Signed-off-by: Paul S. Schweigert <[email protected]> * use envvar for allowlist config Signed-off-by: Paul S. Schweigert <[email protected]> * lint Signed-off-by: Paul S. Schweigert <[email protected]> * add tests for gateway allowlist functionality Signed-off-by: Paul S. Schweigert <[email protected]> * lint Signed-off-by: Paul S. Schweigert <[email protected]> * review comments Signed-off-by: Paul S. Schweigert <[email protected]> * lint Signed-off-by: Paul S. Schweigert <[email protected]> * catch and log errors opening/decoding allowlist Signed-off-by: Paul S. Schweigert <[email protected]> * lint Signed-off-by: Paul S. Schweigert <[email protected]> * lint again Signed-off-by: Paul S. Schweigert <[email protected]> * lint 3 Signed-off-by: Paul S. Schweigert <[email protected]> --------- Signed-off-by: Paul S. Schweigert <[email protected]>
- Loading branch information
Showing
6 changed files
with
153 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"wheel": ["1.0.0"], | ||
"pendulum": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters