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

Fix the mutated PodSpec extractor for warns if no SCC matches #1453

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

stlaz
Copy link

@stlaz stlaz commented Jan 16, 2023

If we propagate SCC admission error during pod extraction to PodSecurity admission, the latter will log the error instead of continuing with unmutated pod spec, and so we will not get a validation error in either the audit logs or as a warning.

Related code:
https://github.com/openshift/kubernetes/blob/b4e019f9bb91fb6733c6fdb342a78021d8d01f3e/vendor/k8s.io/pod-security-admission/admission/admission.go#L434-L443

/cc @deads2k @ibihim

If we propagate SCC admission error during pod extraction to PodSecurity
admission, the latter will log the error instead of continuing with
unmutated pod spec, and so we will not get a validation error in
either the audit logs or as a warning.
@openshift-ci openshift-ci bot requested review from deads2k and ibihim January 16, 2023 11:07
@openshift-ci-robot openshift-ci-robot added the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Jan 16, 2023
@openshift-ci-robot
Copy link

@stlaz: the contents of this pull request could not be automatically validated.

The following commits could not be validated and must be approved by a top-level approver:

Comment /validate-backports to re-evaluate validity of the upstream PRs, for example when they are merged upstream.

@deads2k
Copy link

deads2k commented Jan 16, 2023

This allows us to show all the warnings we can.

/lgtm
/approve

@deads2k deads2k removed the backports/unvalidated-commits Indicates that not all commits come to merged upstream PRs. label Jan 16, 2023
@deads2k
Copy link

deads2k commented Jan 16, 2023

/retest

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 16, 2023
@openshift-ci
Copy link

openshift-ci bot commented Jan 16, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deads2k, stlaz

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-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 16, 2023
@openshift-merge-robot openshift-merge-robot merged commit 7dab57f into openshift:master Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants