A hierarchical evidence viewer for OSCAL (Open Security Controls Assessment Language) compliance data. Displays control families and individual controls in a collapsible tree, links to evidence artifacts, shows last-assessed timestamps, and supports PDF export. Extends the existing ComplianceScoreCard from summary scores into detailed control-level views.
Introduction
Overview
Organizations subject to NIST 800-53, FedRAMP, SOC 2, or ISO 27001 need to review and present compliance evidence at the control level. The existing ComplianceScoreCard provides a summary view of scores by framework. This widget drills into the control hierarchy, showing individual controls, their assessment status, evidence links, and assessment dates.
Goals
Display OSCAL control families as a collapsible tree.
Show individual controls within each family with status, evidence links, and last-assessed date.
Support multiple compliance frameworks (NIST 800-53, FedRAMP, SOC 2, ISO 27001).
Provide PDF export of the evidence view for auditors.
Ship Storybook stories with representative compliance data.
Non-Goals
OSCAL data parsing from raw XML/JSON (consumer normalizes data before passing).
Evidence artifact storage or upload.
Control implementation guidance or remediation workflows.
Automated assessment execution.
Scope
In Scope
Item
Description
OscalEvidenceViewer component
Collapsible tree of control families and controls
Control family nodes
Expandable headers showing family ID, name, and summary counts
Control nodes
Individual controls with status badge, evidence links, and last-assessed date
Evidence links
Clickable links to evidence artifacts (URLs)
PDF export
Button to export the current view as a PDF document
Consumer normalizes data; parsing varies by source
Evidence upload
Separate workflow
Remediation tracking
Separate widget or tool
Assessment execution
Backend concern
Users and Pain Points
User
Pain Point
Compliance officers
No standard UI for reviewing control-level evidence across frameworks
Auditors
Evidence scattered across systems; need a consolidated view for assessment
SRE/security teams
ComplianceScoreCard only shows summary; no drill-down to controls
Definitions
Term
Definition
OSCAL
Open Security Controls Assessment Language; NIST standard for machine-readable compliance data
Control family
A grouping of related security controls (e.g., AC - Access Control)
Control
An individual security requirement (e.g., AC-2 Account Management)
Evidence
An artifact (document, screenshot, log) demonstrating compliance with a control
Assessment
The evaluation of a control against its requirements at a point in time
Current State
compliance-score-card.tsx shows a score summary for a compliance framework with total/passing/failing/not-applicable counts and an overall score. It supports NIST 800-53, FedRAMP, SOC 2, and ISO 27001 via the ComplianceFramework type. No control-level detail view exists. Teams build custom compliance dashboards or use external GRC tools.
Proposed Solution
Create an OscalEvidenceViewer widget at src/components/widgets/sre-devops/oscal-evidence-viewer.tsx that:
Accepts a ControlFamily[] data structure representing the control hierarchy.
Renders a collapsible tree with control families as parent nodes and controls as children.
Each control shows: control ID, name, status badge, evidence link count, and last-assessed date.
Evidence links are clickable and open in a new tab.
Family headers show aggregate counts (passing/failing/not-assessed).
Toolbar includes a framework selector and a PDF export button.
PDF export generates a printable summary of the control tree.
Requirements
The widget must handle large control catalogs (NIST 800-53 has 20 families and 300+ controls) without performance issues. The collapsible tree must be keyboard-navigable.
Functional Requirements
ID
Requirement
Priority
FR-01
Render control families as collapsible tree nodes
Must
FR-02
Render individual controls within families with ID, name, and status
Must
FR-03
Display status badge per control (passing, failing, not-assessed, not-applicable)
Must
FR-04
Show evidence links per control with count indicator
Must
FR-05
Evidence links open in new tab
Must
FR-06
Display last-assessed date per control
Must
FR-07
Family headers show aggregate counts (e.g., “12 passing, 3 failing, 2 not assessed”)
Must
FR-08
Provide expand-all and collapse-all controls
Should
FR-09
Toolbar framework selector switches between loaded frameworks
Should
FR-10
PDF export button generates a printable document
Must
FR-11
Search/filter controls by ID or name
Should
FR-12
Support a loading prop with skeleton tree
Should
FR-13
Show empty state when no controls are loaded
Must
Non-Functional Requirements
ID
Requirement
NFR-01
Renders 20 families with 300+ total controls without perceptible lag
NFR-02
PDF export completes within 5 seconds for a full NIST 800-53 catalog
NFR-03
Full light/dark theme support
NFR-04
Bundle size under 8 KB gzipped (excluding PDF generation library)