Repository navigation
test(C-0055): cover Pod AppArmor profile without annotations - #207
Conversation
Signed-off-by: Gaurav Chaudhary <chaudharygaurav2004@gmail.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
matthyx
left a comment
There was a problem hiding this comment.
Review of head 195d14f (base main @ f29cc53)
- Need: Implements #172: a direct CEL evaluation of C-0055 with a Pod that sets only
spec.securityContext.appArmorProfile(no annotation), so the Pod-field branch is tested without API-server annotation synthesis. Related merged PRs: #159, #182, #143, #80 (none supersede this; no duplicates found). - Soundness: Test loads the real
controls/C-0055/policy.yaml, evaluates variables and validations; RuntimeDefault allowed, missing/Unconfined denied. Failing on any non-boolean result is good. CI job is small and sensible (-count=1justified since the manifest is outside the module). - Validation: I ran
go test -count=1 ./...intools/celcliat the PR head: pass. CI:test-policy-expressionsgreen, DCO/CodeRabbit/GitGuardian/FOSSA green.test-all-policiesis red (C-0050/C-0055 integration cases), but the same failures appear on the PR's base commitf29cc53on main (run 46161363337), and main later went green; the PR doesn't touch policies or that job. Treated as unrelated. I did not re-run the kind/minikube suite and did not verify the author's mutation check myself. - Policy: Author has 3 open PRs (#205–207), at the limit, not excessive. Before/After proof: test-only PR; PR body documents the mutation (test fails with the Pod clause disabled) and passing results — acceptable.
- Nonblocking: The branch is behind main; a rebase would refresh the integration job.
Verdict: approve. No blockers.
Fixes #172.
Summary
RuntimeDefaultand is denied when the profile is absent orUnconfined.Verification
go test -count=1 -v ./...andgo vet ./...passed with the module's Go 1.23.4 toolchain.git diff --checkpassed.Summary by CodeRabbit