Commit ea7d0bd
Upgrade OSCAL artifacts to 1.2.2 and enrich with security-as-code data (#1284)
* Upgrade OSCAL artifacts to 1.2.2 and enrich with security-as-code data
Both the prEN 40000-1-4 catalog and the Component Definition are upgraded
from OSCAL 1.1.2 to 1.2.2 and significantly enriched:
Catalog (cra_pren_4000014_oscal_catalog.json):
- oscal-version 1.1.2 → 1.2.2
- metadata.parties: dfetch-org (catalog maintainer) and Angelo D'Amato/Vulnir
B.V. (original content author, STAN4CR grant)
- metadata.roles: catalog-maintainer, content-creator
- metadata.responsible-parties: role→party mapping
Component Definition (dfetch.component-definition.json, generated by compliance.py):
- oscal-version 1.1.2 → 1.2.2
- metadata.document-ids: stable URI cross-reference
- metadata.roles: supplier, maintainer
- metadata.parties: dfetch-org organisation with GitHub homepage link
- metadata.responsible-parties: supplier and maintainer role mapping
- metadata.props: OpenSSF Scorecard URL added
- component.purpose: describes what dfetch does and its security-relevant properties
- component.responsible-roles: supplier party linked to component
- component.links: adds SECURITY.md as vulnerability disclosure reference
- component.props: asset-type, vendor-name, license enrichment
- implemented-requirements: 21 of 35 requirements now carry evidence links
(rel="evidence") pointing to the concrete code or CI workflow file that
implements each control — making the compliance mapping machine-verifiable
- back-matter: 12 resources (up from 3), adding OpenSSF Scorecard, Scorecard
workflow, SLSA Source Provenance workflow, Sigstore attestation workflow,
in-toto test-results workflow, CodeQL workflow, dependency-review workflow,
GitHub Releases, and verify-integrity how-to doc
compliance_data.py:
- SOImplementation gets evidence_hrefs: list[tuple[str, str]] field
- 21 SOs populated with (href, description) pairs pointing to code/CI evidence
compliance.py:
- _build_metadata: emits 1.2.2 structure with parties/roles/document-ids
- _build_component: adds purpose, responsible-roles, enriched props and links
- _build_implemented_requirements: emits evidence links from evidence_hrefs
- _build_back_matter: 12 resources with tool/framework/type props
- render_rst: references updated to OSCAL 1.2.2
Documentation updated in compliance_track.rst and security_pipeline.rst.
Changelog entry added to 0.15.0 (unreleased).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01342LwMTGpgbJXEDptAEF5z
* Auto-generate compliance_track.rst and control_register.rst from Python data
- Add `note`, `TRACK_A_CONTROLS`, `ANNEX_V_MAP` to compliance_data.py so
both RST documents can be rendered without pytm installed
- Fix 13 SO_IMPLEMENTATIONS divergences from the curated manual RST:
ECR-a adds C-040; ECR-b gains integrity-hash-opt-in gap; ECR-c
SO.UserUpdateNotification loses incorrect C-040 reference and gains a
note; ECR-d SO.AccessControl gains delegation gap; ECR-e
DataTransmittedConfidentiality/ComAuth trimmed to [C-045]; ECR-f
DataTransmittedIntegrity corrected to [C-005]; ECR-l
LogSecurityRelevantActivities loses C-036 (not a logging control);
ECR-i/j gain timeout-gap entries; ECR-m SecureDataDeletion gains note
- Add _rst_ctrl_ref(), _format_ref_as_rst(), _format_single_ref() helpers;
update _part_i_rows() to emit :ref: cross-references; update Part II
table and gap analysis to use RST refs and hyperlinks
- Add _render_annex_v(), _render_impl_notes(), render_control_register_rst()
- Rewrite render_rst(): auto-gen header, richer preamble, Annex V section,
status key, horizontal rules, Notes on Implemented rows
- Both doc/explanation/*.rst are now auto-generated committed artifacts;
removed 430 lines of manually-maintained duplication
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01342LwMTGpgbJXEDptAEF5z
* refactor: move control register to pytm-free tm_controls_data module
Eliminates the TRACK_A_CONTROLS static-copy duplication in compliance_data.py.
All 31 Track A controls (SC_CONTROLS + USAGE_CONTROLS) now live in a single
source-of-truth module (security/tm_controls_data.py) with no pytm dependency.
- security/tm_controls_data.py (new): Control dataclass + SC_CONTROLS (20
supply-chain controls) + USAGE_CONTROLS (11 usage controls)
- security/tm_elements.py: remove duplicate Control class, re-export from
tm_controls_data
- security/compliance_data.py: remove duplicate Control class and the 180-line
TRACK_A_CONTROLS static fallback; import Control from tm_controls_data
- security/tm_supply_chain.py: remove inline CONTROLS list; import SC_CONTROLS
as CONTROLS from tm_controls_data
- security/tm_usage.py: remove inline CONTROLS list; import USAGE_CONTROLS as
CONTROLS from tm_controls_data
- security/compliance.py: remove importlib/try-except fallback; _load_track_a_
controls() now reads directly from SC_CONTROLS + USAGE_CONTROLS
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01342LwMTGpgbJXEDptAEF5z
* fix: address review findings in compliance tooling and docs
* security/compliance_data.py: add C-010, C-039, C-043 to SO.Updateability
controls list — the note already cited these controls but the controls column
showed — causing an inconsistency between the table and the implementation note
* security/compliance.py:
- _format_single_ref: strip glob pattern from GitHub tree URL so *.yml
references link to the directory (valid URL) not the glob path (broken URL)
- _load_track_a_controls: honour track_b_only=True by returning [] instead
of ignoring the parameter (previously silenced a warning; now actually omits
Track A from the merged register when the flag is set)
* doc/explanation/security_pipeline.rst: update two stale descriptions
- control_register entry: RST (maintained) → RST (generated)
- compliance pipeline paragraph: reflect that controls now live in
tm_controls_data.py and that control_register is also auto-generated
* Regenerate all three derived artifacts from updated source:
doc/explanation/compliance_track.rst, doc/explanation/control_register.rst,
security/dfetch.component-definition.json (version 0.15.0)
Skipped: SO.UserUpdateNotification controls column remains — because the
implementation note references only code paths (github_version_check.py),
not any formal C-xxx control.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01342LwMTGpgbJXEDptAEF5z
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent bcb8fac commit ea7d0bd
12 files changed
Lines changed: 1870 additions & 780 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
5 | 8 | | |
6 | | - | |
7 | | - | |
8 | | - | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
72 | | - | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
84 | | - | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
88 | 89 | | |
89 | 90 | | |
90 | | - | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
| 97 | + | |
97 | 98 | | |
98 | 99 | | |
99 | 100 | | |
| |||
221 | 222 | | |
222 | 223 | | |
223 | 224 | | |
| 225 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
94 | | - | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | | - | |
98 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
99 | 102 | | |
100 | 103 | | |
101 | | - | |
102 | | - | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| |||
0 commit comments