Skip to content

ROX-19064: Scanner V4 Automated Tests (Common Test Image + Compliance)#19641

Closed
dcaravel wants to merge 5 commits intomasterfrom
dc/scanv4-test-image-groovy
Closed

ROX-19064: Scanner V4 Automated Tests (Common Test Image + Compliance)#19641
dcaravel wants to merge 5 commits intomasterfrom
dc/scanv4-test-image-groovy

Conversation

@dcaravel
Copy link
Copy Markdown
Contributor

@dcaravel dcaravel commented Mar 26, 2026

Description

Part of a series of changes that modify groovy tests to work with both StackRox Scanner and Scanner V4.

Scanner V4 is not enabled yet, this is prep work so that it can be enabled in a future PR.

Updated the shared TEST_IMAGE to one that both scanners will report vulnerabilities for (the old image was based on debian:9 which is not supported by Scanner V4)

The ComplianceTest had to be updated to work with the new image and both scanners as a result.

Stacked on top of

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

  • modified existing tests

How I validated my change

Against StackROX Scanner these changes will be tested by CI as part of this PR

Against Scanner V4 these changes were validated in #19236

Add null guard to found checks so that it actually retries when image
not found yet vs. failing with NullPointerException. This was causing
CI flakes during testing.
…y flag

- Creates a ScannerV4Integration type for tests to use (will be part of future commits)
- The Scanner V4 integration cannot be deleted in Central by design, the new isDeletable() method allows tests to act accordingly.
- Makes isTestable() for StackRoxScannerIntegration conditional on Scanner V4 being enabled. When Scanner V4 is enabled StackRox Scanner is not reachable for image scans (exception: delegated scanning, but that is not tested in groovy tests)
Scanner V4 does not support debian 10 or less images, updating this test image
should allow both V2 and V4 to scan succesfully
The "Verify checks based on Integrations" tests relied on scanner integrations
being deleted, however the scanner V4 integration cannot be deleted by design,
therefore the test is now skipped when scanner v4 enabled.

The "Verify controls that checks for fixable CVEs" tests relied on the test image
having 100 or more fixable vulnerabilities, scanner v4 reports less vulnerabilities
and therefore the regex had to be updated.
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 26, 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

@dcaravel dcaravel changed the title Dc/scanv4 test image groovy ROX-19064: Scanner V4 Automated Tests (TEST_IMAGE + Compliance) Mar 26, 2026
@dcaravel
Copy link
Copy Markdown
Contributor Author

/test all

@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 26, 2026

@dcaravel: No presubmit jobs available for stackrox/stackrox@dc/scanv4-base-groovy

Details

In response to this:

/test all

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.

@dcaravel dcaravel changed the base branch from dc/scanv4-base-groovy to master March 26, 2026 22:25
@dcaravel
Copy link
Copy Markdown
Contributor Author

/test all

@rhacs-bot
Copy link
Copy Markdown
Contributor

Images are ready for the commit at be0e2ae.

To use with deploy scripts, first export MAIN_IMAGE_TAG=4.11.x-465-gbe0e2aebdb.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.36%. Comparing base (699eeed) to head (be0e2ae).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19641      +/-   ##
==========================================
- Coverage   49.37%   49.36%   -0.01%     
==========================================
  Files        2742     2742              
  Lines      206921   206921              
==========================================
- Hits       102165   102154      -11     
- Misses      97172    97181       +9     
- Partials     7584     7586       +2     
Flag Coverage Δ
go-unit-tests 49.36% <ø> (-0.01%) ⬇️

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.

@dcaravel dcaravel changed the title ROX-19064: Scanner V4 Automated Tests (TEST_IMAGE + Compliance) ROX-19064: Scanner V4 Automated Tests (Common Test Image + Compliance) Mar 26, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 26, 2026

@dcaravel: 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
ci/prow/gke-qa-e2e-tests be0e2ae link false /test gke-qa-e2e-tests

Full PR test history. Your PR dashboard.

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.

@dcaravel dcaravel closed this Mar 27, 2026
@dcaravel
Copy link
Copy Markdown
Contributor Author

Closed, relies on the image prefetch changes that are part of #19642

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.

2 participants