Skip to content

CMP-4648: Fix the content image profile-enable list (virt profiles on all arches, un-break the enable chain) - #15075

Merged
Vincent056 merged 1 commit into
ComplianceAsCode:masterfrom
Vincent056:cmp-4648-fix-profile-enable
Sep 1, 2026
Merged

CMP-4648: Fix the content image profile-enable list (virt profiles on all arches, un-break the enable chain)#15075
Vincent056 merged 1 commit into
ComplianceAsCode:masterfrom
Vincent056:cmp-4648-fix-profile-enable

Conversation

@Vincent056

@Vincent056 Vincent056 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Description:

Fixes CMP-4648. Four fixes to the Konflux Containerfile's profile enable list, found during the CMP-4506 joint testing on a mixed-architecture CNV cluster:

  1. Virt profiles were x86_64-only. cis-vm-extension / cis-vm-extension-node (added in CMP-4513: Ship the CIS OCP-Virt profiles in the Konflux content image #14989) sat in the x86_64 block, so the aarch64 datastream shipped without them: ARM worker nodes fail with No profile matching suffix and strictNodeScan turns the whole worker pool ERROR. Verified by extracting the arm64 variant of content-dev:master (14 profiles, no virt) and by per-node scanner exit codes on the test cluster (the two ARM nodes exit 1, all 19 x86_64 workers exit 2). Moved to the all-architecture enable block.

  2. The x86_64 enable chain has been silently broken since Bump OCP4 STIG from V2R2/V2R3 to V2R6 #15042 (STIG V2R2 removal): the list still sed -i'ed the three deleted stig-v2r2 files; the failing sed short-circuits the && chain and skips every later enable - stig-v2r3, stig-node-v2r3, both virt profiles, and the rhcos4 bsi enables are all missing from current content-dev:master (verified by extracting the amd64 datastream). The failure was masked by a trailing ; keeping the RUN exit 0. Removed the dead seds; the block is now one && chain so a missing file fails the build loudly.

  3. cis-1-9 / cis-node-1-9 enabled: cis/cis-node extend them and profile resolution fails when the parent is not enabled (reproduced on a clean local build of the enable set).

  4. STIG V2R6 enabled with the same architecture support as V2R3 (stig-v2r6, stig-node-v2r6, rhcos4 stig-v2r6 in the x86_64 block): stig/stig-node/rhcos4 stig now extend v2r6 - same resolution requirement as (3) - and without this x86_64 would ship only the older snapshot while ppc64le picks v2r6 up via its find *stig* glob. The CEL stig-vm-extension profiles are deliberately untouched (they ship via the CEL bundle; see comments).

Validated:

  • Simulated the aarch64 enable path per this Containerfile, built the datastream, and ran it end-to-end through Compliance Operator 1.9.1 on a live cluster: PB VALID, cis-vm-extension-node Profile CR created, master+worker node scans DONE with all five rules evaluated - the exact scenario that ERRORs today.
  • Simulated the full x86_64 enable path (executing this file's sed lines verbatim) and built ocp4+rhcos4: both datastreams now carry stig/stig-v2r3/stig-v2r6 (+node variants) and cis-vm-extension-node; all extends chains resolve.

🤖 Generated with Claude Code

@Vincent056

Vincent056 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Note for the STIG owners: #15042 added stig-v2r6, stig-node-v2r6, stig-vm-extension and stig-vm-extension-v2r6 without enable-list entries. This PR enables stig-v2r6/stig-node-v2r6/rhcos4 stig-v2r6 with the same architecture support as the v2r3 snapshots - required, since stig/stig-node/rhcos4 stig extend v2r6 and profile resolution fails when the parent is not enabled.

@Vincent056
Vincent056 force-pushed the cmp-4648-fix-profile-enable branch from 3114b38 to 694ced1 Compare August 31, 2026 22:53
@Vincent056

Vincent056 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

One item deliberately left out of this PR for the STIG owners: the stig-vm-extension* profiles are CEL (scanner_type: CEL) and today reach the CEL bundle on every architecture only because the CEL build ignores documentation_complete - the same accidental-shipping pattern made explicit for cis-vm-extension in #14989. They should get explicit enable-list entries when the virt-STIG rollout is ready.

Four fixes to the enable list, found during joint testing on a
mixed-architecture CNV cluster:

1. cis-vm-extension and cis-vm-extension-node moved from the
   x86_64-only block to the all-architecture block: the aarch64
   datastream shipped without them, so ARM worker nodes fail with 'No
   profile matching suffix' and strictNodeScan turns the whole pool
   ERROR on mixed-arch clusters.

2. Remove the three seds for the STIG V2R2 profiles deleted in
   de52a3c: the failing sed short-circuited the && chain and
   silently skipped every later enable (stig-v2r3, the virt profiles,
   the rhcos4 bsi enables), masked by a trailing ';' that kept the RUN
   exit 0. The block is now a single && chain so a future missing file
   fails the build loudly.

3. Enable cis-1-9 and cis-node-1-9: cis and cis-node extend them, and
   profile resolution fails when the parent is not enabled.

4. Enable stig-v2r6, stig-node-v2r6 and rhcos4 stig-v2r6 with the same
   architecture support as the v2r3 snapshots: stig/stig-node now
   extend v2r6 (same resolution requirement as 3), and without this the
   flagship x86_64 image would ship only the older snapshot while
   ppc64le picks v2r6 up via its glob. The CEL stig-vm-extension
   profiles are intentionally not touched here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Vincent056
Vincent056 force-pushed the cmp-4648-fix-profile-enable branch from 694ced1 to 2719216 Compare August 31, 2026 22:59
@openshift-ci

openshift-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown

@Vincent056: 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/e2e-aws-openshift-platform-compliance 2719216 link true /test e2e-aws-openshift-platform-compliance

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.

@yuumasato yuumasato added this to the 0.1.83 milestone Sep 1, 2026

@yuumasato yuumasato left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@Vincent056
Vincent056 merged commit 930fd0f into ComplianceAsCode:master Sep 1, 2026
73 of 75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants