Skip to content

[release-6.6]fix(security): harden collector to run non-root (CWE-250) - #3527

Closed
vparfonov wants to merge 1 commit into
openshift:release-6.6from
vparfonov:log9757-release-6.6
Closed

vparfonov wants to merge 1 commit into
openshift:release-6.6from
vparfonov:log9757-release-6.6

Conversation

@vparfonov

Copy link
Copy Markdown
Contributor

Description

Enforce that the collector container runs as a fixed non-root UID (1000) with RunAsNonRoot=true. This removes unnecessary privilege from the collector workload and closes the CWE-250 (Execution with Unnecessary Privileges) finding.

Changes:

  • Add RunAsUser: 1000 and RunAsNonRoot: true to the collector SecurityContext
  • Apply SecurityContext to both DaemonSet and Deployment collector modes
  • Update SCC from RunAsAny to MustRunAsNonRoot to enforce at the policy level that all pods using logging-scc must run as non-root
  • Update tests to verify both modes now have the hardened security context

/cc
/assign @jcantrill

Links

  • Depending on PR(s):
  • GitHub issue:
  • JIRA: LOG-9757
  • Enhancement proposal:

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/cluster-logging-operator/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1f30e861-0fb0-4562-a9c2-05b919155647

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from cahartma and jcantrill October 2, 2026 10:19
@openshift-ci

openshift-ci Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: vparfonov
Once this PR has been reviewed and has the lgtm label, please assign jcantrill 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

@vparfonov

Copy link
Copy Markdown
Contributor Author

/retest-required

Enforce that the collector container runs as a fixed non-root UID (1000)
with RunAsNonRoot=true. This removes unnecessary privilege from the
collector workload and closes the CWE-250 (Execution with Unnecessary
Privileges) finding.

JIRA: LOG-9757

Signed-off-by: Vitalii Parfonov <vparfono@redhat.com>
@vparfonov
vparfonov force-pushed the log9757-release-6.6 branch from 9b57998 to 13e95b5 Compare October 2, 2026 16:55
@openshift-ci

openshift-ci Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

@vparfonov: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-target 13e95b5 link true /test e2e-target
ci/prow/functional-target 13e95b5 link true /test functional-target

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@vparfonov vparfonov closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant