Skip to content
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

Add runAsNonRoot annotation to the kube-rbac-proxy #325

Merged

Conversation

gouthampacha
Copy link
Contributor

@gouthampacha gouthampacha commented Sep 4, 2024

A static analysis (SAST) has detected potential
bug(s) or issue(s) within the manila-operator:

Error: SIGMA.container_running_as_root (CWE-269):
unpacked_remote_sources/app/config/default/manager_auth_proxy_patch.yaml:14: Sigma main event: The Kubernetes container is allowed to run as the root user. This may allow attackers to gain the root privileges of the host when the container is compromised.
unpacked_remote_sources/app/config/default/manager_auth_proxy_patch.yaml:14: remediation: Explicitly set the securityContext.runAsNonRoot value to true to prevent the container from running as a root-level user.

kube-rbac-proxy does run rootless by default [1][2]; however, this annotation shouldn't hurt in case the underlying container image changes in the future.

Jira: OSPRH-9115
[1] https://github.com/brancz/kube-rbac-proxy/blob/b76470f11760731a6ddb6977cd11ac25929ed0a0/Dockerfile#L9C6-L9C11
[2] operator-framework/operator-sdk#4498

A static analysis (SAST) has detected potential
bug(s) or issue(s) within the manila-operator:

Error: SIGMA.container_running_as_root (CWE-269):
unpacked_remote_sources/app/config/default/manager_auth_proxy_patch.yaml:14: Sigma main event: The Kubernetes container is allowed to run as the root user. This may allow attackers to gain the root privileges of the host when the container is compromised.
unpacked_remote_sources/app/config/default/manager_auth_proxy_patch.yaml:14: remediation: Explicitly set the `securityContext.runAsNonRoot` value to `true` to prevent the container from running as a root-level user.

kube-rbac-proxy does run rootless by default [1][2];
however, this annotation shouldn't hurt in case the
underlying container image changes in the future.

Jira: OSPRH-9115
[1] https://github.com/brancz/kube-rbac-proxy/blob/b76470f11760731a6ddb6977cd11ac25929ed0a0/Dockerfile#L9C6-L9C11
[2] operator-framework/operator-sdk#4498
@gouthampacha
Copy link
Contributor Author

/retest

Copy link
Contributor

@abays abays left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Sep 6, 2024
Copy link
Contributor

openshift-ci bot commented Sep 6, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abays, gouthampacha

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

The pull request process is described here

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

@openshift-merge-bot openshift-merge-bot bot merged commit f070ddc into openstack-k8s-operators:main Sep 6, 2024
9 checks passed
@gouthampacha gouthampacha deleted the OSPRH-9115 branch September 9, 2024 18:19
@fmount
Copy link
Collaborator

fmount commented Sep 13, 2024

/cherry-pick 18.0.0-proposed

@openshift-cherrypick-robot

@fmount: new pull request created: #330

In response to this:

/cherry-pick 18.0.0-proposed

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants