Skip to content

Add component integration and viewer improvements to NIST viewer#14786

Open
ggbecker wants to merge 1 commit into
ComplianceAsCode:masterfrom
ggbecker:generate-components-list-for-nist-800-53
Open

Add component integration and viewer improvements to NIST viewer#14786
ggbecker wants to merge 1 commit into
ComplianceAsCode:masterfrom
ggbecker:generate-components-list-for-nist-800-53

Conversation

@ggbecker
Copy link
Copy Markdown
Member

@ggbecker ggbecker commented Jun 8, 2026

Description:

  • Extend the NIST viewer to expose the control→rule→component relationship: new Components page with grid and per-component detail view, "Related Components" section on control detail pages, component coverage table in statistics, and component count badges on the controls list.
  • Improve control detail rendering: OSCAL statements as structured numbered lists, guidance split into paragraphs, ODP parameter references highlighted inline, cross-control references as clickable links, and rule IDs linking to their rule.yml on GitHub.
  • Add docs/manual/developer/15_components_and_controls.md documenting the component architecture, the control→rule→component chain, and how to query relationships via the viewer and Python API.

Rationale:

  • The control→rule→component relationship was implicit and invisible — authors had no way to see which components a control requires or which controls a component satisfies.

  • OSCAL prose was rendered as raw text blobs and rule IDs had no link to their source.

  • HTML controls viewer uses unsanitized input #14758 type of issue was taken into account when developing this feature, so it should not manifest here.

Review Hints:

  • Download the OSCAL catalog first: cd utils/nist_sync && python3 download_oscal.py

  • Generate and serve the viewer: PYTHONPATH=$(pwd) python3 utils/nist_sync/generate_nist_viewer.py --products rhel9 --output-dir /tmp/nist-viewer --repo-root . && python3 -m http.server 8080 --directory /tmp/nist-viewer

  • Key pages to check: components.html, control-detail.html?id=au-2, statistics.html

  • Changes will propagate to https://complianceascode.github.io/content-pages/nist-viewer/

Expose the control→rule→component relationship in the NIST viewer:

- New Components page (components.html) with grid view and per-component
  detail view showing controls grouped by NIST family
- Control detail pages show a Related Components section with the
  software components whose rules implement each control
- Statistics page includes a Component Coverage table
- Control cards in the controls list show a component count badge
- generate_nist_viewer.py loads component definitions from components/
  and builds component_stats per product

Improve control detail rendering:
- OSCAL control statements rendered as structured numbered lists
- Supplemental guidance split into readable paragraphs
- ODP parameter references highlighted as inline spans
- Cross-control references in guidance rendered as internal links
- Rule IDs link directly to their rule.yml on GitHub

Add docs/manual/developer/15_components_and_controls.md documenting
the component architecture, the control-rule-component chain, and how
to query relationships via Python API and the NIST viewer.
@ggbecker ggbecker added this to the 0.1.82 milestone Jun 8, 2026
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 8, 2026

@ggbecker: The following tests 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/4.21-images 88d3968 link true /test 4.21-images
ci/prow/4.20-images 88d3968 link true /test 4.20-images

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