Repository navigation
test(deploy): check package pods against the cluster's pod-security rule - #630
Conversation
The platform's Kyverno validate-pod-security policy refused v3.9.0's migration Job at dry-run: it requires runAsNonRoot on every container, and the Job and the retention CronJob set it only at pod level. Nothing from v3.9.0 was applied; production still serves v3.8.0. Both containers now set runAsNonRoot themselves. The package checker requires it, and a new test applies the policy's container and seccomp rules to every pod in the package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Checked at No findings. Both The new test mirrors the container and seccomp rules for every package Job and CronJob pod, including init containers, and the two mutation controls prove the guard bites. Two small, non-blocking gaps compared with the policy: it doesn't check |
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
…ainer-nonroot # Conflicts: # scripts/check-tenant-package.mjs
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |

Why
#629 fixed the v3.9.0 admission refusal: Kyverno
validate-pod-securityrequiresrunAsNonRooton each container, and the migration Job and the retention CronJob set it only at pod level. The package tests didn't know that rule, so the gap passed CI.What
Tests only, after merging main (#629's fix):
allowPrivilegeEscalation: false, not privileged,runAsNonRoot: true,drop: [ALL], pod seccompRuntimeDefaultorLocalhost);runAsNonRoot.node --test scripts/tenant-package.test.mjspasses locally.Part of #302.
🤖 Generated with Claude Code