-
Notifications
You must be signed in to change notification settings - Fork 13
UPSTREAM: <carry>: (aws) Make workload pod explicity unprivileged #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
UPSTREAM: <carry>: (aws) Make workload pod explicity unprivileged #51
Conversation
Signed-off-by: chiragkyal <[email protected]>
|
Skipping CI for Draft Pull Request. |
|
/test all |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: chiragkyal The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: chiragkyal <[email protected]>
Signed-off-by: chiragkyal <[email protected]>
|
/test all |
|
@chiragkyal: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
WalkthroughUpdates test files to comply with restricted Pod Security standards and harden the AWS basic mount test manifest. The Helm install test disables secrets-store-csi-driver installation via an added value. The test Pod and container gain explicit securityContext settings and read-only mounts/volumes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
test/bats/tests/aws/BasicTestMount.yaml (1)
21-29: Add readOnlyRootFilesystem and consider trimming duplicates.
- Add readOnlyRootFilesystem for extra defense.
- Container-level seccomp/runAsNonRoot duplicate pod defaults; optional to drop to reduce drift.
securityContext: allowPrivilegeEscalation: false + readOnlyRootFilesystem: true capabilities: drop: - ALL - runAsNonRoot: true - runAsUser: 1000 - seccompProfile: - type: RuntimeDefault + # Inherit pod-level runAs* and seccomp (optional simplification)test/bats/aws.bats (2)
54-54: Align audit/warn to restricted for consistency.Enforce is restricted but audit/warn are baseline. Consider matching all three to restricted to surface relevant warnings.
-run kubectl label ns $NAMESPACE security.openshift.io/scc.podSecurityLabelSync=false pod-security.kubernetes.io/enforce=restricted pod-security.kubernetes.io/audit=baseline pod-security.kubernetes.io/warn=baseline --overwrite +run kubectl label ns $NAMESPACE security.openshift.io/scc.podSecurityLabelSync=false pod-security.kubernetes.io/enforce=restricted pod-security.kubernetes.io/audit=restricted pod-security.kubernetes.io/warn=restricted --overwrite
146-146: Await Secrets Store CSI Driver readiness after disabling its installation
Add akubectl -n $CSI_DRIVER_INSTALLED_NAMESPACE rollout status ds/secrets-store-csi-driver --timeout=150safter settingsecrets-store-csi-driver.install=falseto prevent race conditions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting
📒 Files selected for processing (2)
test/bats/aws.bats(2 hunks)test/bats/tests/aws/BasicTestMount.yaml(1 hunks)
🔇 Additional comments (1)
test/bats/tests/aws/BasicTestMount.yaml (1)
7-13: Good hardening for restricted PSS.Pod-level defaults (runAsNonRoot, runAsUser/Group, fsGroup, seccomp=RuntimeDefault) are appropriate. No blockers.
Summary by CodeRabbit