Skip to content

nist_sync: regenerate CIS reference files to nested format - #14951

Open
ggbecker wants to merge 2 commits into
ComplianceAsCode:masterfrom
ggbecker:fix-nist-sync
Open

nist_sync: regenerate CIS reference files to nested format#14951
ggbecker wants to merge 2 commits into
ComplianceAsCode:masterfrom
ggbecker:fix-nist-sync

Conversation

@ggbecker

Copy link
Copy Markdown
Member

Description:

Review Hints

./build_product rhel8 rhel9 rhel10
./utils/nist_sync/test_workflow_local.sh

ggbecker added 2 commits July 31, 2026 13:05
PR ComplianceAsCode#14884 restructured the NIST 800-53 product control files
(products/{rhel8,rhel9,rhel10}/controls/nist_800_53/*.yml) from flat to
nested (enhancements under their base control) and updated
sync_nist_split.py to emit nested output, but did not regenerate the
auto-generated comparison files under shared/references/controls/,
which were left in the old flat format.

Since the weekly cis-nist-sync workflow always regenerates those
reference files from scratch, every run was diffing a freshly-nested
file against the stale flat one in git, producing a huge mechanical
diff unrelated to any real CIS/NIST mapping change (see PR ComplianceAsCode#14932).

Regenerate the reference files with the current script so they match
the nested structure of the product control files. Verified
semantically against the prior versions: control IDs and rule mappings
are unchanged; the only change is 553 enhancements per product
inheriting their parent's baseline level, the same mechanical change
already applied to the product files in ComplianceAsCode#14884.
test_workflow_local.sh counted controls and rule selections with
fixed-indentation grep patterns ('^  - id:' and '^      -'), which
only matched the old flat control-file layout. Since ComplianceAsCode#14884 nested
enhancements under their base control, ids and rule lists shift
indentation depth, so the counters silently reported 0 for every
product.

Replace the grep counters with a small ruamel.yaml-based helper that
recursively walks the controls tree, so stats are correct regardless
of nesting depth.
@openshift-ci

openshift-ci Bot commented Jul 31, 2026

Copy link
Copy Markdown

@ggbecker: 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-node-compliance f435f30 link false /test e2e-aws-openshift-node-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.

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.

1 participant