Skip to content

NIST Controls Assessment SKILL (plus rule to variable mapping)#14824

Open
ggbecker wants to merge 2 commits into
ComplianceAsCode:masterfrom
ggbecker:nist-group-enhancements-assess-skill
Open

NIST Controls Assessment SKILL (plus rule to variable mapping)#14824
ggbecker wants to merge 2 commits into
ComplianceAsCode:masterfrom
ggbecker:nist-group-enhancements-assess-skill

Conversation

@ggbecker

@ggbecker ggbecker commented Jun 24, 2026

Copy link
Copy Markdown
Member

Description:

  • Add assess-nist-control Claude Code skill: OSCAL enrichment, CIS reverse lookup, automatability classification, rule selection, variable resolution, and YAML write-back for pending NIST 800-53 Rev 5 controls — base control and enhancements as a single unit.
  • Add resolve-rule-variables sub-skill: looks up XCCDF variable dependencies from build/<product>/rule_variable_mapping.json, reads .var files, and collects var_name=key selections interactively. Called by assess-nist-control; also usable standalone.
  • Add build-scripts/extract_rule_variable_mapping.py and CMake wiring to generate rule_variable_mapping.json at build time, mapping each rule ID to the XCCDF external variables it depends on.

Rationale:

  • Completing the NIST 800-53 backlog for RHEL products is a sustained effort with ~1,150 pending controls across 20 families. Manual assessment requires juggling the OSCAL catalog, the CIS mapping data, grep across thousands of rule files, and YAML edits — error-prone and slow. These skills encode that workflow so authors can work through controls in a focused session without context-switching between tools.
  • Extracting variable resolution into its own sub-skill (resolve-rule-variables) keeps the concern isolated: the key-vs-value distinction, .var file lookup, deduplication across rules sharing a variable, and the planned future migration to a per-product variables file are all handled in one place.

Review Hints:

  • Build the RHEL 9 product and run the skill /assess-nist-control ia-5 --product rhel9, this will trigger an assessment of the control which also contains the variable selections invocation.

@ggbecker ggbecker changed the title Nist group enhancements assess skill NIST Controls Assessment SKILL (plus rule to variable mapping) Jun 24, 2026
@ggbecker ggbecker force-pushed the nist-group-enhancements-assess-skill branch from f39837a to 4512f84 Compare June 24, 2026 14:03
ggbecker added 2 commits June 24, 2026 17:41
Adds extract_rule_variable_mapping.py which scans per-rule OVAL XML
files in build/<product>/checks/oval/ and checks_from_templates/oval/
to produce build/<product>/rule_variable_mapping.json — a mapping of
each rule ID to the XCCDF external variables it depends on.

The script is wired into the CMake build via ssg_extract_rule_variable_mapping()
and runs as part of every product build after OVAL compilation.

Adds test_profile_variables.py which validates that every profile selects
all variables required by the rules it includes, warning when a rule's
variable dependency would silently fall back to the .var file default.
@ggbecker ggbecker force-pushed the nist-group-enhancements-assess-skill branch from 4512f84 to 8d058bb Compare June 24, 2026 15:59
@openshift-ci

openshift-ci Bot commented Jun 24, 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 8d058bb link true /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