Skip to content

ROX-33325: Classify policy criteria fields as image enrichhment reqd#19412

Open
clickboo wants to merge 1 commit intomasterfrom
boo-image-enrichment-policy-fields
Open

ROX-33325: Classify policy criteria fields as image enrichhment reqd#19412
clickboo wants to merge 1 commit intomasterfrom
boo-image-enrichment-policy-fields

Conversation

@clickboo
Copy link
Contributor

@clickboo clickboo commented Mar 13, 2026

Description

This PR adds support for classifying policy criteria based on whether they require image enrichment data or not to be evaluated. This is a foundational PR, for a follow on PR which will add policy eval webhook optimization for using image enrichment required policies optimally.

Also needed renaming a function called ContainsEnrichmentRequiredFields to AlertsOnMissingEnrichment for both correctness and readability.

User-facing documentation

Testing and quality

  • the change is production ready: the change is GA, or otherwise the functionality is gated by a feature flag
  • CI results are inspected

Automated testing

  • added unit tests
  • added e2e tests
  • added regression tests
  • added compatibility tests
  • modified existing tests

How I validated my change

CI, manual regression tests for admission controller on infra cluster.

@clickboo
Copy link
Contributor Author

This change is part of the following stack:

Change managed by git-spice.

@openshift-ci
Copy link

openshift-ci bot commented Mar 13, 2026

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@rhacs-bot
Copy link
Contributor

rhacs-bot commented Mar 13, 2026

Images are ready for the commit at 1b8beb5.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-313-g1b8beb5c9b.

@clickboo clickboo force-pushed the boo-image-enrichment-policy-fields branch 2 times, most recently from 65fecbb to efa0123 Compare March 13, 2026 11:04
@clickboo clickboo force-pushed the boo-image-enrichment-policy-fields branch from efa0123 to 1b8beb5 Compare March 13, 2026 11:56
@clickboo clickboo changed the title ROX-33325: Classify policy criteria fields as image enrichhment required ROX-33325: Classify policy criteria fields as image enrichhment reqd Mar 13, 2026
@clickboo
Copy link
Contributor Author

/test all

@codecov
Copy link

codecov bot commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 54.16667% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 49.70%. Comparing base (d37b611) to head (1b8beb5).
⚠️ Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
pkg/booleanpolicy/field_metadata.go 28.57% 5 Missing ⚠️
pkg/detection/compiled_policy.go 50.00% 2 Missing ⚠️
...r/admission-control/manager/evaluate_deploytime.go 0.00% 2 Missing ⚠️
sensor/admission-control/manager/manager_impl.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19412      +/-   ##
==========================================
+ Coverage   49.68%   49.70%   +0.02%     
==========================================
  Files        2700     2702       +2     
  Lines      203312   203518     +206     
==========================================
+ Hits       101010   101160     +150     
- Misses      94776    94833      +57     
+ Partials     7526     7525       -1     
Flag Coverage Δ
go-unit-tests 49.70% <54.16%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@clickboo
Copy link
Contributor Author

/test ocp-4-21-nongroovy-e2e-tests

@clickboo clickboo marked this pull request as ready for review March 13, 2026 14:47
@clickboo clickboo requested review from a team as code owners March 13, 2026 14:47
@clickboo clickboo requested a review from Stringy March 13, 2026 14:49
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@dashrews78 dashrews78 left a comment

Choose a reason for hiding this comment

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

LGTM. Will be easier to tell when the PRs that use it start trickling it.

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