-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: default ctx.allowPrivilegeEscalation
to false
if undefined
#698
Merged
Conversation
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
mjnagel
reviewed
Aug 26, 2024
Deleted outdated comments around validation. |
mjnagel
reviewed
Aug 28, 2024
Talked offline with @mjnagel and ultimately decided on the following:
|
mjnagel
reviewed
Sep 3, 2024
MxNxPx
reviewed
Sep 3, 2024
MxNxPx
reviewed
Sep 3, 2024
MxNxPx
reviewed
Sep 3, 2024
mjnagel
approved these changes
Sep 3, 2024
mjnagel
pushed a commit
that referenced
this pull request
Sep 11, 2024
🤖 I have created a release *beep* *boop* --- ## [0.27.0](v0.26.1...v0.27.0) (2024-09-11) ### Features * add support for Keycloak attribute `saml.assertion.signature` ([#723](#723)) ([0e1a3da](0e1a3da)) * investigate and restrict network policies ([#719](#719)) ([b6ebc49](b6ebc49)) * protocol mappers ([#621](#621)) ([d71cb44](d71cb44)) ### Bug Fixes * correct keycloak chart schema for additionalGateways ([#745](#745)) ([1fd8ef3](1fd8ef3)) * default `ctx.allowPrivilegeEscalation` to `false` if `undefined` ([#698](#698)) ([7ecd130](7ecd130)) * pre-commit linting ([#703](#703)) ([c3a2f62](c3a2f62)) * switch secret `data` to `stringData` ([#710](#710)) ([9323d4e](9323d4e)) * update ci workflows for docs shim ([#700](#700)) ([5d89254](5d89254)) ### Miscellaneous * adding uds core prerequisites documentation ([#636](#636)) ([6225766](6225766)) * **deps:** update dependency weaveworks/eksctl to v0.190.0 ([#721](#721)) ([16d208a](16d208a)) * **deps:** update githubactions ([#642](#642)) ([0705ba6](0705ba6)) * **deps:** update grafana curl image to v8.10.0 ([#751](#751)) ([0cdb020](0cdb020)) * **deps:** update grafana sidecar image to v1.27.6 ([#732](#732)) ([ad4808b](ad4808b)) * **deps:** update grafana to 11.2.0 ([#670](#670)) ([84e099a](84e099a)) * **deps:** update istio to v1.23.0 ([#672](#672)) ([3266a3a](3266a3a)) * **deps:** update keycloak chart version to v25 ([#470](#470)) ([3e805e7](3e805e7)) * **deps:** update keycloak to 25.0.5 (#742) ([45c540a](45c540a)) * **deps:** update loki memcached images to v1.6.31 ([#752](#752)) ([f94daf1](f94daf1)) * **deps:** update metrics-server to v0.7.2 ([#708](#708)) ([53f1bfd](53f1bfd)) * **deps:** update prometheus-stack ([#437](#437)) ([526aab1](526aab1)) * **deps:** update prometheus-stack chart to v62.6.0 ([#740](#740)) ([424570d](424570d)) * **deps:** update promtail helm chart to v6.16.5 ([#706](#706)) ([4689d54](4689d54)) * **deps:** update uds cli to v0.14.2 ([#697](#697)) ([f92bf53](f92bf53)) * **deps:** update uds to v0.15.0 ([#733](#733)) ([57e0e64](57e0e64)) * **deps:** update velero ([#695](#695)) ([c188393](c188393)) * **deps:** update velero chart to 7.2.1, kubectl image for unicorn flavor ([#725](#725)) ([a98bac4](a98bac4)) * **deps:** update velero helm chart to v7.2.0 ([#720](#720)) ([6309882](6309882)) * **deps:** update zarf to v0.39.0 ([#731](#731)) ([7268680](7268680)) * update configure policy exemptions doc link ([#739](#739)) ([6ad1256](6ad1256)) * update loki to 3.1.1 ([#449](#449)) ([e61da27](e61da27)) * update renovate config/values to match all neuvector images ([#755](#755)) ([72a97ba](72a97ba)) * update resources for prometheus, document resource overrides ([#713](#713)) ([e80c1a4](e80c1a4)) * update to keycloak 25 ([#707](#707)) ([0551aa5](0551aa5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Description
The default behavior when admitting pod containers that do not have
securityContext.allowPrivilegeEscalation
explicitly defined is to admit the request. As noted in #527, if not included,allowPrivilegeEscalation
defaults totrue
.This PR updates the
DisallowPrivileged
policy to match any containers that do not have asecurityContext
and/orallowPrivilegeEscalation
defined and mutates to explicitly set tofalse
.Configuring the policy to deny resources that do not have
allowPrivilegeEscalation
explicitly defined could break existing deployments. Adding a mutation is a safe bet, assuming existing workloads are not already taking advantage of privilege escalation.Read more about the default behavior:
https://medium.com/pareture/how-allowprivilegeescalation-works-in-kubernetes-ce696494f87b
Related Issue
Fixes #527
Type of change
Checklist before merging