Skip to content

Commit 816e120

Browse files
feat(oscal): OSCAL-native Annex IV dossier generator (13th assurance check)
Turns the now-verified OSCAL catalogs + live assurance evidence into an auto-assembled EU AI Act Annex IV technical-documentation dossier — the regulator deliverable the compliance-as-code stack was built to produce. New artifacts: - governance_artifacts/oscal/annex_iv_section_map.yaml: auditable bridge mapping each Annex IV section (A-H) to the OSCAL control ids that evidence it, plus a provider narrative. Control ids must exist in a catalog (no dangling refs). - governance_artifacts/oscal/generate_annex_iv_dossier.py: assembles an OSCAL-flavoured JSON dossier + human-readable Markdown. For each section it resolves controls, pulls statement/tier/SLA/regime-citation/evidence-query, and attaches LIVE evidence by running each control's backing assurance check (TLA+ TLC, PQC WORM pytest, zk proof, routing simulator). Honesty model: * SATISFIED only when a mapped control's runnable check passed in this run; * PARTIAL when runnable-backed but not green this run; * PENDING-EVIDENCE for organisational/hardware-dependent evidence (e.g. env-02 enclave key custody, reported truthfully as n/a organisational). Refuses to assemble on a non-conformant catalog or an unknown control id. Embeds an integrity statement: assembly-integrity artifact, NOT a conformity assessment; does not assert the institution is compliant. Result on repo: 8/8 sections SATISFIED, catalog conformance 0 failures. - governance_artifacts/oscal/generated/annex_iv_dossier.{json,md}: sample output. - governance_artifacts/oscal/README.md: documents the OSCAL tooling + honesty model. Wired in: - run_runnable_assurance.sh: renumbered to 13 steps; step 13 verifies the dossier assembles end-to-end (8 sections A-H, 0 conformance failures). Suite 13/13 PASS. - tests/governance/test_governance_artifacts.py: +3 tests — all section-map controls resolve; live-evidence assembly (SATISFIED implies a green check; integrity statement disclaims conformity); --no-verify never fabricates SATISFIED. Governance pytest 15/15. - CI: unit-test job runs '-k "oscal or annex"'; new steps assemble the dossier with live evidence and upload it as a build artifact (annex-iv-dossier). - Docs synced to 13/13: RUNNABLE_ASSURANCE.md (new row 13 + count), DECADAL plan (ledger + counts), pilot P6-REPRO + README. Tier A (assembly integrity). Regression: assurance 13/13 PASS; pilot 6/6 automated; governance pytest 15/15.
1 parent 13eb322 commit 816e120

12 files changed

Lines changed: 1270 additions & 22 deletions

.github/workflows/runnable-assurance.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,28 @@ jobs:
8686
circom circuits/src1_concentration_bound.circom --r1cs --wasm --sym --O0 -o circuits/
8787
circom circuits/src_fair1_reason_code_check.circom --r1cs --wasm --sym --O0 -o circuits/
8888
89-
- name: Unit tests (routing + PQC WORM + contract logic + OSCAL conformance)
89+
- name: Unit tests (routing + PQC WORM + contract logic + OSCAL conformance + Annex IV dossier)
9090
run: |
9191
pytest governance_artifacts/routing/test_sara_acr_router.py -q
9292
pytest governance_artifacts/kafka/test_pqc_worm_logger_v2.py -q
9393
pytest governance_blueprint/contracts/test_contract_logic.py -q
94-
pytest tests/governance/test_governance_artifacts.py -q -k oscal
94+
pytest tests/governance/test_governance_artifacts.py -q -k "oscal or annex"
9595
9696
- name: Run runnable assurance suite
9797
run: bash governance_artifacts/run_runnable_assurance.sh
9898

9999
- name: 2028 pilot acceptance-gate checklist
100100
run: python3 governance_artifacts/pilot/run_pilot_acceptance_gates.py
101101

102+
- name: Assemble Annex IV dossier (live evidence) and upload
103+
run: python3 governance_artifacts/oscal/generate_annex_iv_dossier.py
104+
105+
- name: Upload Annex IV dossier artifact
106+
uses: actions/upload-artifact@v4
107+
with:
108+
name: annex-iv-dossier
109+
path: governance_artifacts/oscal/generated/
110+
102111
dashboard-tests:
103112
name: Dashboard security tests (next-app)
104113
runs-on: ubuntu-latest

governance_artifacts/RUNNABLE_ASSURANCE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the master reference documents assert that a control "holds," the artifacts here
1717
bash governance_artifacts/run_runnable_assurance.sh
1818
```
1919

20-
Runs all twelve checks below and fails fast on any error.
20+
Runs all thirteen checks below and fails fast on any error.
2121

2222
## What is proven, and against which control
2323

@@ -35,6 +35,7 @@ Runs all twelve checks below and fails fast on any error.
3535
| 10 | OmegaActual contract hardening — both contracts compile (0 warnings); 7 logic tests prove original exploitable & hardened blocks SEC-01..06 | solc 0.8.26 + pytest | `con-07` settlement | EU AI Act Art. 14, DORA |
3636
| 11 | Governance artifact schema validation | Python validator | manifest/schema integrity | OSCAL, evidence logging (EU AI Act Art. 12) |
3737
| 12 | OSCAL catalog conformance — every control's `tla-spec` / `rego-policy` / `circuit` / `simulator` prop resolves to a real in-repo artifact; every regime `#href` resolves to a back-matter anchor (no dangling references); `feasibility-tier ∈ {A,B,C,D}`; `freshness-sla` is a valid ISO-8601 duration (43 cross-reference checks, falsifiable) | Python (`oscal_conformance.py`) + pytest | all `con-*`, `cry-*`, `env-*`, `rte-*` | OSCAL 1.1.2 compliance-as-code integrity (EU AI Act Annex IV, NIST AI RMF, DORA, Basel, SR 11-7) |
38+
| 13 | Annex IV dossier auto-assembly — builds an OSCAL-native 8-section (A–H) EU AI Act technical-documentation dossier from the conformant catalog + live assurance evidence; refuses to run on a non-conformant catalog or unknown control id; never marks a section SATISFIED without a green runnable check | Python (`generate_annex_iv_dossier.py`) + pytest | all controls → Annex IV §A–H | EU AI Act Annex IV technical documentation (auto-assembled deliverable) |
3839

3940
### Companion reviews & plan (this iteration)
4041

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Sentinel OSCAL tooling
2+
3+
Machine-readable control catalogs (OSCAL 1.1.2) plus the tools that keep them
4+
honest and turn them into regulator deliverables.
5+
6+
## Files
7+
8+
| File | Purpose |
9+
|------|---------|
10+
| `catalog_sentinel_v24_excerpt.json` | OSCAL 1.1.2 catalog — Containment (CON) + Cryptographic-evidence (CRY) controls, with regime back-matter. |
11+
| `catalog_sentinel_v24_env_rte.json` | OSCAL 1.1.2 catalog — Confidential-computing (ENV) + MoE-routing (RTE) controls, with regime back-matter. |
12+
| `sentinel_control_catalog_v1.yaml` | Higher-level control families + regulatory mapping (legacy/companion view). |
13+
| `oscal_conformance.py` | **Conformance validator** — verifies every control's `tla-spec` / `rego-policy` / `circuit` / `simulator` prop resolves to a real in-repo artifact, every regime `#href` resolves to a back-matter anchor, `feasibility-tier ∈ {A,B,C,D}`, and `freshness-sla` is a valid ISO-8601 duration. |
14+
| `annex_iv_section_map.yaml` | Auditable map: each EU AI Act Annex IV section (A–H) → the OSCAL control ids that evidence it, plus a provider narrative. |
15+
| `generate_annex_iv_dossier.py` | **Dossier generator** — auto-assembles an OSCAL-native Annex IV technical-documentation dossier from the catalogs + live assurance evidence. |
16+
| `generated/annex_iv_dossier.{json,md}` | Sample auto-assembled dossier (regenerate any time; `generated_at` changes per run). |
17+
18+
## Run it
19+
20+
```bash
21+
# 1. Verify catalog cross-reference integrity (43 checks; falsifiable)
22+
python3 governance_artifacts/oscal/oscal_conformance.py # human
23+
python3 governance_artifacts/oscal/oscal_conformance.py --json # machine
24+
25+
# 2. Assemble the Annex IV dossier with LIVE evidence (re-runs backing checks)
26+
python3 governance_artifacts/oscal/generate_annex_iv_dossier.py
27+
# -> generated/annex_iv_dossier.json (machine-readable)
28+
# -> generated/annex_iv_dossier.md (human-readable)
29+
30+
# Faster, assembly-only (does NOT run backing checks; no section reported SATISFIED)
31+
python3 governance_artifacts/oscal/generate_annex_iv_dossier.py --no-verify
32+
```
33+
34+
Both tools are wired into `governance_artifacts/run_runnable_assurance.sh`
35+
(steps 12 and 13) and into CI.
36+
37+
## Evidence-status semantics (honesty model)
38+
39+
The dossier never marks a section satisfied on prose alone:
40+
41+
| Status | Meaning |
42+
|--------|---------|
43+
| `SATISFIED` | ≥1 mapped control whose **runnable** assurance check passed in this run. |
44+
| `PARTIAL` | Has runnable-backed controls but none passed in this run. |
45+
| `PENDING-EVIDENCE` | Mapped only to organisational / hardware-dependent evidence not yet attached (e.g. `env-02` enclave key custody), or no controls mapped. |
46+
47+
`generate_annex_iv_dossier.py` **refuses to run** if the catalog is not conformant
48+
or if `annex_iv_section_map.yaml` references a control id that does not exist in
49+
any catalog — so the dossier can only ever be built from real, resolvable controls.
50+
51+
## Integrity statement
52+
53+
These artifacts verify **assembly integrity** — that the dossier is built only
54+
from real controls and currently-passing checks. They are **not** a conformity
55+
assessment and do **not** assert that the institution is compliant with the EU AI
56+
Act. Feasibility tiers (A verified now / B needs hardware / C 2026–2030 standards /
57+
D speculative 2030–2035) are carried through to the dossier verbatim.
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# EU AI Act Annex IV technical-documentation section -> Sentinel OSCAL control map.
2+
#
3+
# This file is the auditable bridge between the eight Annex IV technical-
4+
# documentation sections (Regulation (EU) 2024/1689, Annex IV §1-9 condensed to
5+
# A-H as used by annex_iv_technical_documentation_template.json) and the
6+
# machine-readable controls in the Sentinel OSCAL catalogs.
7+
#
8+
# The dossier generator (generate_annex_iv_dossier.py) consumes this map. Each
9+
# section lists:
10+
# - controls : OSCAL control ids that provide evidence for the section.
11+
# - narrative: a short provider statement (the generator inserts it verbatim).
12+
# A section with no resolved control evidence is reported PENDING-EVIDENCE by the
13+
# generator rather than being silently marked complete.
14+
#
15+
# Control ids must exist in one of the catalogs under governance_artifacts/oscal/;
16+
# the generator fails if a referenced control id is unknown (no dangling refs).
17+
annex_iv_version: "Regulation (EU) 2024/1689, Annex IV"
18+
catalogs:
19+
- catalog_sentinel_v24_excerpt.json
20+
- catalog_sentinel_v24_env_rte.json
21+
sections:
22+
- id: A
23+
name: "General system description"
24+
narrative: >
25+
The system is the Sentinel AI Governance Stack v2.4 supervisory control
26+
plane mediating high-risk (T0/T1) foundation-model decisions for a G-SIFI.
27+
Intended purpose, deployers and risk classification are taken from the
28+
model registry; the catalog ENV/RTE/CON/CRY control groups scope the
29+
governed surface.
30+
controls: [env-01, rte-01]
31+
- id: B
32+
name: "Design and development specifications"
33+
narrative: >
34+
Routing stability (SARA/ACR) and attested admission are specified as
35+
machine-checkable invariants with named TLA+ models and a runnable
36+
simulator; design decisions are evidenced by the verified artifacts.
37+
controls: [rte-01, env-01]
38+
- id: C
39+
name: "Data requirements and governance"
40+
narrative: >
41+
Evidence envelopes and consent/lineage records are cryptographically
42+
signed and hash-chained; PQC dual-signature (cry-02) protects the
43+
governance data plane. Dataset lineage itself is an organisational record
44+
(PENDING-EVIDENCE here until the lineage export is attached).
45+
controls: [cry-02]
46+
- id: D
47+
name: "Risk management system"
48+
narrative: >
49+
Systemic-risk concentration (HHI) is bounded by a zk attestation (cry-05)
50+
and the global containment ratchet (con-04/con-07) provides the terminal
51+
risk control. The G-SRI index drives continuous risk posture.
52+
controls: [cry-05, con-04, con-07]
53+
- id: E
54+
name: "Post-market monitoring"
55+
narrative: >
56+
Continuous monitoring is provided by the 24h G-SRI monitor and the
57+
tamper-evident PQC WORM audit log (cry-02), giving an append-only,
58+
verifiable post-market record.
59+
controls: [cry-02]
60+
- id: F
61+
name: "Human oversight measures"
62+
narrative: >
63+
Containment de-escalation and terminal actuation require human dual-control
64+
quorum; Autonomous Supervisory Agents can only raise containment, never
65+
lower it (con-07 one-way ratchet), with kill-switch reachability verified
66+
(con-04).
67+
controls: [con-07, con-04]
68+
- id: G
69+
name: "Performance and limitations"
70+
narrative: >
71+
Routing-stability thresholds (entropy/load/drop) are explicit and enforced
72+
(rte-01); breaches block model-revision promotion. Known limitations and
73+
feasibility tiers are carried on each control as OSCAL props.
74+
controls: [rte-01]
75+
- id: H
76+
name: "Cybersecurity and resilience"
77+
narrative: >
78+
Hardware-attested execution (SEV-SNP/TDX + vTPM PCR_MATCH, env-01),
79+
enclave-bound PQC key custody (env-02) and post-quantum signed evidence
80+
(cry-02) provide the cybersecurity and operational-resilience posture
81+
(aligned to DORA ICT-risk and EU AI Act Art. 15).
82+
controls: [env-01, env-02, cry-02]

0 commit comments

Comments
 (0)