Repository navigation
test(e2e): disable service account token automount in workload fixtures - #387
Conversation
The batch-job, deployment and statefulset fixtures ran their pods with the default service account token mounted, though none of them call the API server. Set automountServiceAccountToken to false on each pod template, as the pod fixtures already do. Resolves static analysis rule kubernetes:S6865. Signed-off-by: Roee Gil <roee.gil@run.ai>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (12)
Included review availability: Your plan provides up to 12 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe end-to-end test fixtures for batch Jobs, Deployments, and StatefulSets now set ChangesService Account Token Fixture Updates
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Other Merge Risk: ⚪ Minimal · up to This fixture-only security hardening change is ready to merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What does this PR do?
Sets
automountServiceAccountToken: falseon the pod template of the batch-job, deployment and statefulset e2e fixtures undertest/e2e/flows/testdata/. These pods only runbusyboxsleeping or exiting, and never call the API server, so they do not need the default service account token. The pod fixtures already set this field; this brings the other workload fixtures in line.Resolves 12 findings of static analysis rule
kubernetes:S6865("Bind this resource's automounted service account to RBAC or disable automounting"). Recorded data is unaffected; the field does not change any status Karta reads.Related issue(s)
None. Small fixture hardening that came out of a static analysis scan.
Checklist
git commit -s)make check)🤖 Generated with Claude Code
Summary by CodeRabbit