Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 51 additions & 3 deletions .github/workflows/runnable-assurance.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: Runnable Assurance (Sentinel v2.4)

# Executes the runnable proof obligations behind the governance artifacts:
# OPA policy tests, TLA+ TLC model check, GC-IR cross-target harness, and the
# SRC-1 Groth16 concentration-bound proof flow.
# OPA policy tests, TLA+ TLC model checks, GC-IR cross-target harness, the
# SRC-1 Groth16 concentration-bound proof + relayer pipeline, Solidity contract
# hardening, the 2028 pilot acceptance-gate checklist, and the next-app dashboard
# security test suite.

on:
push:
paths:
- 'governance_artifacts/**'
- 'governance_blueprint/**'
- 'next-app/**'
- '.github/workflows/runnable-assurance.yml'
pull_request:
paths:
- 'governance_artifacts/**'
- 'governance_blueprint/**'
- 'next-app/**'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -59,6 +65,15 @@ jobs:
working-directory: governance_artifacts/zk
run: npm install

- name: Install solc (for contract compile + zk relayer verifier)
working-directory: governance_blueprint/contracts
run: npm install

- name: Set up Terraform (for pilot IaC gate)
uses: hashicorp/setup-terraform@v3
with:
terraform_version: '1.9.8'

Comment thread
OneFineStarstuff marked this conversation as resolved.
- name: Fetch TLA+ tools
run: |
mkdir -p governance_artifacts/tla/tools
Expand All @@ -71,10 +86,43 @@ jobs:
circom circuits/src1_concentration_bound.circom --r1cs --wasm --sym --O0 -o circuits/
circom circuits/src_fair1_reason_code_check.circom --r1cs --wasm --sym --O0 -o circuits/

- name: Unit tests (routing + PQC WORM)
- name: Unit tests (routing + PQC WORM + contract logic + OSCAL conformance + Annex IV dossier)
run: |
pytest governance_artifacts/routing/test_sara_acr_router.py -q
pytest governance_artifacts/kafka/test_pqc_worm_logger_v2.py -q
pytest governance_blueprint/contracts/test_contract_logic.py -q
pytest tests/governance/test_governance_artifacts.py -q -k "oscal or annex"

- name: Run runnable assurance suite
run: bash governance_artifacts/run_runnable_assurance.sh

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

- name: Assemble Annex IV dossier (live evidence) and upload
run: python3 governance_artifacts/oscal/generate_annex_iv_dossier.py

- name: Upload Annex IV dossier artifact
uses: actions/upload-artifact@v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/runnable-assurance.yml | sed -n '100,115p'

Repository: OneFineStarstuff/OneFineStarstuff.github.io

Length of output: 844


🏁 Script executed:

curl -sL "https://api.github.com/repos/actions/upload-artifact/git/ref/tags/v4" | jq -r '
if type == "object" and .object.sha then "\"actions/upload-artifact@\(.object.sha) # v4.4.3 (latest)\"" 
else "Could not resolve SHA for tag v4" 
end
'

Repository: OneFineStarstuff/OneFineStarstuff.github.io

Length of output: 266


🏁 Script executed:

curl -sL "https://api.github.com/repos/actions/upload-artifact/commits?sha=v4&per_page=1" | jq -r '.[0].sha | "actions/upload-artifact@\(.)"'

Repository: OneFineStarstuff/OneFineStarstuff.github.io

Length of output: 246


Pin actions/upload-artifact to an immutable commit SHA.

The actions/upload-artifact reference on Line 106 uses a mutable tag (v4). Pinning to a specific SHA prevents reliance on mutable references in security-critical workflows.

🔒 Suggested fix
  - name: Upload Annex IV dossier artifact
-     uses: actions/upload-artifact@v4
+     uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.4.3
    with:
      name: annex-iv-dossier
      path: governance_artifacts/oscal/generated/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.4.3
🧰 Tools
🪛 zizmor (1.26.1)

[error] 106-106: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)

(unpinned-uses)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/runnable-assurance.yml at line 106, The workflow step
using actions/upload-artifact is pinned to a mutable tag, so update the
runnable-assurance workflow to reference actions/upload-artifact by an immutable
commit SHA instead of v4. Locate the upload step in the workflow and replace the
current uses value with the specific SHA for the same major version so the
action reference cannot change unexpectedly.

Source: Linters/SAST tools

with:
name: annex-iv-dossier
path: governance_artifacts/oscal/generated/

dashboard-tests:
name: Dashboard security tests (next-app)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install next-app deps
working-directory: next-app
run: npm install

- name: Vitest (dashboard security + governance remediation)
working-directory: next-app
run: npx vitest run
Comment thread
OneFineStarstuff marked this conversation as resolved.
4 changes: 3 additions & 1 deletion governance_artifacts/RUNNABLE_ASSURANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ the master reference documents assert that a control "holds," the artifacts here
bash governance_artifacts/run_runnable_assurance.sh
```

Runs all eleven checks below and fails fast on any error.
Runs all thirteen checks below and fails fast on any error.

## What is proven, and against which control

Expand All @@ -34,6 +34,8 @@ Runs all eleven checks below and fails fast on any error.
| 9 | PQC WORM audit log — real CRYSTALS-Dilithium (ML-DSA-65) signatures + tamper-evident hash chain + S3 Object Lock retention | Python (`dilithium-py`) + pytest | `cry-02` | DORA, EU AI Act Art. 12 logging |
| 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 |
| 11 | Governance artifact schema validation | Python validator | manifest/schema integrity | OSCAL, evidence logging (EU AI Act Art. 12) |
| 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) |
| 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) |

### Companion reviews & plan (this iteration)

Expand Down
57 changes: 57 additions & 0 deletions governance_artifacts/oscal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Sentinel OSCAL tooling

Machine-readable control catalogs (OSCAL 1.1.2) plus the tools that keep them
honest and turn them into regulator deliverables.

## Files

| File | Purpose |
|------|---------|
| `catalog_sentinel_v24_excerpt.json` | OSCAL 1.1.2 catalog — Containment (CON) + Cryptographic-evidence (CRY) controls, with regime back-matter. |
| `catalog_sentinel_v24_env_rte.json` | OSCAL 1.1.2 catalog — Confidential-computing (ENV) + MoE-routing (RTE) controls, with regime back-matter. |
| `sentinel_control_catalog_v1.yaml` | Higher-level control families + regulatory mapping (legacy/companion view). |
| `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. |
| `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. |
| `generate_annex_iv_dossier.py` | **Dossier generator** — auto-assembles an OSCAL-native Annex IV technical-documentation dossier from the catalogs + live assurance evidence. |
| `generated/annex_iv_dossier.{json,md}` | Sample auto-assembled dossier (regenerate any time; `generated_at` changes per run). |

## Run it

```bash
# 1. Verify catalog cross-reference integrity (43 checks; falsifiable)
python3 governance_artifacts/oscal/oscal_conformance.py # human
python3 governance_artifacts/oscal/oscal_conformance.py --json # machine

# 2. Assemble the Annex IV dossier with LIVE evidence (re-runs backing checks)
python3 governance_artifacts/oscal/generate_annex_iv_dossier.py
# -> generated/annex_iv_dossier.json (machine-readable)
# -> generated/annex_iv_dossier.md (human-readable)

