Skip to content

Avoid overwrtiging existing apparmor profiles#3225

Open
ccojocar wants to merge 7 commits into
mainfrom
check_apparmor_overwrite
Open

Avoid overwrtiging existing apparmor profiles#3225
ccojocar wants to merge 7 commits into
mainfrom
check_apparmor_overwrite

Conversation

@ccojocar
Copy link
Copy Markdown
Contributor

@ccojocar ccojocar commented Jun 5, 2026

What type of PR is this?

/kind bug

What this PR does / why we need it:

This adds a measure in place to avoid overwriting existing apparmor profiles when a new profile
is first installed by checking the Generation field of the CRD. In this way, it always to
update existing profiles which were already installed by the security-profiles operator.

This is a measure to prevent that an attacker will overwrite an existing profile which is already
loaded into the node to alter its permissions.

Which issue(s) this PR fixes:

Does this PR have test?

yes

Special notes for your reviewer:

Does this PR introduce a user-facing change?

Add a measure in place to avoid overwriting existing apparmor profile when a profile is first 
intalled.

Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. labels Jun 5, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ccojocar

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

The pull request process is described 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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 5, 2026
ccojocar added 5 commits June 5, 2026 15:03
Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
@ccojocar
Copy link
Copy Markdown
Contributor Author

ccojocar commented Jun 5, 2026

/retest

Signed-off-by: Cosmin Cojocar <ccojocar@google.com>
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

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

Test name Commit Details Required Rerun command
pull-security-profiles-operator-verify 872cc54 link true /test pull-security-profiles-operator-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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.

@ccojocar ccojocar requested review from saschagrunert and removed request for Vincent056 and ngopalak-redhat June 7, 2026 08:26
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants