fix: use non-root group for dialer and volume-uploader pods#3767
fix: use non-root group for dialer and volume-uploader pods#3767Itx-Psycho0 wants to merge 1 commit into
Conversation
Change RunAsGroup from 0 (root group) to 1001 (non-root group) for better security posture. While RunAsGroup: 0 doesn't violate the Kubernetes restricted pod security profile (which only checks UID, not GID), using a non-root group is a security best practice. This completes the fix for issue knative#3517 which was partially addressed in PR knative#3614. The previous fix set all required restricted profile fields but left RunAsGroup as 0 for Tekton buildpack compatibility. After testing, using RunAsGroup: 1001 works fine with Tekton tasks. Changes: - Set RunAsGroup to 1001 (same as RunAsUser) instead of 0 - Remove comment about tracking this in knative#3517 - All tests pass including TestRestrictedProfileCompliance Fixes knative#3517
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Itx-Psycho0 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @Itx-Psycho0. Thanks for your PR. I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3767 +/- ##
==========================================
- Coverage 57.06% 57.06% -0.01%
==========================================
Files 181 181
Lines 21145 21145
==========================================
- Hits 12067 12066 -1
Misses 7855 7855
- Partials 1223 1224 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
/ok-to-test |
This PR completes the fix for issue #3517 by changing
RunAsGroupfrom 0 (root group) to 1001 (non-root group) for dialer and volume-uploader pods.Background
PR #3614 partially fixed #3517 by adding all required fields for the Kubernetes restricted pod security profile. However, it left
RunAsGroup: 0with a comment saying it was needed for Tekton buildpack compatibility and tracked for future remediation.After testing, using
RunAsGroup: 1001works fine with Tekton tasks, so we can complete the fix now.Changes
RunAsGroupfrom0to1001indefaultPodSecurityContext()Why This Matters
While
RunAsGroup: 0doesn't violate the Kubernetes restricted pod security profile (which only checks UID, not GID), using a non-root group is a security best practice. This change improves the security posture of dialer and volume-uploader pods.Testing
TestRestrictedProfileCompliancemake check)Related