Skip to content

fix: use non-root group for dialer and volume-uploader pods#3767

Open
Itx-Psycho0 wants to merge 1 commit into
knative:mainfrom
Itx-Psycho0:fix/3517-runasgroup-nonroot
Open

fix: use non-root group for dialer and volume-uploader pods#3767
Itx-Psycho0 wants to merge 1 commit into
knative:mainfrom
Itx-Psycho0:fix/3517-runasgroup-nonroot

Conversation

@Itx-Psycho0
Copy link
Copy Markdown
Contributor

This PR completes the fix for issue #3517 by changing RunAsGroup from 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: 0 with a comment saying it was needed for Tekton buildpack compatibility and tracked for future remediation.

After testing, using RunAsGroup: 1001 works fine with Tekton tasks, so we can complete the fix now.

Changes

Why This Matters

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 change improves the security posture of dialer and volume-uploader pods.

Testing

  • All existing tests pass including TestRestrictedProfileCompliance
  • Linting passes (make check)
  • The change affects both dialer pods (used for SSH connections) and volume-uploader pods (used for on-cluster builds)

Related

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
@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos May 16, 2026 18:21
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 16, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Itx-Psycho0
Once this PR has been reviewed and has the lgtm label, please assign dsimansk for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot added size/XS 🤖 PR changes 0-9 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels May 16, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented May 16, 2026

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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

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.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.06%. Comparing base (2bbf9fe) to head (2be6487).
⚠️ Report is 7 commits behind head on main.

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     
Flag Coverage Δ
e2e 35.92% <100.00%> (+<0.01%) ⬆️
e2e go 31.46% <100.00%> (ø)
e2e node 27.25% <100.00%> (ø)
e2e python 31.83% <100.00%> (ø)
e2e quarkus 27.37% <100.00%> (ø)
e2e rust 26.77% <100.00%> (ø)
e2e springboot 25.29% <100.00%> (ø)
e2e typescript 27.35% <100.00%> (ø)
e2e-config-ci 28.30% <0.00%> (ø)
integration 17.33% <100.00%> (-0.05%) ⬇️
unit macos-14 45.06% <100.00%> (ø)
unit macos-latest 45.06% <100.00%> (ø)
unit ubuntu-24.04-arm 45.31% <100.00%> (ø)
unit ubuntu-latest 46.01% <100.00%> (ø)
unit windows-latest 45.10% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lkingland
Copy link
Copy Markdown
Member

/ok-to-test

@knative-prow knative-prow Bot added ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test 🤖 Needs an org member to approve testing labels May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test 🤖 Non-member PR verified by an org member that is safe to test. size/XS 🤖 PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dialer pod does not conform to restricted pod security profile

2 participants