-
Notifications
You must be signed in to change notification settings - Fork 65
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 policy to check for scratch images running privileged #779
Add policy to check for scratch images running privileged #779
Conversation
Hi @hbrueckner. Thanks for your PR. I'm waiting for a redhat-openshift-ecosystem member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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/test-infra repository. |
/ok-to-test Thanks @hbrueckner! I'll start tests here for now, I have a few nits I'll throw into a review soon. |
I don't think we have ever supported this use case, we'll check with the business to see if we should support it going forward. |
ea53b6c
to
38b241f
Compare
23fdf77
to
0202907
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hbrueckner 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 |
/ok-to-test |
Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Scratch projects might run privileged and, thus, introduce a new policy based on the scratch policy but without checking for RunAsNonRoot. Co-authored-by: Adam D. Cornett <adc@redhat.com> Signed-off-by: Hendrik Brueckner <brueckner@linux.ibm.com>
0202907
to
61d0eef
Compare
/ok-to-test |
@hbrueckner: PR needs rebase. 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/test-infra repository. |
We very much appreciate the contributions here, but we've not heard any confirmation from the Certification policy makers that this combination needs to be handled within Preflight. For now, we'll mark this closed. If the policy stance changes, we'll revisit then. |
/reopen Rebased my branch to latest main: https://github.com/hbrueckner/openshift-preflight/tree/pr-scratch-privileged |
@hbrueckner: Failed to re-open PR: state cannot be changed. The pr-scratch-privileged branch was force-pushed or recreated. In response to this:
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/test-infra repository. |
I'd absolutely like to see this moved forward. Preflight needs to properly handle the situation where a container is privileged but is also 'scratch'. |
The policy for scratch container images includes the check for
RunAsNonRoot
and does not consider the privileged setting in the container project. This PR is about to introduce a scratch container image policy to consider running privileged containers.This PR arises from discussions on the RH support case 03250672 which triggered issue #766.
Testing the latest
preflight
(main branch) with issue #766 corrected, solved the parsing problem but introduced theRunAsNonRoot
check again as part of the scratch policy. In preflight v1.4.0, the check has been skipped based on the project setting. This behavior might have been introduced by PR #776 which correctly detects scratch images.Signed-off-by: Hendrik Brueckner brueckner@linux.ibm.com