# Faster, assembly-only (does NOT run backing checks; no section reported SATISFIED)
python3 governance_artifacts/oscal/generate_annex_iv_dossier.py --no-verify
```

Both tools are wired into `governance_artifacts/run_runnable_assurance.sh`
(steps 12 and 13) and into CI.

## Evidence-status semantics (honesty model)

The dossier never marks a section satisfied on prose alone:

| Status | Meaning |
|--------|---------|
| `SATISFIED` | ≥1 mapped control whose **runnable** assurance check passed in this run. |
| `PARTIAL` | Has runnable-backed controls but none passed in this run. |
| `PENDING-EVIDENCE` | Mapped only to organisational / hardware-dependent evidence not yet attached (e.g. `env-02` enclave key custody), or no controls mapped. |

`generate_annex_iv_dossier.py` **refuses to run** if the catalog is not conformant
or if `annex_iv_section_map.yaml` references a control id that does not exist in
any catalog — so the dossier can only ever be built from real, resolvable controls.

## Integrity statement

These artifacts verify **assembly integrity** — that the dossier is built only
from real controls and currently-passing checks. They are **not** a conformity
assessment and do **not** assert that the institution is compliant with the EU AI
Act. Feasibility tiers (A verified now / B needs hardware / C 2026–2030 standards /
D speculative 2030–2035) are carried through to the dossier verbatim.
82 changes: 82 additions & 0 deletions governance_artifacts/oscal/annex_iv_section_map.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# EU AI Act Annex IV technical-documentation section -> Sentinel OSCAL control map.
#
# This file is the auditable bridge between the eight Annex IV technical-
# documentation sections (Regulation (EU) 2024/1689, Annex IV §1-9 condensed to
# A-H as used by annex_iv_technical_documentation_template.json) and the
# machine-readable controls in the Sentinel OSCAL catalogs.
#
# The dossier generator (generate_annex_iv_dossier.py) consumes this map. Each
# section lists:
# - controls : OSCAL control ids that provide evidence for the section.
# - narrative: a short provider statement (the generator inserts it verbatim).
# A section with no resolved control evidence is reported PENDING-EVIDENCE by the
# generator rather than being silently marked complete.
#
# Control ids must exist in one of the catalogs under governance_artifacts/oscal/;
# the generator fails if a referenced control id is unknown (no dangling refs).
annex_iv_version: "Regulation (EU) 2024/1689, Annex IV"
catalogs:
- catalog_sentinel_v24_excerpt.json
- catalog_sentinel_v24_env_rte.json
sections:
- id: A
name: "General system description"
narrative: >
The system is the Sentinel AI Governance Stack v2.4 supervisory control
plane mediating high-risk (T0/T1) foundation-model decisions for a G-SIFI.
Intended purpose, deployers and risk classification are taken from the
model registry; the catalog ENV/RTE/CON/CRY control groups scope the
governed surface.
controls: [env-01, rte-01]
- id: B
name: "Design and development specifications"
narrative: >
Routing stability (SARA/ACR) and attested admission are specified as
machine-checkable invariants with named TLA+ models and a runnable
simulator; design decisions are evidenced by the verified artifacts.
controls: [rte-01, env-01]
- id: C
name: "Data requirements and governance"
narrative: >
Evidence envelopes and consent/lineage records are cryptographically
signed and hash-chained; PQC dual-signature (cry-02) protects the
governance data plane. Dataset lineage itself is an organisational record
(PENDING-EVIDENCE here until the lineage export is attached).
controls: [cry-02]
- id: D
name: "Risk management system"
narrative: >
Systemic-risk concentration (HHI) is bounded by a zk attestation (cry-05)
and the global containment ratchet (con-04/con-07) provides the terminal
risk control. The G-SRI index drives continuous risk posture.
controls: [cry-05, con-04, con-07]
- id: E
name: "Post-market monitoring"
narrative: >
Continuous monitoring is provided by the 24h G-SRI monitor and the
tamper-evident PQC WORM audit log (cry-02), giving an append-only,
verifiable post-market record.
controls: [cry-02]
- id: F
name: "Human oversight measures"
narrative: >
Containment de-escalation and terminal actuation require human dual-control
quorum; Autonomous Supervisory Agents can only raise containment, never
lower it (con-07 one-way ratchet), with kill-switch reachability verified
(con-04).
controls: [con-07, con-04]
- id: G
name: "Performance and limitations"
narrative: >
Routing-stability thresholds (entropy/load/drop) are explicit and enforced
(rte-01); breaches block model-revision promotion. Known limitations and
feasibility tiers are carried on each control as OSCAL props.
controls: [rte-01]
- id: H
name: "Cybersecurity and resilience"
narrative: >
Hardware-attested execution (SEV-SNP/TDX + vTPM PCR_MATCH, env-01),
enclave-bound PQC key custody (env-02) and post-quantum signed evidence
(cry-02) provide the cybersecurity and operational-resilience posture
(aligned to DORA ICT-risk and EU AI Act Art. 15).
controls: [env-01, env-02, cry-02]
30 changes: 29 additions & 1 deletion governance_artifacts/oscal/catalog_sentinel_v24_env_rte.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,34 @@
}
]
}
]
],
"back-matter": {
"resources": [
{
"uuid": "eu-ai-act-art-15-robustness",
"title": "EU AI Act Article 15 — Accuracy, robustness and cybersecurity",
"props": [{"name": "regime", "value": "EU AI Act"}, {"name": "anchor", "value": "eu-ai-act-art-15-robustness"}],
"remarks": "Regulation (EU) 2024/1689, Art. 15. Accuracy/robustness/cybersecurity for high-risk AI systems. Feasibility Tier A."
},
{
"uuid": "dora-ict-risk",
"title": "DORA — ICT risk management framework",
"props": [{"name": "regime", "value": "DORA"}, {"name": "anchor", "value": "dora-ict-risk"}],
"remarks": "Regulation (EU) 2022/2554, Ch. II (Arts. 5-16). ICT risk management framework and controls. Feasibility Tier A."
},
{
"uuid": "nist-ai-rmf-measure",
"title": "NIST AI RMF 1.0 — MEASURE function",
"props": [{"name": "regime", "value": "NIST AI RMF"}, {"name": "anchor", "value": "nist-ai-rmf-measure"}],
"remarks": "NIST AI 100-1 (Jan 2023), MEASURE function (MEASURE 2.x assessment of trustworthiness characteristics). Feasibility Tier A."
},
{
"uuid": "sr-11-7-model-risk",
"title": "SR 11-7 — Supervisory guidance on model risk management",
"props": [{"name": "regime", "value": "Federal Reserve SR 11-7"}, {"name": "anchor", "value": "sr-11-7-model-risk"}],
"remarks": "Federal Reserve SR 11-7 / OCC 2011-12. Model development, validation, and governance. Feasibility Tier A."
}
]
}
}
}
54 changes: 53 additions & 1 deletion governance_artifacts/oscal/catalog_sentinel_v24_excerpt.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,58 @@
}
]
}
]
],
"back-matter": {
"resources": [
{
"uuid": "eu-ai-act-art-14",
"title": "EU AI Act Article 14 — Human oversight",
"props": [{"name": "regime", "value": "EU AI Act"}, {"name": "anchor", "value": "eu-ai-act-art-14"}],
"remarks": "Regulation (EU) 2024/1689, Art. 14. Human oversight measures for high-risk AI systems. Feasibility Tier A."
},
{
"uuid": "eu-ai-act-art-12-logging",
"title": "EU AI Act Article 12 — Record-keeping / automatic logging",
"props": [{"name": "regime", "value": "EU AI Act"}, {"name": "anchor", "value": "eu-ai-act-art-12-logging"}],
"remarks": "Regulation (EU) 2024/1689, Art. 12. Automatic recording of events (logs) over the system lifetime. Feasibility Tier A."
},
{
"uuid": "dora-resilience-testing",
"title": "DORA — Digital operational resilience testing",
"props": [{"name": "regime", "value": "DORA"}, {"name": "anchor", "value": "dora-resilience-testing"}],
"remarks": "Regulation (EU) 2022/2554, Ch. IV (Arts. 24-27). Advanced testing including TLPT for critical functions. Feasibility Tier A."
},
{
"uuid": "dora-ict-risk",
"title": "DORA — ICT risk management framework",
"props": [{"name": "regime", "value": "DORA"}, {"name": "anchor", "value": "dora-ict-risk"}],
"remarks": "Regulation (EU) 2022/2554, Ch. II (Arts. 5-16). ICT risk management framework and controls. Feasibility Tier A."
},
{
"uuid": "basel-op-risk",
"title": "Basel III/IV — Operational risk / SMA",
"props": [{"name": "regime", "value": "Basel III/IV"}, {"name": "anchor", "value": "basel-op-risk"}],
"remarks": "BCBS d424 / d457. Standardised Measurement Approach for operational risk capital, model-risk linkage. Feasibility Tier A."
},
{
"uuid": "sr-26-2-scenario-killswitch",
"title": "Supervisory scenario — kill-switch actuation (SR 26-2 style)",
"props": [{"name": "regime", "value": "Supervisory scenario"}, {"name": "anchor", "value": "sr-26-2-scenario-killswitch"}],
"remarks": "Design fixture: a supervisory-stress scenario exercising dual-path kill-switch actuation. Feasibility Tier C (anticipated supervisory expectation, not a current numbered rule)."
},
{
"uuid": "gaira-systemic-telemetry",
"title": "GAIRA systemic-telemetry attestation (design fixture)",
"props": [{"name": "regime", "value": "GAIRA"}, {"name": "anchor", "value": "gaira-systemic-telemetry"}],
"remarks": "Speculative future Global AI Risk Authority telemetry-attestation obligation. Feasibility Tier D (2030-2035 horizon)."
},
{
"uuid": "icgc-gacp-level-2",
"title": "ICGC/GACP containment assurance Level 2 (design fixture)",
"props": [{"name": "regime", "value": "ICGC/GACP"}, {"name": "anchor", "value": "icgc-gacp-level-2"}],
"remarks": "Speculative International Compute Governance Compact assurance level. Feasibility Tier D (2030-2035 horizon)."
}
]
}
}
}
Loading
Loading