feat(gatekeeper-config): security policies#1707
Draft
mikolajkucinski wants to merge 7 commits into
Draft
Conversation
Add the gatekeeper-config PluginDefinition skeleton: - chart structure, - shared Rego libraries in _helpers.tpl - plugindefinition with per-policy options pattern - README - CI workflow entry. - high-cpu-requests, unmanaged-pods policies as a proof of the pattern On-behalf-of: @SAP <mikolaj.kucinski@sap.com> Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
- Expose policies.highCpuRequests.maxCpu as a configurable parameter - Guard canonify_cpu string-parsing branches with is_string(orig) On-behalf-of: @SAP <mikolaj.kucinski@sap.com> Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
- cover add_support_labels and traversal libs plus the high-cpu-requests and unmanaged-pods policies - install gator and run the suite on every PR touching gatekeeper-config/** via new workflow On-behalf-of: @SAP <mikolaj.kucinski@sap.com> Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com> Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
- add forbidden-clusterwide-objects, images-from-approved-registries, pci-forbidden-images, pod-required-labels, pod-security-v2 - bump chart and PluginDefinition to 0.2.0 On-behalf-of: @SAP <mikolaj.kucinski@sap.com> Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
On-behalf-of: @SAP <mikolaj.kucinski@sap.com> Signed-off-by: Mikolaj Kucinski <osidu12@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Details
Add security policies as the next batch of the
gatekeeper-configmigration.Differences vs upstream:
forbidden-clusterwide-objectscluster_type.allowedWebhooksis a Constraint parameter.images-from-approved-registriesimages-from-non-keppel: denylist hardcoded to a single registry prefix.allowedRegistriesallowlist viastartswith(image, prefix).pci-forbidden-imagesiro.spec.containers[_]only matched Pods.patternsis a Constraint parameter; iterates viatraversal.find_container_specs(handles all pod owners).pod-required-labelspod-labels: hardcoded label key whose value is validated against a fixed whitelist.requiredLabelsis a list of label keys whose presence is enforced.pod-security-v2allowlistis a Constraint parameter. Dropped 3 orphan top-level Rego rules (dead code).Breaking Changes
None.
Issues Fixed
Other Relevant Information
None.