Skip to content

security: add annotation for validated SCC type #2211

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

Conversation

ibihim
Copy link
Contributor

@ibihim ibihim commented Feb 25, 2025

What

Add annotation for validated SCC type (User / ServiceAccount).

Why

An SCC is being assigned to a workload based on the capabilities the ServiceAccount or user has. To distinct, against whom this was validated against, this annotation is being introduced.

This is necessary to identify namespaces that might not be labeled properly by the PSA label syncer as it doesn't watch the user's SCCs and picks the wrong PodSecurityStandard for PodSecurityAdmission labels.

Reference

Copy link
Contributor

openshift-ci bot commented Feb 25, 2025

Hello @ibihim! Some important instructions when contributing to openshift/api:
API design plays an important part in the user experience of OpenShift and as such API PRs are subject to a high level of scrutiny to ensure they follow our best practices. If you haven't already done so, please review the OpenShift API Conventions and ensure that your proposed changes are compliant. Following these conventions will help expedite the api review process for your PR.

@openshift-ci openshift-ci bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 25, 2025
@kramaranya
Copy link

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2025
An SCC is being assigned to a workload based on the capabilities the
ServiceAccount or user has. To distinct, against whom this was validated
against, this annotation is being introduced.
@ibihim ibihim force-pushed the ibihim/2025-02-25_validated-scc-type-annotation branch from 45b49aa to 09148e8 Compare February 27, 2025 08:18
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 27, 2025
Copy link

@kramaranya kramaranya 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 Indicates that a PR is ready to be merged. label Feb 27, 2025
@JoelSpeed
Copy link
Contributor

Do we have enough consensus on the enhancement to feel confident in adding this? What would you do if the EP pivots away from using this?

@ibihim
Copy link
Contributor Author

ibihim commented Feb 28, 2025

@JoelSpeed, we need this anyway. Without that annotation, we can't close a major gap in our violation scan that happens within CFE.

@JoelSpeed
Copy link
Contributor

/lgtm

Copy link
Contributor

openshift-ci bot commented Mar 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ibihim, JoelSpeed, kramaranya

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 Mar 3, 2025
Copy link
Contributor

openshift-ci bot commented Mar 3, 2025

@ibihim: all tests passed!

Full PR test history. Your PR dashboard.

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.

@openshift-merge-bot openshift-merge-bot bot merged commit f587fb6 into openshift:master Mar 3, 2025
12 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

Distgit: ose-cluster-config-api
This PR has been included in build ose-cluster-config-api-container-v4.19.0-202503031239.p0.gf587fb6.assembly.stream.el9.
All builds following this will include this PR.

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. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants