Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…#698) ## 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 to `true`. This PR updates the `DisallowPrivileged` policy to match any containers that do not have a `securityContext` and/or `allowPrivilegeEscalation` defined and mutates to explicitly set to `false`. 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 - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Other (security config, docs update, etc) ## Checklist before merging - [ ] Test, docs, adr added or updated as needed - [ ] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed --------- Co-authored-by: Micah Nagel <[email protected]> Co-authored-by: Palassis <[email protected]>
- Loading branch information