Skip to content

Commit

Permalink
fix: mismatched exemption/policy for DropAllCapabilities (#384)
Browse files Browse the repository at this point in the history
## Description

Fixes a mismatched check.

## 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

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed
  • Loading branch information
mjnagel authored May 3, 2024
1 parent b6a6a7f commit 7f0d8c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pepr/policies/security.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ When(a.Pod)
.IsCreatedOrUpdated()
.Mutate(request => {
markExemption(Policy.DropAllCapabilities)(request);
if (request.HasAnnotation(`uds-core.pepr.dev/uds-core-policies.${Policy.RequireNonRootUser}`)) {
if (
request.HasAnnotation(`uds-core.pepr.dev/uds-core-policies.${Policy.DropAllCapabilities}`)
) {
return;
}

Expand Down

0 comments on commit 7f0d8c7

Please sign in to comment.