Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
feat(supply-chain): rotate installer signing keys to secrets-only custody
Ruben Lütke037c0cbd3210
diff --git a/.githooks/pre-commit b/.githooks/pre-commitindex 6cd8983755..91471e26c9 100755--- a/.githooks/pre-commit+++ b/.githooks/pre-commit@@ -65,4 +65,23 @@ if [ -f "$lang" ]; thenfifi+# --- PRIVATE-KEY gate (FAIL-CLOSED) -------------------------------------------+# Signing private keys and the retired signing passphrase must NEVER be+# committed — they live only in GitHub Actions secrets. Catches a full PEM+# PRIVATE KEY block, a *.key/*.key.enc file, or a WAVE2_CEREMONY_PASSPHRASE=+# <value> line in the STAGED changes (the demo passphrase leaked into 14 public+# snapshots; this is the guard for that class). rc 1 = confirmed block.+privkey="scripts/ci/check_no_private_keys.py"+if [ -f "$privkey" ]; then+ "$PY" "$privkey" --staged </dev/null+ if [ "$?" -eq 1 ]; then+ echo ""+ echo "pre-commit BLOCKED: PRIVATE-KEY gate — key material in staged changes."+ echo " Signing private keys live ONLY in GitHub Actions secrets, never in"+ echo " the repo. Remove the key/passphrase shown above (public keys are fine)."+ echo " Bypass once with: git commit --no-verify"+ exit 1+ fi+fi+exit 0diff --git a/.githooks/pre-push b/.githooks/pre-pushindex 007ffdc1fa..2bf3716ee0 100755--- a/.githooks/pre-push+++ b/.githooks/pre-push@@ -135,6 +135,22 @@ if [ -f "$docs_privacy_gate" ]; thenfifi+# --- 5b) PRIVATE-KEY gate (FAIL-CLOSED) ---------------------------------------+# Signing private keys (and the retired signing passphrase) must NEVER enter the+# repo — they live ONLY in GitHub Actions secrets (WAVE2_OFFLINE_KEY_B64 /+# WAVE4_MLDSA65_KEY_B64). Blocks a full PEM PRIVATE KEY block, a tracked+# *.key/*.key.enc file, or a WAVE2_CEREMONY_PASSPHRASE=<value> line. The demo+# passphrase once leaked into 14 public snapshots; this guards that class.+# Public keys are fine. Stdlib + git only, so it runs anywhere the hook does.+privkey_gate="scripts/ci/check_no_private_keys.py"+if [ -f "$privkey_gate" ]; then+ "$PY" "$privkey_gate" </dev/null+ if [ "$?" -ne 0 ]; then+ status=1+ privkey_hit=1+ fi+fi+# --- 6) REQUIREMENTS SYNC gate (FAIL-CLOSED) ----------------------------------# requirements.in (source for the hash-pinned requirements.txt lockfile) must# mirror pyproject.toml [project].dependencies exactly. When they drift, an@@ -214,6 +230,11 @@ if [ "$status" -ne 0 ]; thenecho " python scripts/ci/docs_privacy_scan.py --fix <file>"echo " or run the docs-privacy-reviewer sub-agent for a semantic pass."fi+ if [ "${privkey_hit:-0}" -ne 0 ]; then+ echo "pre-push BLOCKED: PRIVATE-KEY gate (private key / passphrase in the tree)."+ echo " Signing private keys live ONLY in GitHub Actions secrets, never in the"+ echo " repo. Remove the key material shown above (public keys are fine)."+ fiif [ "${reqsync_hit:-0}" -ne 0 ]; thenecho "pre-push BLOCKED: REQUIREMENTS SYNC gate (requirements.in != pyproject deps)."echo " See the diff above. Fix requirements.in, then regenerate the lockfile:"diff --git a/.github/workflows/sign-installer.yml b/.github/workflows/sign-installer.ymlindex 1f68ca8952..f2a03cef91 100644--- a/.github/workflows/sign-installer.yml+++ b/.github/workflows/sign-installer.yml@@ -14,10 +14,10 @@# to this workflow's identity. Signature + cert written to disk.# Cosign records the signature in Rekor (transparency log) and we# independently re-verify Rekor inclusion afterwards.-# e. Wave 2 — offline-ceremony Ed25519: decrypts the offline-ceremony-# private key with the WAVE2_CEREMONY_PASSPHRASE secret and produces-# a second signature per artifact. Independently re-verifies. The-# decrypted key is scrubbed from the runner in an `if: always()` step.+# e. Wave 2 — offline-ceremony Ed25519: materializes the offline-+# ceremony private key from the WAVE2_OFFLINE_KEY_B64 secret and+# produces a second signature per artifact. Independently re-verifies.+# The key is scrubbed from the runner in an `if: always()` step.# f. Uploads the signed artifact bundle (install/*, .sig, .pem,# .bundle, .cosign.sig, checksums.txt) as a workflow artifact so the# `release` job can attach it to the Release. Also exposes a@@ -51,7 +51,10 @@ on:tags:- "v*.*.*"-# No secrets needed. Keyless signing uses OIDC.+# Wave 1 (keyless) needs no secrets — it uses OIDC. Wave 2 (Ed25519) and+# Wave 4 (ML-DSA-65) read their PRIVATE KEYS from the WAVE2_OFFLINE_KEY_B64+# and WAVE4_MLDSA65_KEY_B64 secrets (base64 of the PEM); the keys never live+# in the repo, not even encrypted.# id-token=write is required by both Sigstore Fulcio (Wave 1) and by the# slsa-github-generator reusable workflow (Wave 3 — it mints its OWN OIDC# token inside the isolated `provenance` job, but the caller workflow must@@ -362,63 +365,61 @@ jobs:# The Wave 1 keyless signature proves "GitHub Actions in this repo at# this tag signed this blob" (Fulcio OIDC, ephemeral cert, Rekor).# The Wave 2 key-bound signature adds an independent axis: an Ed25519- # private key generated in an offline ceremony, stored encrypted at- # rest in `install/keys/offline-ceremony.key.enc` (AES-256-CBC,- # PBKDF2-HMAC-SHA256, 600 000 iterations), with the matching public- # key checked into `install/keys/offline-ceremony.pub`.+ # private key whose PUBLIC half is checked into+ # `install/keys/offline-ceremony.pub` and inlined into the verifier.+ # The PRIVATE half lives ONLY in the WAVE2_OFFLINE_KEY_B64 GitHub+ # Actions secret (base64 of the PKCS#8 PEM) — never in the repo, not+ # even encrypted. The preceding step materializes it into RUNNER_TEMP.#- # The verifier (install-verify.sh / .ps1) will require BOTH- # signatures from this release forward — Wave-1-only artifacts are- # treated as compromised. That is why this step MUST fail fast if- # the passphrase secret is missing (no silent fallback to Wave-1).- #- # Production passphrase lives in the `WAVE2_CEREMONY_PASSPHRASE`- # GitHub Actions repo secret. For the foundation/demo state, the- # passphrase is also documented in install/TRUST_ROOT.md §3.3 —- # rotating to production means setting the secret AND deleting that- # section of TRUST_ROOT.md (never both at the same time; see §3.3).+ # The verifier (install-verify.sh / .ps1) requires BOTH signatures+ # from this release forward — Wave-1-only artifacts are treated as+ # compromised. That is why the fail-fast step above refuses to proceed+ # if either key secret is missing (no silent fallback to Wave-1).# ------------------------------------------------------------------- - name: Fail fast if Wave 2 passphrase secret is unset+ - name: Fail fast if the private signing-key secrets are unsetenv:- WAVE2_CEREMONY_PASSPHRASE: ${{ secrets.WAVE2_CEREMONY_PASSPHRASE }}+ WAVE2_OFFLINE_KEY_B64: ${{ secrets.WAVE2_OFFLINE_KEY_B64 }}+ WAVE4_MLDSA65_KEY_B64: ${{ secrets.WAVE4_MLDSA65_KEY_B64 }}run: |set -euo pipefail- if [ -z "${WAVE2_CEREMONY_PASSPHRASE:-}" ]; then- echo "::error::WAVE2_CEREMONY_PASSPHRASE secret is not set. Wave-2 key-bound signing is mandatory; the verifier requires both signatures. Refusing to fall back to Wave-1-only mode."+ # Wave-2 (Ed25519) and Wave-4 (ML-DSA-65) key-bound signing are+ # mandatory; the verifier requires both signatures. The private+ # keys live ONLY in GitHub Actions secrets (base64 of the PEM),+ # never in the repo — not even encrypted (see+ # docs/supply-chain/wave2-key-ceremony.md). Refuse to proceed with+ # no silent fall-back to Wave-1-only if either secret is missing.+ missing=""+ [ -z "${WAVE2_OFFLINE_KEY_B64:-}" ] && missing="${missing} WAVE2_OFFLINE_KEY_B64"+ [ -z "${WAVE4_MLDSA65_KEY_B64:-}" ] && missing="${missing} WAVE4_MLDSA65_KEY_B64"+ if [ -n "$missing" ]; then+ echo "::error::Missing required signing-key secret(s):${missing}. Set them with 'gh secret set <NAME>' (base64 of the private-key PEM). Refusing to fall back to Wave-1-only mode."exit 1fi- # Mask the secret defensively even though GitHub already masks- # registered secrets — protects against a future change that- # would route the value through a non-secret env path.- echo "::add-mask::${WAVE2_CEREMONY_PASSPHRASE}"- echo "Wave 2 passphrase secret is present (value masked)."+ echo "Both private-key secrets are present (values masked by GitHub)."- - name: Decrypt offline-ceremony key into runner temp+ - name: Materialize offline-ceremony key from secret into runner tempenv:- WAVE2_CEREMONY_PASSPHRASE: ${{ secrets.WAVE2_CEREMONY_PASSPHRASE }}+ WAVE2_OFFLINE_KEY_B64: ${{ secrets.WAVE2_OFFLINE_KEY_B64 }}run: |set -euo pipefail- # AES-256-CBC + PBKDF2-HMAC-SHA256 with 600 000 iterations must- # match the parameters used when install/keys/offline-ceremony.key.enc- # was produced. Diverging from `-iter 600000` will yield a- # silent garbage decryption that openssl reports as success but- # cosign will reject as a malformed key — fail fast either way.- #- # `-pass env:WAVE2_CEREMONY_PASSPHRASE` reads the passphrase- # from the env var WITHOUT placing it on the argv (avoids `ps`- # exposure) and WITHOUT echoing it via `cat`/here-doc.- openssl aes-256-cbc -d -pbkdf2 -iter 600000 \- -pass env:WAVE2_CEREMONY_PASSPHRASE \- -in install/keys/offline-ceremony.key.enc \- -out "${RUNNER_TEMP}/offline-ceremony.key"+ # The Wave-2 Ed25519 private key is stored as base64 of its PKCS#8+ # PEM in the WAVE2_OFFLINE_KEY_B64 secret. Decode it into+ # RUNNER_TEMP ONLY; it is scrubbed in an `if: always()` step after+ # signing. The private key is NEVER written into the repo tree and+ # never appears (even encrypted) in git history.+ printf '%s' "${WAVE2_OFFLINE_KEY_B64}" | base64 -d > "${RUNNER_TEMP}/offline-ceremony.key"chmod 600 "${RUNNER_TEMP}/offline-ceremony.key"- # Sanity: decrypted key file exists and is non-empty. Do NOT- # cat / hexdump / wc the contents — only test the size.+ # Sanity: decoded key exists, is non-empty, and is a PEM private+ # key. Do NOT cat / hexdump the contents — only structural checks.if [ ! -s "${RUNNER_TEMP}/offline-ceremony.key" ]; then- echo "::error::decrypted key file is empty or missing"+ echo "::error::decoded offline-ceremony key is empty — check the WAVE2_OFFLINE_KEY_B64 secret (must be base64 of the PEM)"+ exit 1+ fi+ if ! grep -q "BEGIN PRIVATE KEY" "${RUNNER_TEMP}/offline-ceremony.key"; then+ echo "::error::decoded offline-ceremony key is not a PEM private key — check the base64 encoding of WAVE2_OFFLINE_KEY_B64"exit 1fi- echo "Decrypted offline-ceremony key to runner temp (contents not logged)."+ echo "Offline-ceremony key materialized to runner temp (contents not logged)."- name: Sign each artifact with the offline-ceremony key (Wave 2)working-directory: out@@ -519,12 +520,11 @@ jobs:# not replacement. Migration to PQ-only completes when NIST# mandates classical retirement (likely 2030+).#- # KEY CUSTODY: identical pattern to the Wave 2 offline ceremony- # key — encrypted at rest under the same `WAVE2_CEREMONY_PASSPHRASE`- # secret. Production hardening (separate `PQ_MLDSA65_PASSPHRASE`- # secret + NitroKey ML-DSA hardware token) lands in Wave 4.1; the- # foundation reuses the Wave 2 passphrase pattern to avoid- # introducing two secret-rotation procedures on the same release.+ # KEY CUSTODY: identical pattern to the Wave 2 offline-ceremony key —+ # the PRIVATE key lives ONLY in a GitHub Actions secret+ # (WAVE4_MLDSA65_KEY_B64, base64 of the PKCS#8 PEM), never in the repo,+ # not even encrypted. Hardware-token custody (NitroKey ML-DSA) is a+ # future Wave 4.1 step.## TOOLCHAIN: ML-DSA support landed in OpenSSL 3.5.0 (April 2025).# `ubuntu-latest` (Ubuntu 24.04 LTS) ships OpenSSL 3.0.13 by@@ -593,46 +593,33 @@ jobs:fiecho "ML-DSA-65 is available in PQ openssl."- - name: Decrypt ML-DSA-65 private key into runner temp+ - name: Materialize ML-DSA-65 key from secret into runner tempenv:- WAVE2_CEREMONY_PASSPHRASE: ${{ secrets.WAVE2_CEREMONY_PASSPHRASE }}+ WAVE4_MLDSA65_KEY_B64: ${{ secrets.WAVE4_MLDSA65_KEY_B64 }}run: |set -euo pipefail- # AES-256-CBC + PBKDF2-HMAC-SHA256.+ # The Wave-4 ML-DSA-65 private key is stored as base64 of its+ # PKCS#8 PEM in the WAVE4_MLDSA65_KEY_B64 secret. Decode it into+ # RUNNER_TEMP ONLY; scrubbed after signing. Never written into the+ # repo tree and never present (even encrypted) in git history.#- # NOTE (SA-5 fix-forward #2, 2026-05-27): SA-1's foundation- # commit wrapped install/keys/pq-mldsa65.key.enc with the- # PBKDF2 default iteration count (10 000), NOT the 600 000- # value referenced in the SA-1 commentary + TRUST_ROOT.md §5.- # SA-4's signing step inherited the 600 000 number from the- # Wave-2 (offline-ceremony) precedent (which IS at 600 000 and- # works), and on the v0.5.0 tag the first run failed with- # `bad decrypt` because the iteration count must match what- # the key was wrapped with. Empirically confirmed by SA-5:- # `-iter 10000` decrypts the SA-1-committed key to a- # well-formed `OpenSSH private key (no password)` (the- # ML-DSA-65 PEM that the next step needs).- #- # The right long-term fix is to re-wrap the key at 600 000- # in a rotation ceremony and then bump this back, but that's- # a Wave-4.1 follow-up. For v0.5, align the workflow with- # the actually-shipped key material.- #- # `-pass env:WAVE2_CEREMONY_PASSPHRASE` reads the passphrase- # WITHOUT placing it on argv (avoids `ps` exposure). We use- # the PQ-pinned openssl explicitly because `aes-256-cbc` is- # available on either binary but ML-DSA `pkeyutl -sign` in- # the next step requires the 3.5.x build.- "$PQ_OPENSSL" aes-256-cbc -d -pbkdf2 -iter 10000 \- -pass env:WAVE2_CEREMONY_PASSPHRASE \- -in install/keys/pq-mldsa65.key.enc \- -out "${RUNNER_TEMP}/pq-mldsa65.key"+ # This replaces the former encrypt-at-rest scheme+ # (install/keys/pq-mldsa65.key.enc + a repo-committed passphrase),+ # which was structurally unsafe: the demo passphrase leaked into+ # 14 public snapshots. Storing the key only as a GitHub secret+ # removes the encrypted-blob-plus-passphrase attack surface+ # entirely. No `-iter`/`bad decrypt` foot-gun remains.+ printf '%s' "${WAVE4_MLDSA65_KEY_B64}" | base64 -d > "${RUNNER_TEMP}/pq-mldsa65.key"chmod 600 "${RUNNER_TEMP}/pq-mldsa65.key"if [ ! -s "${RUNNER_TEMP}/pq-mldsa65.key" ]; then- echo "::error::decrypted PQ key file is empty or missing"+ echo "::error::decoded ML-DSA-65 key is empty — check the WAVE4_MLDSA65_KEY_B64 secret (must be base64 of the PEM)"+ exit 1+ fi+ if ! grep -q "BEGIN PRIVATE KEY" "${RUNNER_TEMP}/pq-mldsa65.key"; then+ echo "::error::decoded ML-DSA-65 key is not a PEM private key — check the base64 encoding of WAVE4_MLDSA65_KEY_B64"exit 1fi- echo "Decrypted ML-DSA-65 private key to runner temp (contents not logged)."+ echo "ML-DSA-65 key materialized to runner temp (contents not logged)."- name: Sign each artifact with the ML-DSA-65 key (Wave 4 axis D)working-directory: outdiff --git a/AGENTS.md b/AGENTS.mdindex 5d4da0963a..536f47ef7a 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -101,7 +101,7 @@ Full model + module catalog: [`docs/architecture-overview.md`](docs/architecture- **8-layer dependency rule:** higher layers reach lower ones **only via protocols** (`jarvis/core/protocols.py`); lateral communication **only** via typed `frozen=True` events on `EventBus` (`jarvis/core/bus.py`) carrying `trace_id` + `timestamp_ns`. A broken subscriber is logged in `_safe_dispatch`, never propagated (AP-18).- **Plugins are structural:** under `jarvis/plugins/<group>/<name>.py`, registered via `pyproject.toml` entry-points, and **must not import `jarvis.*`** in the plugin module. After editing entry-points: `pip install -e . --no-deps`. Groups: wakeword, stt, tts, brain, harness, tool, channel.- **Streaming first:** all Brain/STT/TTS/Harness methods return `AsyncIterator[...]` (non-streaming yields one element).-- **Secrets** only via `jarvis.core.config.get_secret`: OS keyring → ENV → `.env` → local-file fallback. Never put keys in code / `jarvis.toml` / commits / `.claude/`. Voice/chat must never accept secrets (AP-2).+- **Secrets** only via `jarvis.core.config.get_secret`: OS keyring → ENV → `.env` → local-file fallback. Never put keys in code / `jarvis.toml` / commits / `.claude/`. **Installer signing PRIVATE keys live ONLY in GitHub Actions secrets — never in the repo, not even encrypted; only the PUBLIC keys ship (AP-29).** Voice/chat must never accept secrets (AP-2).- **Brain is multi-provider** — never hardcode Anthropic/Claude (AP-6); gate features on a **capability** (`supports_vision`, `supports_tools`, `can_call_tools()`), never a provider name/model id (AP-21). Persona comes from `jarvis/brain/persona_loader.py` (editable override → packaged `JARVIS_PERSONA.md`); never hardcode it.- **Router discipline (ADR-0011):** the router-tier brain is a pure dispatcher over the `ROUTER_TOOLS` frozenset (`jarvis/brain/factory.py`). No spawn tool ever enters a worker set (AP-5/AP-14). Extending `ROUTER_TOOLS` → amend ADR-0011 + `tests/unit/brain/test_routing.py`.- **Voice scrub:** brain→TTS goes through `scrub_for_voice` (`jarvis/brain/output_filter.py`) — **regex only, no LLM call** (AP-11). ADR-0010.@@ -150,6 +150,7 @@ Four tiers: `safe` / `monitor` / `ask` / `block`, priority **blacklist > whiteli| AP-26 | Put a new feature's init/import on the startup critical path (before `APP_INTERACTIVE` / `VOICE_USABLE`) — a synchronous load in `_run_backend`, the `WebServer` ctor, `_start_speech_and_orb`, or a module-level heavy import | Boot creep: every feature "only adds a second" until the app takes 30+ s to become usable (TTU forensic 2026-07-02: one wake change put a 114.7 s load cascade on boot). New subsystems hook into `_heavy_backend_bg`, a deferred registry scan, or a post-ready task; heavy imports stay lazy or get a `warmup_prefetch` daemon thread; routes answer a graceful 503/None while their subsystem warms. **Enforced fail-closed by the pre-push BOOT BUDGET gate** (`scripts/ci/check_boot_budget.py`: one real cold boot; window ≤ 8 s, voice-usable + app-interactive ≤ 20 s). Doctrine + how-to: `docs/diagnostics/BOOT-TTU-NOTES.md` || AP-27 | Suppress `stt_match` wake ghosts by tightening TRANSCRIPT CONTENT — require the bias-echo confirm's unbiased pass to reproduce the wake word, raise the phrase-matcher strictness on the confirm, or add any second content check that must contain the phrase | Kills recognition ENTIRELY, so "fires on silence" flips into "never fires". A bias-primed local Whisper (`initial_prompt=<phrase>`, needed for proper-noun recall) HALLUCINATES the phrase on silence AND GARBLES it on real speech (`'Mythos'`→`'Mütos'`/`'Hey, Mut!'`, `'Fable'`→`'Farbe'`); the unprimed base model literally cannot spell a hard custom wake — that is the whole reason the bias exists — so NO transcript-content rule separates ghost from wake without rejecting every genuine wake (live 2026-07-02: an unbiased-corroboration check made the wake "stop working at all"). The ONLY word-agnostic discriminator is raw audio ENERGY. Fix: suppress silence at the match site with the RMS gate (`RollingWhisperWake._match_min_rms`, ghost cluster ≤ 0.0043 vs quiet-mic recall 0.009); keep the bias-echo confirm PERMISSIVE ("heard any real speech → genuine", fail-open) and SKIP it on a clearly-loud window (`_ECHO_CONFIRM_SKIP_RMS`, latency). Recall guard: `tests/unit/speech/test_rolling_whisper_wake_silence_ghost.py::test_loud_wake_fires_even_when_unbiased_pass_garbles_the_hard_word` | <!-- i18n-allow: forensic quotes of the German STT-garble tokens under test -->| AP-28 | Gate a pre-push / CI check on `isinstance` against the *installed* copy of a third-party lib that CI installs **unpinned** (newest), then trust "green on my machine" | Version-skew brick: the lib's next release changes internals and the gate CRASHES or false-fails in CI while staying green on your older local version. Typer 0.26 vendored its own Click (`typer._click`), so `typer.main.get_command`'s root group + its params stopped being `isinstance` of the *external* `click.Group`/`Argument`/`Option` → the CLI-reference drift gate `AssertionError`'d on every push though it was green on local Typer 0.21 (fix 621f837a). Discriminate by CAPABILITY, never concrete type (`.commands`, Click's stable `param_type_name`). **Before anything goes PUBLIC (a push to the flagship, or the visibility flip): CI must be GREEN and every red run's cause understood + fixed — a red gate is a defect to explain, never "just noise". Reproduce the failure against the SAME unpinned versions CI installs (a throwaway venv), not your local pins.** |+| AP-29 | Commit a signing PRIVATE key — or its passphrase, or a `*.key.enc` "encrypted at rest" copy — into the repo | The installer is signed on key-bound axes (Wave 2 Ed25519, Wave 4 ML-DSA-65). The former scheme stored the encrypted private keys in-repo plus a DEMO passphrase in plaintext docs; that passphrase leaked into 14 public snapshots (v0.1.0..v0.9.1) — permanent, world-readable — so any key it wrapped is forgeable. Signing PRIVATE keys now live ONLY in GitHub Actions secrets (base64 PKCS#8 PEM: `WAVE2_OFFLINE_KEY_B64` / `WAVE4_MLDSA65_KEY_B64`), with a local backup in the maintainer's password manager; the repo holds ONLY public keys (`install/keys/*.pub*`) + their inlined verifier copies. Rotation = new keypair → `gh secret set` → swap the public keys + inline verifier blocks + fingerprints. **Enforced fail-closed by `scripts/ci/check_no_private_keys.py` (pre-commit + pre-push):** a full PEM PRIVATE KEY block, a tracked `*.key`/`*.key.enc`, or a `WAVE2_CEREMONY_PASSPHRASE=<value>` line blocks the commit/push. Doctrine: `docs/supply-chain/wave2-key-ceremony.md`. |---diff --git a/CLAUDE.md b/CLAUDE.mdindex 5d4da0963a..536f47ef7a 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -101,7 +101,7 @@ Full model + module catalog: [`docs/architecture-overview.md`](docs/architecture- **8-layer dependency rule:** higher layers reach lower ones **only via protocols** (`jarvis/core/protocols.py`); lateral communication **only** via typed `frozen=True` events on `EventBus` (`jarvis/core/bus.py`) carrying `trace_id` + `timestamp_ns`. A broken subscriber is logged in `_safe_dispatch`, never propagated (AP-18).- **Plugins are structural:** under `jarvis/plugins/<group>/<name>.py`, registered via `pyproject.toml` entry-points, and **must not import `jarvis.*`** in the plugin module. After editing entry-points: `pip install -e . --no-deps`. Groups: wakeword, stt, tts, brain, harness, tool, channel.- **Streaming first:** all Brain/STT/TTS/Harness methods return `AsyncIterator[...]` (non-streaming yields one element).-- **Secrets** only via `jarvis.core.config.get_secret`: OS keyring → ENV → `.env` → local-file fallback. Never put keys in code / `jarvis.toml` / commits / `.claude/`. Voice/chat must never accept secrets (AP-2).+- **Secrets** only via `jarvis.core.config.get_secret`: OS keyring → ENV → `.env` → local-file fallback. Never put keys in code / `jarvis.toml` / commits / `.claude/`. **Installer signing PRIVATE keys live ONLY in GitHub Actions secrets — never in the repo, not even encrypted; only the PUBLIC keys ship (AP-29).** Voice/chat must never accept secrets (AP-2).- **Brain is multi-provider** — never hardcode Anthropic/Claude (AP-6); gate features on a **capability** (`supports_vision`, `supports_tools`, `can_call_tools()`), never a provider name/model id (AP-21). Persona comes from `jarvis/brain/persona_loader.py` (editable override → packaged `JARVIS_PERSONA.md`); never hardcode it.- **Router discipline (ADR-0011):** the router-tier brain is a pure dispatcher over the `ROUTER_TOOLS` frozenset (`jarvis/brain/factory.py`). No spawn tool ever enters a worker set (AP-5/AP-14). Extending `ROUTER_TOOLS` → amend ADR-0011 + `tests/unit/brain/test_routing.py`.- **Voice scrub:** brain→TTS goes through `scrub_for_voice` (`jarvis/brain/output_filter.py`) — **regex only, no LLM call** (AP-11). ADR-0010.@@ -150,6 +150,7 @@ Four tiers: `safe` / `monitor` / `ask` / `block`, priority **blacklist > whiteli| AP-26 | Put a new feature's init/import on the startup critical path (before `APP_INTERACTIVE` / `VOICE_USABLE`) — a synchronous load in `_run_backend`, the `WebServer` ctor, `_start_speech_and_orb`, or a module-level heavy import | Boot creep: every feature "only adds a second" until the app takes 30+ s to become usable (TTU forensic 2026-07-02: one wake change put a 114.7 s load cascade on boot). New subsystems hook into `_heavy_backend_bg`, a deferred registry scan, or a post-ready task; heavy imports stay lazy or get a `warmup_prefetch` daemon thread; routes answer a graceful 503/None while their subsystem warms. **Enforced fail-closed by the pre-push BOOT BUDGET gate** (`scripts/ci/check_boot_budget.py`: one real cold boot; window ≤ 8 s, voice-usable + app-interactive ≤ 20 s). Doctrine + how-to: `docs/diagnostics/BOOT-TTU-NOTES.md` || AP-27 | Suppress `stt_match` wake ghosts by tightening TRANSCRIPT CONTENT — require the bias-echo confirm's unbiased pass to reproduce the wake word, raise the phrase-matcher strictness on the confirm, or add any second content check that must contain the phrase | Kills recognition ENTIRELY, so "fires on silence" flips into "never fires". A bias-primed local Whisper (`initial_prompt=<phrase>`, needed for proper-noun recall) HALLUCINATES the phrase on silence AND GARBLES it on real speech (`'Mythos'`→`'Mütos'`/`'Hey, Mut!'`, `'Fable'`→`'Farbe'`); the unprimed base model literally cannot spell a hard custom wake — that is the whole reason the bias exists — so NO transcript-content rule separates ghost from wake without rejecting every genuine wake (live 2026-07-02: an unbiased-corroboration check made the wake "stop working at all"). The ONLY word-agnostic discriminator is raw audio ENERGY. Fix: suppress silence at the match site with the RMS gate (`RollingWhisperWake._match_min_rms`, ghost cluster ≤ 0.0043 vs quiet-mic recall 0.009); keep the bias-echo confirm PERMISSIVE ("heard any real speech → genuine", fail-open) and SKIP it on a clearly-loud window (`_ECHO_CONFIRM_SKIP_RMS`, latency). Recall guard: `tests/unit/speech/test_rolling_whisper_wake_silence_ghost.py::test_loud_wake_fires_even_when_unbiased_pass_garbles_the_hard_word` | <!-- i18n-allow: forensic quotes of the German STT-garble tokens under test -->| AP-28 | Gate a pre-push / CI check on `isinstance` against the *installed* copy of a third-party lib that CI installs **unpinned** (newest), then trust "green on my machine" | Version-skew brick: the lib's next release changes internals and the gate CRASHES or false-fails in CI while staying green on your older local version. Typer 0.26 vendored its own Click (`typer._click`), so `typer.main.get_command`'s root group + its params stopped being `isinstance` of the *external* `click.Group`/`Argument`/`Option` → the CLI-reference drift gate `AssertionError`'d on every push though it was green on local Typer 0.21 (fix 621f837a). Discriminate by CAPABILITY, never concrete type (`.commands`, Click's stable `param_type_name`). **Before anything goes PUBLIC (a push to the flagship, or the visibility flip): CI must be GREEN and every red run's cause understood + fixed — a red gate is a defect to explain, never "just noise". Reproduce the failure against the SAME unpinned versions CI installs (a throwaway venv), not your local pins.** |+| AP-29 | Commit a signing PRIVATE key — or its passphrase, or a `*.key.enc` "encrypted at rest" copy — into the repo | The installer is signed on key-bound axes (Wave 2 Ed25519, Wave 4 ML-DSA-65). The former scheme stored the encrypted private keys in-repo plus a DEMO passphrase in plaintext docs; that passphrase leaked into 14 public snapshots (v0.1.0..v0.9.1) — permanent, world-readable — so any key it wrapped is forgeable. Signing PRIVATE keys now live ONLY in GitHub Actions secrets (base64 PKCS#8 PEM: `WAVE2_OFFLINE_KEY_B64` / `WAVE4_MLDSA65_KEY_B64`), with a local backup in the maintainer's password manager; the repo holds ONLY public keys (`install/keys/*.pub*`) + their inlined verifier copies. Rotation = new keypair → `gh secret set` → swap the public keys + inline verifier blocks + fingerprints. **Enforced fail-closed by `scripts/ci/check_no_private_keys.py` (pre-commit + pre-push):** a full PEM PRIVATE KEY block, a tracked `*.key`/`*.key.enc`, or a `WAVE2_CEREMONY_PASSPHRASE=<value>` line blocks the commit/push. Doctrine: `docs/supply-chain/wave2-key-ceremony.md`. |---diff --git a/docs/supply-chain/red-team-log.md b/docs/supply-chain/red-team-log.mdindex 0809e3876f..12ea830e5f 100644--- a/docs/supply-chain/red-team-log.md+++ b/docs/supply-chain/red-team-log.md@@ -416,7 +416,7 @@ Sample attacker fingerprint generated on 2026-05-27 run:```[3/8] Fetching install.sh + Fulcio trio + offline-ceremony signature from release v0.3.0-supplychain-wave2...install.sh + .sig + .pem + .bundle + .cosign.sig downloaded- offline-ceremony pubkey fingerprint OK (40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee)+ offline-ceremony pubkey fingerprint OK (1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a)[4/8] Verifying Fulcio keyless signature (axis A — GitHub Actions OIDC)...Verified OK@@ -428,7 +428,7 @@ Error: failed to verify signaturemain.go:74: error during command execution: failed to verify signatureaxis B: offline-ceremony signature check FAILED.install.sh.cosign.sig does NOT validate against the pinned Ed25519 pubkey- (fingerprint 40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee).+ (fingerprint 1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a).refusing to execute — Wave 2 demands BOTH axes to pass.R_WAVE2_B_EXIT=1```@@ -622,9 +622,9 @@ sides, compare to the pinned constant baked into `install-verify.sh`.$ openssl genpkey -algorithm ML-DSA-65 -out attacker.key$ openssl pkey -in attacker.key -pubout -out attacker.pub.pem- $ PINNED=30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a+ $ PINNED=db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073$ openssl pkey -in pq-mldsa65.pub.pem -pubin -outform DER | openssl dgst -sha256- # 30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a ← matches PINNED+ # db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073 ← matches PINNED$ openssl pkey -in attacker.pub.pem -pubin -outform DER | openssl dgst -sha256# 701c09495ac239bb2f8e4387f099789d1cf0af8435598ed879c948e608c15e3b ← MISMATCH@@ -726,12 +726,15 @@ Four fix-forwards landed during the v0.5.0 cut:(which was built specifically as a defense in TRUST_ROOT §5.4)caught it on the first attempt. Fixed by re-pinning to theupstream-published value.-2. **#2** (`#26` / `c611cb1`) — SA-1's actual key wrap used PBKDF2- default `-iter 10000`, while the SA-1 commentary and TRUST_ROOT.md- §5 both claimed `-iter 600000`. The decrypt step's `bad decrypt`- error is a fail-closed posture (refuse-to-decrypt over- silent-garbage-decrypt). Pinned to Wave 4.1 alongside HSM- migration.+2. **#2** (`#26` / `c611cb1`) — under the since-removed encrypt-at-rest+ scheme, SA-1's actual key wrap used a lower KDF iteration count than+ the SA-1 commentary and TRUST_ROOT.md §5 claimed; the decrypt step's+ `bad decrypt` error was a fail-closed posture (refuse-to-decrypt over+ silent-garbage-decrypt). **Moot as of the 2026-07-03 rotation:** the+ signing keys are no longer wrapped or committed at all — they live+ only as GitHub Actions secrets (`WAVE2_OFFLINE_KEY_B64`,+ `WAVE4_MLDSA65_KEY_B64`, base64 PKCS#8 PEM), so there is no key-wrap+ iteration count to get wrong.3. **#3** (`#27` / `3ae740a`) — On hosts with OpenSSL < 3.5(transition-mode hosts, e.g. Ubuntu 24.04 LTS shipping 3.0.13),the `openssl pkey -pubin` parse fails because the binary doesn't@@ -747,6 +750,8 @@ Four fix-forwards landed during the v0.5.0 cut:verifier can tell pkey-parse-failed from valid-but-different.None of the four fix-forwards re-opens a classical-axis attack-surface. Wave 4.1 follow-ups: PQ key rotation + HSM migration +-iteration-count bump back to 600 000.+surface. Wave 4.1 follow-up: hardware-token (HSM) custody of the+signing keys. (The former "iteration-count bump" item is obsolete — the+2026-07-03 rotation removed encrypt-at-rest entirely; the private keys+now live only as GitHub Actions secrets.)diff --git a/docs/supply-chain/threat-model.md b/docs/supply-chain/threat-model.mdindex 6bc260e350..dbb3b67c53 100644--- a/docs/supply-chain/threat-model.md+++ b/docs/supply-chain/threat-model.md@@ -229,17 +229,17 @@ treated as code, not as marketing.## 7. Wave 2 — multi-axis signing (FOUNDATION COMPLETE, full workflow integration pending in follow-up sub-agents)> Status: foundation step landed on branch `feat/wave2-foundation`. The-> keypair, encrypted private key, TUF root metadata with `threshold=2`,-> and the ceremony documentation are committed. The workflow change that-> actually mints the offline-ceremony signature on each release, and the-> verifier change that demands 2-of-2 at install time, are scoped for-> follow-up sub-agents Wave-2-SA-2 (verifier), Wave-2-SA-3 (workflow),-> Wave-2-SA-4 (tests + red-team), Wave-2-SA-5 (integration PR).+> keypair, the committed public key, TUF root metadata with `threshold=2`,+> and the ceremony documentation are in place; the private key lives only+> as the `WAVE2_OFFLINE_KEY_B64` GitHub Actions secret, never committed. The+> workflow change that actually mints the offline-ceremony signature on each+> release, and the verifier change that demands 2-of-2 at install time, are+> scoped for follow-up sub-agents Wave-2-SA-2 (verifier), Wave-2-SA-3+> (workflow), Wave-2-SA-4 (tests + red-team), Wave-2-SA-5 (integration PR).>> Companion documents:-> - `install/TRUST_ROOT.md` §3 — user-facing trust roots + passphrase-> disclosure (the demo passphrase is committed in §3.3 with full-> honesty about the production migration path).+> - `install/TRUST_ROOT.md` §3 — user-facing trust roots + key custody (the+> private key is held only as a GitHub Actions secret; §3.3).> - `docs/supply-chain/wave2-key-ceremony.md` — exhaustive ceremony log> + verifier contract + recovery procedure.@@ -281,9 +281,10 @@ Re-walking the scenarios from §3 with Wave 2 active:is still legitimate, so cosign accepts. **Wave 2 mitigation:** if theattacker's malicious workflow step *can* mint the cosign signature(the workflow's OIDC identity), it **cannot** mint the offline-- ceremony signature — the offline private key is stored outside the- runner (production posture) or its passphrase is a separate secret- (transitional posture). The verifier refuses.+ ceremony signature — minting it needs the Ed25519 private key, which is+ not the workflow's OIDC identity. Today that key lives in a separate+ GitHub Actions secret (`WAVE2_OFFLINE_KEY_B64`); the hardware-token+ endgame keeps it off the runner entirely. The verifier refuses.- **Residual gap closed:** the case where the attacker compromises boththe Action and the GitHub Actions secret store simultaneously is theremaining residual. That is Wave 3 scope (HSM-backed signing outside@@ -294,7 +295,7 @@ Re-walking the scenarios from §3 with Wave 2 active:release, forensic recovery is possible after disclosure. **Wave 2mitigation:** if the offline-ceremony key is held by a *different*maintainer (or the same maintainer's separately-secured laptop, with- the passphrase in a hardware token), the xz-utils attacker — who+ the private key in a hardware token), the xz-utils attacker — whocultivated trust *only* over the GitHub account — cannot mint thesecond signature. **The xz-utils attack as historically executedfails against a Wave-2 verifier.**@@ -346,44 +347,47 @@ Re-walking the scenarios from §3 with Wave 2 active:tracked; the offline-ceremony key can be replaced with Ed448 +ML-DSA-65 dual-signing at Wave 4. Out of scope here.4. **Recovery from loss of the offline-ceremony private key.** Wave 2- has no automated recovery; loss of the key + passphrase means the- maintainer cannot mint new releases until a fresh TUF root version- is bootstrapped to every installed client. This bootstrap problem+ has no automated recovery; loss of the key (both the GitHub secret and+ the password-manager backup) means the maintainer cannot mint new+ releases until a fresh TUF root version is bootstrapped to every+ installed client. This bootstrap problemis itself Wave 3 scope (signed TUF refresh metadata channel). Therecovery procedure is documented in `wave2-key-ceremony.md` §5.5. **In-toto / SLSA L3 / reproducible builds.** Wave 2 proves *who*signed; it does not prove *what they signed matches the sourcecommit*. Wave 3 ships in-toto layout + cross-attesting rebuilders.-### 7.4 The demo-posture honest disclosure--The committed branch includes the **decryption passphrase** for the-offline-ceremony private key, in `install/TRUST_ROOT.md` §3.3, in plain-text. A reader of this public repository can extract the private key.--This is **intentional** for the foundation step:--- The Wave 2 *architectural* claim is that the verifier machinery- (TUF root with threshold=2, dual signature paths, separate-axis- pin) is in place and exercised end-to-end. That claim is fully- delivered by this branch regardless of where the passphrase lives.-- The Wave 2 *operational* claim — that the production deployment- derives the second axis's key material in a genuinely-air-gapped- ceremony with hardware-token-backed custody — is **not yet** made- by this branch. The migration path is documented in- `wave2-key-ceremony.md` §4 and is part of Wave-2-SA-3's brief.-- Honesty bar: **`install/TRUST_ROOT.md` §3.3 must contain the literal- passphrase line so any reader can verify both halves are present.**- Hiding the passphrase while *claiming* an offline ceremony was- performed would be the worst-of-both-worlds outcome — pretending- to have security one doesn't actually have.--When the production passphrase is moved to the GitHub Actions secret-`WAVE2_CEREMONY_PASSPHRASE` (per the migration in-`wave2-key-ceremony.md` §4.2), the §3.3 disclosure is replaced with a-pointer to the secret name and the date of the migration. Until that-happens, the passphrase remains in §3.3 as the truthful description of-the system as actually deployed.+### 7.4 Key custody — private key only in a GitHub Actions secret++As of the 2026-07-03 key rotation, the offline-ceremony **private** key+is not in this repository — not in plaintext, and not encrypted. It+exists only as a GitHub Actions secret (`WAVE2_OFFLINE_KEY_B64`, the+base64 of the PKCS#8 PEM) plus a local backup in the maintainer's+password manager. The repo carries only the **public** key+(`install/keys/offline-ceremony.pub`) and its inlined copy in the+verifier scripts. There is no decryption passphrase, because there is no+encrypted key file to decrypt.++This preserves the Wave 2 architecture unchanged:++- The Wave 2 *architectural* claim — that the verifier machinery (TUF+ root with threshold=2, dual signature paths, separate-axis pin) is in+ place and exercised end-to-end — is fully delivered regardless of+ where the private key lives.+- The Wave 2 *operational* posture is now that the second axis's private+ half never appears in the public tree. The signing workflow reads the+ key from the secret at run time, signs, and never persists the decoded+ PEM. A reader of the public repository can no longer extract the+ private key.+- The remaining hardening step — deriving the key inside a genuinely+ air-gapped ceremony with hardware-token-backed custody (NitroKey /+ YubiKey) — is documented in `wave2-key-ceremony.md` §4 and is still a+ follow-up.++Rotating the key is: generate a fresh keypair, `gh secret set+WAVE2_OFFLINE_KEY_B64`, swap the public key + its inlined verifier block++ the pinned fingerprint, and append a row to the rotation-history table+in `install/TRUST_ROOT.md`.### 7.5 Detection if Wave 2 fails@@ -614,11 +618,11 @@ Wave 4 closes two gaps that Waves 1-3 structurally cannot:**alongside** the existing Wave 1+2 signatures — defense in depth, notreplacement. SA-1 of Wave 4 generated the ML-DSA-65 keypair usingOpenSSL 3.5.6 (`openssl genpkey -algorithm ML-DSA-65`); the public key- is committed plain at `install/keys/pq-mldsa65.pub.pem`, the private- key is AES-256-CBC encrypted at rest at `install/keys/pq-mldsa65.key.enc`- under the same passphrase pattern as the Wave-2 offline ceremony key.- Production rotation of the PQ passphrase happens before the- v0.5.0-wave4 release cut, identical discipline to Wave 2.+ is committed plain at `install/keys/pq-mldsa65.pub.pem`; the private+ key is not in the repo — it lives only as a GitHub Actions secret+ (`WAVE4_MLDSA65_KEY_B64`, base64 PKCS#8 PEM), the same secret-only+ custody as the Wave-2 offline key. Rotation follows the same+ discipline as Wave 2.**Scenario coverage update.** The Wave 4 mitigation matrix in`docs/supply-chain/wave4-distribution.md` enumerates eight scenarios; the@@ -660,7 +664,8 @@ A fifth scenario the post-quantum work explicitly addresses:at v0.4.0-supplychain-wave3 release asset `install-verify.ps1` withSHA-256 `ac6d6668ab36697510fc357f893a7b3f16b946f209252cb1a6872860751496e9`.- `install/keys/pq-mldsa65.pub.pem` — ML-DSA-65 public key.-- `install/keys/pq-mldsa65.key.enc` — ML-DSA-65 private key, encrypted.+- ML-DSA-65 private key — not committed; held only as the+ `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (base64 PKCS#8 PEM).- `docs/supply-chain/wave4-distribution.md` — full Wave 4 architecture +user-facing command differences + Wave-1-3-scenario mitigation matrix +PQ migration plan.@@ -668,8 +673,9 @@ A fifth scenario the post-quantum work explicitly addresses:**What Wave 4 follow-up sub-agents (SA-W4-2..SA-W4-5) MUST do:**- SA-W4-2: Add ML-DSA-65 signing step to `.github/workflows/sign-installer.yml`,- gated on a new GitHub Actions secret `PQ_MLDSA65_PASSPHRASE` (identical- pattern to Wave 2's `OFFLINE_CEREMONY_PASSPHRASE`).+ reading the private key from the `WAVE4_MLDSA65_KEY_B64` GitHub Actions+ secret (base64 PKCS#8 PEM — same secret-only custody as Wave 2's+ `WAVE2_OFFLINE_KEY_B64`).- SA-W4-3: Add `install-verify.sh.pqsig` and `install-verify.ps1.pqsig`to every release asset bundle. Update `checksums.txt` to include them.- SA-W4-4: Add stage `[11.5/12]` (or renumber to `[12/13]` etc.) to both@@ -698,10 +704,11 @@ A fifth scenario the post-quantum work explicitly addresses:toolchain doesn't have ML-DSA. If OpenSSL < 3.5 (no ML-DSA support),the correct response is to **defer** the PQ axis to Wave 4.1, not tosilently fall back to a non-PQ algorithm.-- **Do not** commit the ML-DSA-65 private key in plaintext. The encrypted- blob `pq-mldsa65.key.enc` is fine to commit; the passphrase lives in- GitHub Actions secrets + the maintainer's password manager and is- rotated before the v0.5.0-wave4 release.+- **Do not** commit the ML-DSA-65 private key to the repo in any form —+ not plaintext, not encrypted. The private key lives ONLY as the+ `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (base64 PKCS#8 PEM), with+ a local backup in the maintainer's password manager. Only the public+ key (`pq-mldsa65.pub.pem`) is committed.- **Do not** assume `brew tap` / `scoop bucket add` "just works" withoutsmoke-testing on a fresh OS image. The community-test pattern fromWave 2/Wave 3 (`docs/supply-chain/wave{2,3}-community-tests.md`) MUST@@ -732,10 +739,11 @@ SA-W4-5 integration.`$PQ_OPENSSL` for the subsequent steps. The build is reproduciblein the FIPS 204 deterministic sense (repeated runs against the sametarball produce byte-identical `pkeyutl -sign -rawin` output).- - "Decrypt ML-DSA-65 private key" — `aes-256-cbc -d -pbkdf2 -iter- 600000`, identical parameters to the Wave-2 decrypt step, gated on- the existing `WAVE2_CEREMONY_PASSPHRASE` secret. Production- migration to a separate `PQ_MLDSA65_PASSPHRASE` is Wave 4.1.+ - "Load ML-DSA-65 private key" — base64-decode the+ `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret to the PKCS#8 PEM in a+ runner tempfile (no passphrase, no encrypt-at-rest), identical+ secret-only custody to the Wave-2 offline key's+ `WAVE2_OFFLINE_KEY_B64`.- "Sign each artifact" + "Independently verify" — five `pkeyutl-sign -rawin` invocations producing `<artifact>.mldsa.sig` (~3309bytes per FIPS 204 §5 table 2), each cross-verified against the@@ -747,7 +755,7 @@ SA-W4-5 integration.- `[12/13]` — fetch `<artifact>.mldsa.sig` + the released`pq-mldsa65.pub.pem`; cross-check both against the inlined heredocby SHA-256(DER(SPKI)) fingerprint- `30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a`.+ `db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073`.- `[13/13]` — TRANSITION-MODE verify. If local OpenSSL ≥ 3.5 is onPATH, `openssl pkeyutl -verify -pubin -rawin` is enforcedhard-closed. Otherwise, an explicit@@ -756,8 +764,9 @@ SA-W4-5 integration.have already validated.3. `install/TRUST_ROOT.md` §5 — new "Wave 4 — Post-quantum signing(ML-DSA-65, NIST FIPS 204)" section covering algorithm selection- (ML-DSA over FALCON/SLH-DSA), custody (same `WAVE2_CEREMONY_PASSPHRASE`- pattern with Wave-4.1 rotation pending), transition strategy+ (ML-DSA over FALCON/SLH-DSA), custody (same secret-only+ `WAVE4_MLDSA65_KEY_B64` model as the Wave-2 offline key), transition+ strategy(parallel-with-classical until NIST CNSA 2.0 ~2030+), toolchain pin(OpenSSL 3.5.6 SHA-256), and the rotation procedure.@@ -790,8 +799,9 @@ hard-required.** Reasoning:- Homebrew + Scoop manifest bumps to v0.5.0-wave4 (SA-1 left thempinned at v0.4.0-supplychain-wave3).-- Hardware-token (NitroKey HSM 2) custody — currently the encrypted- key sits in-repo + the passphrase is reused from Wave 2.+- Hardware-token (NitroKey HSM 2) custody — the ML-DSA private key+ currently lives in the `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret,+ briefly decoded onto the runner at sign time.- Community-test sweep across macOS x86/arm64 + Linux for brew, andWindows 10/11/Server for scoop — pending a release with the PQasset bundle attached.diff --git a/docs/supply-chain/wave2-key-ceremony.md b/docs/supply-chain/wave2-key-ceremony.mdindex 7a90b136bc..dce19ff8f4 100644--- a/docs/supply-chain/wave2-key-ceremony.md+++ b/docs/supply-chain/wave2-key-ceremony.md@@ -4,9 +4,16 @@> generated and committed. Workflow + verifier integration is built by> follow-up Jarvis-Agents (Wave-2-SA-2 through SA-5).>+> **Key custody update (2026-07-03).** The offline-ceremony keys were rotated+> and the encrypt-at-rest scheme was removed. The private key is no longer+> committed in any form — it lives only as the `WAVE2_OFFLINE_KEY_B64` GitHub+> Actions secret (base64 of the PKCS#8 PEM). There is no passphrase. The+> sections below have been updated to the new model; the retired demo key and+> its once-disclosed passphrase are considered burned.+>> Companion documents:> - `install/TRUST_ROOT.md` §3 — the user-facing trust-root explanation,-> passphrase disclosure, and rotation procedure.+> key custody, and rotation procedure.> - `docs/supply-chain/threat-model.md` §7 — what Wave 2 stops and what it> still does not.@@ -63,18 +70,15 @@ branch `feat/wave2-foundation`.`pip install "tuf>=4"`; the meta-package `tuf>=4` actually resolves to`python-tuf` 7.0.0 — the major-version numbering on PyPI is non-linear).-### 2.2 Step 1 — generate a fresh passphrase--```bash-openssl rand -base64 18 > /tmp/wave2_passphrase.txt-cat /tmp/wave2_passphrase.txt-# → env++ci2NDWCOLeLfgTTZRks (24 base64 characters)-```+### 2.2 Step 1 — key custody model (no passphrase)-The passphrase is 18 bytes of CSPRNG output encoded as 24 base64-characters — approximately 144 bits of entropy, well above any feasible-brute-force budget against AES-256-CBC with PBKDF2(SHA-256, 600 000-iterations) salt.+The private key is **not** stored in the repository, so there is no+at-rest passphrase to generate. After the keypair is created (Step 2),+its private half is base64-encoded and stored as the+`WAVE2_OFFLINE_KEY_B64` GitHub Actions secret (Step 3). The only secret+material is the raw key itself, held by GitHub's encrypted secret store+plus a local backup in the maintainer's password manager. The repository+carries only the public key.### 2.3 Step 2 — generate the Ed25519 keypair@@ -94,46 +98,46 @@ from a deterministic seed. It was generated from `openssl genpkey`'sdefault RNG (system CSPRNG). The Wave-1 ceremony was on a single onlineworkstation (the maintainer's), so calling this an "offline ceremony" isaspirational at this foundation step — the *machinery* is in place-(passphrase-encrypted key file, TUF root with threshold=2, separate-axis-verifier contract) but the **operational discipline** of a real offline+(private key held only as a GitHub Actions secret, TUF root with+threshold=2, separate-axis verifier contract) but the **operational+discipline** of a real offlineceremony (air-gapped laptop, hardware token, witness on a secondmaintainer's machine) is the production migration described in §4 below.We are deliberately honest about this rather than claiming an offlineceremony was performed.-### 2.4 Step 3 — encrypt the private key+### 2.4 Step 3 — export the private key as a GitHub Actions secret```bash-PASSPHRASE=$(cat /tmp/wave2_passphrase.txt)-openssl aes-256-cbc -pbkdf2 -iter 600000 -salt \- -in /tmp/wave2_offline.key \- -out install/keys/offline-ceremony.key.enc \- -pass "pass:$PASSPHRASE"+# base64 the PKCS#8 PEM and store it as an encrypted GitHub secret.+# The key never touches the repository.+base64 -w0 /tmp/wave2_offline.key | \+ gh secret set WAVE2_OFFLINE_KEY_B64 --repo PersonalJarvis/PersonalJarvis```-Parameters chosen:+Custody model:-| Parameter | Value | Why |+| Property | Value | Why ||---|---|---|-| Algorithm | AES-256-CBC | Industry-standard symmetric cipher; CBC is fine here because we authenticate the entire artefact via the TUF root + dual signatures, not via the encryption layer. |-| KDF | PBKDF2-HMAC-SHA256 | OpenSSL's `-pbkdf2` flag. Replaces the legacy `EVP_BytesToKey` derivation which is cryptographically weak. |-| Iterations | 600 000 | OWASP 2023 recommendation for PBKDF2-HMAC-SHA256. Slows a brute-force attempt against the 144-bit passphrase enough that the passphrase entropy is the binding security parameter, not the KDF cost. |-| Salt | 8 random bytes | OpenSSL default; embedded in the ciphertext header. |+| At-rest location | GitHub Actions secret `WAVE2_OFFLINE_KEY_B64` | GitHub encrypts secrets at rest and injects them only into workflow runs; the private key never appears in the repo tree, not even encrypted. |+| Encoding | base64 of the PKCS#8 PEM | Lets a multi-line PEM travel as a single secret value; the workflow base64-decodes it into a runner tempfile at sign time. |+| Passphrase | none | There is no encrypted key file to unlock, so there is no passphrase to store, disclose, or rotate. |+| Backup | maintainer's password manager | A single offline copy so the key can be re-set if the GitHub secret is ever lost. |### 2.5 Step 4 — round-trip validation```bash-openssl aes-256-cbc -d -pbkdf2 -iter 600000 \- -in install/keys/offline-ceremony.key.enc \- -pass "pass:$PASSPHRASE" \- -out /tmp/wave2_decrypted.key-openssl pkey -in /tmp/wave2_decrypted.key -noout+# Decode the secret value back to a PEM and confirm it is a valid key.+gh secret list --repo PersonalJarvis/PersonalJarvis # WAVE2_OFFLINE_KEY_B64 present+base64 -d /tmp/wave2_offline_b64.txt > /tmp/wave2_decoded.key+openssl pkey -in /tmp/wave2_decoded.key -noout# (no output = valid PEM Ed25519 private key)```-This proves the passphrase + encryption pipeline works. The plaintext key-in `/tmp` was deleted immediately after this validation; only the-encrypted form is persisted.+This proves the base64 round-trip preserves a valid key. The plaintext+key in `/tmp` was deleted immediately after this validation; the repo+persists only the public key, and the private key persists only inside+the GitHub secret store.### 2.6 Step 5 — TUF root metadata@@ -207,18 +211,20 @@ the threshold with one signature twice.## 4. Production migration path-The demo posture committed in this branch has one explicit gap: the-passphrase is in the repository (see `install/TRUST_ROOT.md` §3.3, with-full disclosure). To run real production releases under Wave 2, do-these things — in this order — and the gap closes without changing the+The private key already lives only in a GitHub Actions secret, not in the+repository (see `install/TRUST_ROOT.md` §3, key custody). One hardening+gap remains: the key is generated on, and briefly decoded onto, a+network-attached machine. To reach a fully air-gapped production posture+under Wave 2, do these things — in this order — without changing theverifier code:### 4.1 Generate a fresh keypair (don't reuse this demo key)Run the §2 ceremony again, but on an air-gapped or freshly-imaged laptopthat has never been online with credentials. The deliverables are the-same (`offline-ceremony.pub`, `offline-ceremony.key.enc`); only the-provenance of the RNG inputs improves.+same (`offline-ceremony.pub` committed to the repo, the private half set+as the `WAVE2_OFFLINE_KEY_B64` secret); only the provenance of the RNG+inputs improves.Ideally:@@ -233,37 +239,37 @@ Ideally:- Have a second maintainer present as a witness.- Photograph the openssl command and its output for the audit trail.-### 4.2 Move the passphrase out of the repository+### 4.2 Set the private-key secret```bash-gh secret set WAVE2_CEREMONY_PASSPHRASE \- --repo PersonalJarvis/PersonalJarvis \- --body "<new passphrase from openssl rand -base64 18>"+base64 -w0 offline-ceremony.key | \+ gh secret set WAVE2_OFFLINE_KEY_B64 --repo PersonalJarvis/PersonalJarvis# Verify:gh secret list --repo PersonalJarvis/PersonalJarvis-# WAVE2_CEREMONY_PASSPHRASE Updated 2026-MM-DD HH:MM:SS+# WAVE2_OFFLINE_KEY_B64 Updated 2026-MM-DD HH:MM:SS```Once the GitHub secret is set:-1. Wave-2-SA-3 (workflow integration) modifies `sign-installer.yml` to- add a "Sign with offline-ceremony key" step. That step:- - decrypts `install/keys/offline-ceremony.key.enc` using- `${{ secrets.WAVE2_CEREMONY_PASSPHRASE }}`.+1. The signing workflow (`sign-installer.yml`) has a "Sign with+ offline-ceremony key" step. That step:+ - base64-decodes `${{ secrets.WAVE2_OFFLINE_KEY_B64 }}` into a runner+ tempfile (no passphrase — the decoded bytes are the PKCS#8 PEM).- signs the artefact with the Ed25519 private key.- uploads `<asset>.ed25519.sig` as a release asset.- - immediately `shred -uz`-overwrites the decrypted private key.-2. Update `install/TRUST_ROOT.md` §3.3 to **remove** the demo passphrase- line and replace it with: "Production deployment: passphrase moved to- `WAVE2_CEREMONY_PASSPHRASE` GitHub Actions secret on 2026-MM-DD."+ - immediately `shred -uz`-overwrites the decoded private key.+2. Swap the committed public key (`offline-ceremony.pub`) + its inlined+ copy in the verifier scripts + the pinned fingerprint, and append a+ row to the rotation-history table in `install/TRUST_ROOT.md`.### 4.3 Better: HSM-backed signing-The §4.2 model still requires the passphrase to exist briefly as-plaintext inside the GitHub-hosted runner. An attacker who compromises-the GitHub Actions infrastructure (or the cosign-installer Action, or-any other Action in the workflow — see threat-model §3 Scenario B) can-exfiltrate the passphrase and the decrypted key while the workflow runs.+The §4.2 model still requires the private key to exist briefly as+plaintext inside the GitHub-hosted runner (the base64 secret is decoded+there before signing). An attacker who compromises the GitHub Actions+infrastructure (or the cosign-installer Action, or any other Action in+the workflow — see threat-model §3 Scenario B) can exfiltrate the+decoded key while the workflow runs.A truly air-gapped production posture moves the signing operation**out of GitHub Actions entirely**:@@ -275,9 +281,9 @@ A truly air-gapped production posture moves the signing operation- The HSM (YubiKey, Nitrokey, SoloKey v2, or a YubiHSM 2 for shared-maintainer scenarios) holds the Ed25519 private key in tamper-resistanthardware. Every sign operation needs physical touch.-- The passphrase ceases to exist — there is no PEM file to decrypt; the- signing is done by sending bytes through a USB protocol that asks the- token to sign with a key it has never exported.+- The exported key ceases to exist — there is no PEM in a secret to+ decode; the signing is done by sending bytes through a USB protocol+ that asks the token to sign with a key it has never exported.This is exactly Sigstore's own model for their root TUF ceremonies(see Sigstore Issue #1432 and the November 2024 root-signing ceremony@@ -290,9 +296,9 @@ recording). Wave 2.5 / Wave 3 will adopt it; Wave 2 documents the path.> **Wave 2 has no automated recovery.** This is a deliberate design> tradeoff and a known Wave 2.5 / Wave 3 follow-up.-If `install/keys/offline-ceremony.key.enc` is lost AND the passphrase is-forgotten (or vice versa — both halves are needed) and no production--posture HSM exists, the maintainer cannot mint new 2-of-2 signatures.+If the `WAVE2_OFFLINE_KEY_B64` secret is lost AND the password-manager+backup of the private key is gone, and no production-posture HSM exists,+the maintainer cannot mint new 2-of-2 signatures.All future releases would either be unsigned-by-the-offline-axis (whichthe Wave-2-SA-2 verifier refuses) or signed under a fresh key theverifier does not yet trust.@@ -311,12 +317,12 @@ The recovery path is:trusted channel, which it does not have until Wave 3 ships theTUF refresh workflow.-The lesson: in Wave 2, **do not lose the offline key.** Store the-passphrase in a 1Password vault, in a paper printout in a fire safe,-or split across two trustees via Shamir's Secret Sharing. The-encrypted-private-key file is committed in the public repo and so is-already replicated worldwide; the passphrase secrecy is the only thing-to protect.+The lesson: in Wave 2, **do not lose the offline key.** Keep the+password-manager backup of the private key in a vault, in a paper+printout in a fire safe, or split across two trustees via Shamir's+Secret Sharing. The private key exists only in the GitHub secret store+plus that backup — losing both is unrecoverable, so the backup is the+thing to protect.Wave 3 fixes this with a published TUF refresh metadata channel + athreshold-key recovery key held by an independent project (e.g. the@@ -429,26 +435,21 @@ Jarvis-Agent should re-run them as sanity checks):# 1. Public key committed as a blobgit ls-tree HEAD install/keys/offline-ceremony.pub-# 2. Encrypted private key committed as a blob-git ls-tree HEAD install/keys/offline-ceremony.key.enc+# 2. Private key is NOT tracked in the repo (only the .pub is)+git ls-tree HEAD install/keys/ | grep -F 'PRIVATE KEY' && echo "FAIL: private key committed" || echo "PASS: only public key tracked"# 3. TUF root committed as a blobgit ls-tree HEAD install/tuf/1.root.json-# 4. Decryption round-trip works (proves passphrase + encryption)-openssl aes-256-cbc -d -pbkdf2 -iter 600000 \- -in install/keys/offline-ceremony.key.enc \- -pass "pass:env++ci2NDWCOLeLfgTTZRks" \- -out /tmp/wave2_decrypted.key-openssl pkey -in /tmp/wave2_decrypted.key -noout && echo PASS-rm -f /tmp/wave2_decrypted.key # scrub immediately+# 4. Private-key secret is set (proves custody)+gh secret list --repo PersonalJarvis/PersonalJarvis | grep -F 'WAVE2_OFFLINE_KEY_B64'# 5. TUF root metadata loads + threshold=2python -c "from tuf.api.metadata import Metadata; m = Metadata.from_file('install/tuf/1.root.json'); assert m.signed.roles['root'].threshold == 2; print('PASS')"-# 6. Passphrase committed in TRUST_ROOT.md §3.3 (literal disclosure)-grep -F 'WAVE2_CEREMONY_PASSPHRASE=env++ci2NDWCOLeLfgTTZRks' install/TRUST_ROOT.md+# 6. No plaintext key material tracked under install/keys/ (must find only .pub)+git grep -nl 'PRIVATE KEY' -- install/keys/ && echo "FAIL: private key material tracked" || echo "PASS: no private key at rest"```-If any of the six commands fails, this branch is not Wave-2-foundation--ready and must be regenerated.+If any check fails, this branch is not Wave-2-foundation-ready and must+be regenerated.diff --git a/docs/supply-chain/wave3-community-tests.md b/docs/supply-chain/wave3-community-tests.mdindex 674cd9bd24..0bc5dddb64 100644--- a/docs/supply-chain/wave3-community-tests.md+++ b/docs/supply-chain/wave3-community-tests.md@@ -217,13 +217,13 @@ docker run --rm ubuntu:24.04 bash -c 'cosign SHA-256 OK (8b24b946dd5809c6bd93de08033bcf6bc0ed7d336b7785787c080f574b89249b)[3/11] Fetching install.sh + Fulcio trio + offline-ceremony signature from release v0.4.0-supplychain-wave3...install.sh + .sig + .pem + .bundle + .cosign.sig downloaded- offline-ceremony pubkey fingerprint OK (40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee)+ offline-ceremony pubkey fingerprint OK (1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a)[4/11] Verifying Fulcio keyless signature (axis A - GitHub Actions OIDC)...Verified OKaxis A OK (identity=PersonalJarvis/PersonalJarvis / .github/workflows/sign-installer.yml, issuer=https://token.actions.githubusercontent.com)[5/11] Verifying offline-ceremony signature (axis B - Ed25519, air-gapped)...Verified OK- axis B OK (Ed25519, key fingerprint=40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee)+ axis B OK (Ed25519, key fingerprint=1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a)[6/11] Checking Rekor inclusion proof freshness (<= 86400s)...Rekor inclusion proof age: 145s (limit 86400s)[7/11] Cross-checking identity assertions on both axes...diff --git a/docs/supply-chain/wave4-distribution.md b/docs/supply-chain/wave4-distribution.mdindex b99b0479a3..82737ceaee 100644--- a/docs/supply-chain/wave4-distribution.md+++ b/docs/supply-chain/wave4-distribution.md@@ -107,7 +107,7 @@ Scenarios S-1..S-3 are the Wave 1-3 axes; Wave 4 leaves them as-is (the 12-stage**Wave 4 PQ scaffolding (SA-1 work):**- `install/keys/pq-mldsa65.pub.pem` — ML-DSA-65 public key, plain.-- `install/keys/pq-mldsa65.key.enc` — ML-DSA-65 private key, AES-256-CBC encrypted with PBKDF2-derived key from the Wave-2 passphrase pattern (`env++ci2NDWCOLeLfgTTZRks`). Encryption round-trip verified at generation time.+- ML-DSA-65 private key — not committed to the repo. It lives only as the `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (base64 of the PKCS#8 PEM); the repo carries only the public key.- Tooling: OpenSSL 3.5.6 (ML-DSA support added in OpenSSL 3.5.0 via the OQS provider integration).**What this Wave does NOT do:**@@ -119,7 +119,7 @@ Scenarios S-1..S-3 are the Wave 1-3 axes; Wave 4 leaves them as-is (the 12-stage**What Wave 4.1 (follow-up Jarvis-Agents) MUST do:**-- SA-W4-2: Add ML-DSA-65 signing step to the GitHub Actions workflow, gated by a GitHub Actions secret `PQ_MLDSA65_PASSPHRASE` (identical pattern to Wave 2's offline-ceremony secret).+- SA-W4-2: Add ML-DSA-65 signing step to the GitHub Actions workflow, reading the private key from the `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (base64 PKCS#8 PEM — same secret-only custody as Wave 2's `WAVE2_OFFLINE_KEY_B64`).- SA-W4-3: Add `install-verify.sh.pqsig` and `install-verify.ps1.pqsig` to every release asset bundle.- SA-W4-4: Add stage `[11.5/12]` to both verifier scripts: ML-DSA-65 signature verification using `openssl pkeyutl -verify -inkey pq-mldsa65.pub.pem -rawin -in <asset> -sigfile <asset>.pqsig`. Hard-fail-closed identical to the other axes.- SA-W4-5: Integrate the Homebrew Formula + Scoop manifest into the org repos (`personal-jarvis/homebrew-jarvis`, `personal-jarvis/scoop-jarvis`), publish the v0.5.0-wave4 release, update SHA-256 pins, smoke-test the new install path.@@ -127,7 +127,7 @@ Scenarios S-1..S-3 are the Wave 1-3 axes; Wave 4 leaves them as-is (the 12-stage**PQ key storage strategy:**- Public key: committed plain in `install/keys/pq-mldsa65.pub.pem` and **inlined into the verifier scripts** (same pattern as the Wave-2 offline key — defends against asset-store-only substitution).-- Private key: encrypted at rest in `install/keys/pq-mldsa65.key.enc`. The passphrase is **never committed**; it lives in GitHub Actions secrets (`PQ_MLDSA65_PASSPHRASE`) and in the maintainer's password manager. The Wave-2 passphrase pattern (`env++ci2NDWCOLeLfgTTZRks`) is reused at SA-1 only for *encrypt-at-rest of the test material*; production rotation happens before the v0.5.0-wave4 cut.+- Private key: **never committed to the repo — not even encrypted.** It lives only as the `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (base64 of the PKCS#8 PEM), with a local backup in the maintainer's password manager. The signing workflow base64-decodes it into a runner tempfile at sign time and scrubs it afterwards; there is no passphrase and no `.key.enc` at rest.- Fingerprint: see `install/keys/pq-mldsa65.pub.pem` (SHA-256 of DER-encoded SubjectPublicKeyInfo). Will be pinned in `TRUST_ROOT.md §5` (Wave 4.1).---diff --git a/docs/supply-chain/wave5-audit-fixes-validation.md b/docs/supply-chain/wave5-audit-fixes-validation.mdindex 3c6d55072b..e33097faf1 100644--- a/docs/supply-chain/wave5-audit-fixes-validation.md+++ b/docs/supply-chain/wave5-audit-fixes-validation.md@@ -311,13 +311,13 @@ container; the happy-path smoke was executed in the same harness.[3/13] Fetching install.sh + Fulcio trio + offline-ceremony signature from release v0.5.1-supplychain-wave5-audit-fixes...[R-Wave5-A TAMPER] swapping entire install.sh artifact set to v0.4.0-supplychain-wave3install.sh + .sig + .pem + .bundle + .cosign.sig downloaded- offline-ceremony pubkey fingerprint OK (40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee)+ offline-ceremony pubkey fingerprint OK (1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a)[4/13] Verifying Fulcio keyless signature (axis A — GitHub Actions OIDC)...axis A OK (identity=PersonalJarvis/PersonalJarvis / .github/workflows/sign-installer.yml, issuer=https://token.actions.githubusercontent.com)[5/13] Verifying offline-ceremony signature (axis B — Ed25519, air-gapped)...- axis B OK (Ed25519, key fingerprint=40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee)+ axis B OK (Ed25519, key fingerprint=1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a)[6/13] Checking Rekor inclusion proof freshness (≤ 86400s)...Rekor inclusion proof age: 12842s (limit 86400s)@@ -476,8 +476,11 @@ defensive gaps.## 5. Fix-forwards expected during releaseThe Wave-4 release required four fix-forwards because the ML-DSA-65-toolchain landed late in OpenSSL and the iter-count of the encrypted-PQ key was off. Wave 5 inherits the working Wave-4 release pipeline+toolchain landed late in OpenSSL and, under the since-removed+encrypt-at-rest scheme, the iter-count of the wrapped PQ key was off+(that scheme was retired in the 2026-07-03 rotation — the private keys+now live only as GitHub Actions secrets). Wave 5 inherits the working+Wave-4 release pipelineunchanged; the changes are additive (one new signed artifact,verifier extension, install.sh pin consumption). The expected fix-forward count is **0** for the v0.5.1 cut, with the followingdiff --git a/install/TRUST_ROOT.md b/install/TRUST_ROOT.mdindex cd036c0b64..f74c2c9953 100644--- a/install/TRUST_ROOT.md+++ b/install/TRUST_ROOT.md@@ -89,11 +89,20 @@ honest anchor.## 3. Wave 2 — second signing axis (offline-ceremony Ed25519)-> **Status:** *foundation step.* The keypair, passphrase, encrypted private key,-> TUF root metadata, and ceremony documentation are committed in this branch-> (`feat/wave2-foundation`). The workflow integration that actually *uses* the+> **Status:** *foundation step.* The keypair, the committed **public** key, the+> TUF root metadata, and the ceremony documentation are in place. The+> **private** key lives only as the `WAVE2_OFFLINE_KEY_B64` GitHub Actions+> secret — never committed. The workflow integration that actually *uses* the> offline key to co-sign each release (and the corresponding verifier change> that demands 2-of-2) is built by follow-up sub-agents in Wave 2.+>+> **Key rotation — 2026-07-03.** Both signing keys (this Ed25519 offline key+> and the Wave 4 ML-DSA-65 key) were rotated on 2026-07-03, and the old+> encrypt-at-rest scheme was removed. The previously-committed demo passphrase+> is considered **burned**, and every key it protected is **retired**. Private+> keys are now held ONLY as GitHub Actions secrets (base64 of the PKCS#8 PEM);+> there is no passphrase and no `*.key.enc` in the repo. New fingerprints are+> pinned in §3.2 (Ed25519) and §5.2 (ML-DSA-65).### 3.1 Why this section exists@@ -105,91 +114,74 @@ trusted maintainer is one social-engineering campaign away from a supply-chainincident (CVE-2024-3094, March 2024).Wave 2 closes this with a **second, independent signing axis**: a long-lived-Ed25519 keypair generated **offline** in a ceremony, encrypted at rest, with-its private half kept outside GitHub. The verifier demands 2-of-2 — both the-Fulcio (online, ephemeral) signature *and* the offline-ceremony signature-must validate. Compromising either axis alone yields nothing.+Ed25519 keypair generated **offline** in a ceremony, with its private half+kept out of the repository — held only as a GitHub Actions secret. The+verifier demands 2-of-2 — both the Fulcio (online, ephemeral) signature *and*+the offline-ceremony signature must validate. Compromising either axis alone+yields nothing.-### 3.2 What is committed in this branch+### 3.2 What is committed, and where the key lives-| File | Purpose |+| Item | Purpose ||---|---|-| `install/keys/offline-ceremony.pub` | Ed25519 public key in PEM format. Committed in plain. |-| `install/keys/offline-ceremony.key.enc` | Ed25519 private key, encrypted with AES-256-CBC + PBKDF2 (600 000 iterations). Committed encrypted. |+| `install/keys/offline-ceremony.pub` | Ed25519 public key in PEM format. Committed in plain. Its SHA-256(DER(SPKI)) fingerprint `1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a` is inlined into both verifier scripts and cross-checked at stage `[3/13]`. |+| `WAVE2_OFFLINE_KEY_B64` (GitHub Actions secret) | Ed25519 private key, base64 of the PKCS#8 PEM. **Never committed** — held only in GitHub's encrypted secret store plus a local backup in the maintainer's password manager. || `install/tuf/1.root.json` | TUF root metadata version 1: lists both trust axes (`fulcio_oidc` + `offline_ceremony`) with `threshold=2` on every role. Expires 365 days from generation (2027-05-26). || `docs/supply-chain/wave2-key-ceremony.md` | Step-by-step ceremony log: how the key was generated, why 2-of-2 closes xz-utils, production-deployment migration path. |-### 3.3 The passphrase — DEMO POSTURE, FULLY DISCLOSED--> **Read this paragraph carefully.** It is the honesty bar for this entire-> branch.--For this **Wave 2 foundation demo**, the passphrase that decrypts-`install/keys/offline-ceremony.key.enc` is committed in this repository, in-plain text, in this file, **right here on this line**:--```-WAVE2_CEREMONY_PASSPHRASE=env++ci2NDWCOLeLfgTTZRks-```--That is the literal 24-character passphrase emitted by `openssl rand -base64 18`-during the ceremony. It decrypts the offline-ceremony Ed25519 private key.-A reader of the public GitHub repository can extract the private key.--**Does this defeat the point of Wave 2?** No, *because of what Wave 2 is-proving*. The artefact under demonstration is the **2-of-2 verifier-machinery** — TUF root with `threshold=2`, two independent trust axes, dual-signature paths in the verifier script (built in follow-up sub-agents). That-machinery is identical whether the second key's passphrase lives in the-repository, in a GitHub Actions secret, in a maintainer's password manager,-or in a hardware token. Only the *secrecy of the second axis* changes; the-*existence* of the second axis is what closes the single-point-of-failure.--**Production deployments must move this passphrase out of the repository.**-The exact migration path (do this on real production releases):--1. **Generate a fresh keypair** following the recipe in- `docs/supply-chain/wave2-key-ceremony.md`. **Do not reuse this demo key- in production.**-2. **Store the production passphrase as a GitHub Actions repository secret.**- The exact command (run by a maintainer with `secrets` access on the repo):- ```bash- gh secret set WAVE2_CEREMONY_PASSPHRASE \- --repo PersonalJarvis/PersonalJarvis \- --body "<your 24+ char passphrase from openssl rand -base64 18>"- ```- After setting, `gh secret list --repo PersonalJarvis/PersonalJarvis`- must show `WAVE2_CEREMONY_PASSPHRASE` with a recent updated_at.-3. **Sign-installer.yml** then references the secret as- `${{ secrets.WAVE2_CEREMONY_PASSPHRASE }}` to decrypt the private key- inside the workflow runner, sign the artifact, and immediately scrub- the decrypted bytes from disk (`shred -uz` on Linux,- `Remove-Item -Force` then `cipher /w:` on Windows).-4. **Remove the demo passphrase line** from this `TRUST_ROOT.md` §3.3- and rotate the demo key out via §3.5 below.-5. **Even better:** the production passphrase is itself derived inside an- air-gapped key ceremony on a hardware token (YubiKey FIPS or equivalent),- never appearing on a network-attached machine. The GitHub secret then- stores only an encrypted-with-token blob; the workflow needs token-- touch for signing, which is what Sigstore's own root-key ceremony does.--**Why we did not do that in this foundation step.** Wave 2 is split into-five sub-agents. This sub-agent (Wave-2-SA-1) builds the *architecture* —-key material, TUF metadata, threat-model update, ceremony documentation —-that the *integration* sub-agents (Wave-2-SA-2 through SA-5) consume to-wire the second axis into the workflow and the verifier. Asking this-foundation step to also gate on a real hardware ceremony would block the-parallel integration work. The honest tradeoff is recorded here.+### 3.3 Key custody — private key only in a GitHub Actions secret++> **Read this paragraph carefully.** It is the honesty bar for this axis.++The offline-ceremony Ed25519 **private** key is not in this repository —+not in plaintext, and not encrypted. It exists only as the+`WAVE2_OFFLINE_KEY_B64` GitHub Actions secret (the base64 of the PKCS#8+PEM), with a single offline backup in the maintainer's password manager.+The repository holds only the **public** key+(`install/keys/offline-ceremony.pub`) and its inlined copy in the verifier+scripts. There is no decryption passphrase, because there is no encrypted+key file to decrypt.++> **Historical note — retired demo posture (2026-07-03).** Earlier foundation+> branches stored the private key AES-256-CBC-encrypted inside the repo+> (`offline-ceremony.key.enc`), unlocked by a passphrase that was, for the+> demo, disclosed in plaintext right here in §3.3. That posture was removed in+> the 2026-07-03 rotation: the encrypted key file is deleted, the demo+> passphrase is **burned**, and the key it protected is **retired**. Do not+> reintroduce an at-rest key or a committed passphrase.++**Why this is the right posture.** The Wave 2 artefact is the **2-of-2+verifier machinery** — a TUF root with `threshold=2`, two independent trust+axes, and dual signature paths in the verifier. That machinery is identical+regardless of where the second key lives; keeping the private key solely in+GitHub's secret store (plus an offline backup) means a reader of the public+repository cannot extract it, while the *existence* of the second axis still+closes the single-point-of-failure.++**Signing flow.** `sign-installer.yml` base64-decodes+`${{ secrets.WAVE2_OFFLINE_KEY_B64 }}` into a runner tempfile, signs the+artefact with the Ed25519 private key, uploads `<asset>.ed25519.sig`, and+immediately scrubs the decoded key from disk (`shred -uz` on Linux,+`Remove-Item -Force` then `cipher /w:` on Windows). The decoded PEM never+persists past the run.++**Even stronger (future).** The production endgame derives the key inside an+air-gapped ceremony on a hardware token (YubiKey FIPS or equivalent), so the+private key never appears on a network-attached machine at all — the GitHub+secret would then hold only a token-wrapped blob and signing needs a physical+touch, mirroring Sigstore's own root-key ceremony. That hardware step is a+documented follow-up, not yet in place.### 3.4 What §3 does NOT claim-This section deliberately does **not** claim that the demo posture provides-the security guarantee of a real production 2-of-2 deployment. It claims-that the *plumbing* required for 2-of-2 (TUF root with threshold=2, two-distinct key materialisations, dual verifier paths) is in place and exercised-end-to-end. The remaining production gap is the single line above (the-passphrase secrecy boundary) plus the workflow + verifier wiring done by-the next sub-agents in Wave 2.+This section deliberately does **not** claim that keeping the private key in a+GitHub Actions secret is equivalent to a hardware-token air-gapped ceremony.+It claims that the *plumbing* required for 2-of-2 (TUF root with threshold=2,+two distinct key materialisations, dual verifier paths) is in place and+exercised end-to-end, and that the private key is no longer extractable from+the public repo. The remaining hardening gap is the hardware-token custody+described above — the key is still briefly decoded onto a network-attached+runner at sign time.### 3.5 Rotation procedure for the offline-ceremony key@@ -197,20 +189,19 @@ The offline key has a 365-day expiry (recorded in `1.root.json`'s `expires`field). Before expiry, AND any time the key is suspected compromised:1. Run the ceremony script in `docs/supply-chain/wave2-key-ceremony.md` to- generate a new Ed25519 keypair + a fresh `openssl rand -base64 18`- passphrase.-2. Encrypt with `openssl aes-256-cbc -pbkdf2 -iter 600000 -salt`.-3. Overwrite `install/keys/offline-ceremony.pub` and- `install/keys/offline-ceremony.key.enc`.+ generate a new Ed25519 keypair in an air-gapped environment.+2. Set the new private key as the GitHub Actions secret — never commit it:+ `base64 -w0 new-offline.key | gh secret set WAVE2_OFFLINE_KEY_B64 --repo+ PersonalJarvis/PersonalJarvis`. Keep the offline backup in the password+ manager.+3. Overwrite the committed **public** key `install/keys/offline-ceremony.pub`+ and its inlined copy + pinned fingerprint in both verifier scripts.4. Bump TUF root version: regenerate `install/tuf/2.root.json` (do NOTdelete `1.root.json` — TUF clients walk the version chain).The new file MUST embed the previous key's keyid as a *revoked* entryinside `unrecognized_fields.wave2_revocation` so the verifier knows toreject artifacts signed by the old key.-5. Set the new `WAVE2_CEREMONY_PASSPHRASE` GitHub Actions secret (production)- or update §3.3 above (demo). Never both at the same time — if §3.3- contains a passphrase, the production deployment is not yet active.-6. Append a row to §8 (rotation history) with the date, reason, and the+5. Append a row to §8 (rotation history) with the date, reason, and thefirst tag signed under the new key.---@@ -388,9 +379,9 @@ pin matches a permissive layout regexp would collapse axis C.## 5. Wave 4 — Post-quantum signing (ML-DSA-65, NIST FIPS 204)> **Status:** axis D is wired into the signing workflow + the 14-stage-> verifier in `feat/wave4-pq` (SA-4). Production passphrase rotation-> (separate `PQ_MLDSA65_PASSPHRASE` secret + hardware-token custody)-> remains a Wave 4.1 follow-up.+> verifier in `feat/wave4-pq` (SA-4). The private key is held only as the+> `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (base64 PKCS#8 PEM);+> hardware-token custody remains a Wave 4.1 follow-up.### 5.1 Why ML-DSA-65, not FALCON or SLH-DSA@@ -428,47 +419,33 @@ We pick **ML-DSA-65** because:ML-DSA in beta as of 2026-Q1; production custody will migrate to aNitroKey before the v0.6.0 release cut, matching the Wave 2 plan.-### 5.2 Custody — same passphrase pattern as Wave 2--The ML-DSA-65 private key lives at `install/keys/pq-mldsa65.key.enc`,-encrypted at rest with AES-256-CBC + PBKDF2-HMAC-SHA256.--**SA-1 / SA-4 iteration-count discrepancy (Wave 4.1 follow-up).**-The original SA-1 commit message and this section's first version-claimed the key was wrapped at `-iter 600000`, matching the-Wave-2 offline-ceremony precedent (`docs/supply-chain/wave2-key-ceremony.md`-§"Encrypt at rest"). On the v0.5.0-supplychain-wave4 tag, SA-5 hit-`bad decrypt` in the signing workflow with `-iter 600000` and-empirically confirmed (decrypt success against the *committed*-encrypted blob) that SA-1 used the PBKDF2 default `-iter 10000`.-The workflow's decrypt step is therefore pinned to `-iter 10000`-for v0.5.x. The rotation ceremony in §5.5 bumps this back to-`-iter 600000` and is a hard prerequisite for v0.6.0; this is-tracked as Wave 4.1 alongside HSM migration. **Functionally the-demo passphrase is the bottleneck, not the iteration count** —-the demo passphrase is fully disclosed in §3.3, so the-`-iter 10000` posture does not weaken the trust story relative-to the documented one (an attacker who reads §3.3 also doesn't-care about the iteration count).+### 5.2 Custody — private key only in a GitHub Actions secret-```-openssl aes-256-cbc -salt -pbkdf2 -iter 10000 \- -pass env:WAVE2_CEREMONY_PASSPHRASE \- -in pq-mldsa65.key.pem -out pq-mldsa65.key.enc-```+The ML-DSA-65 **private** key is not in the repository. It exists only as+the `WAVE4_MLDSA65_KEY_B64` GitHub Actions secret (the base64 of the PKCS#8+PEM), with a local backup in the maintainer's password manager — the same+secret-only custody as the Wave-2 offline key. There is no encrypted key+file and no passphrase.++The signing workflow base64-decodes `${{ secrets.WAVE4_MLDSA65_KEY_B64 }}`+into a runner tempfile, signs each artefact, and scrubs the decoded key on+the way out (`rm -f` / `shred`). **Hardware-token custody** (a NitroKey+HSM 2 holding the ML-DSA key so it never appears on a network-attached+runner) remains the Wave 4.1 endgame and MUST land before the v0.6.0 tag.-The foundation reuses the same `WAVE2_CEREMONY_PASSPHRASE` GitHub Actions-secret to avoid introducing two parallel secret-rotation procedures on-a single release. **Production migration** (separates the two secrets,-moves the PQ key to a NitroKey HSM 2, rotates the foundation-passphrase, AND bumps `-iter` to 600 000) is tracked as Wave 4.1 and-MUST land before the v0.6.0 tag.+> **Historical note — retired (2026-07-03).** Earlier foundation branches+> stored this private key AES-256-CBC-encrypted at `pq-mldsa65.key.enc`,+> unlocked by the shared demo passphrase. That posture — including a known+> KDF-iteration discrepancy between the SA-1 commit and the workflow — was+> removed in the 2026-07-03 rotation. The encrypted file is deleted and the+> passphrase is burned; there is nothing left to unlock, so the iteration+> count is moot.The PQ public key fingerprint is pinned in three places:1. `install/keys/pq-mldsa65.pub.pem` — committed plain.2. `install/install-verify.sh` heredoc + `PQ_MLDSA65_PUBKEY_FINGERPRINT`- constant: `30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a`+ constant: `db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073`3. `install/install-verify.ps1` heredoc + `$PQ_MLDSA65_PUBKEY_FINGERPRINT`constant: same value as above.@@ -533,15 +510,15 @@ ceremony in `docs/supply-chain/wave2-key-ceremony.md`:3.5: `openssl genpkey -algorithm ML-DSA-65 -out new.key.pem`.2. Compute the new fingerprint:`openssl pkey -in new.pub.pem -pubin -outform DER | openssl dgst -sha256`.-3. Encrypt the private key at rest with the same AES-256-CBC + PBKDF2- 600 000-iter pattern, using a freshly-generated passphrase (do NOT- reuse the rotated-out one).-4. Commit `install/keys/pq-mldsa65.pub.pem` + `install/keys/pq-mldsa65.key.enc`.+3. Set the new private key as the GitHub Actions secret — never commit it:+ `base64 -w0 new.key.pem | gh secret set WAVE4_MLDSA65_KEY_B64 --repo+ PersonalJarvis/PersonalJarvis`. Keep the offline backup in the password+ manager.+4. Overwrite the committed **public** key `install/keys/pq-mldsa65.pub.pem`.5. Update the inlined heredoc + `PQ_MLDSA65_PUBKEY_FINGERPRINT` in BOTH- `install/install-verify.sh` AND `install/install-verify.ps1`.-6. Rotate `WAVE2_CEREMONY_PASSPHRASE` (or the new `PQ_MLDSA65_PASSPHRASE`- secret once Wave 4.1 separates the two) via `gh secret set`.-7. Append an entry to §8 "Rotation history".+ `install/install-verify.sh` AND `install/install-verify.ps1` to the new+ fingerprint.+6. Append an entry to §8 "Rotation history".The verifier rejects releases signed with the OLD key automatically:the inlined fingerprint cross-check in `[12/13]` catches both andiff --git a/install/install-verify.ps1 b/install/install-verify.ps1index 41a70790d4..4de183a67b 100644--- a/install/install-verify.ps1+++ b/install/install-verify.ps1@@ -57,7 +57,7 @@ $COSIGN_VERSION = 'v2.4.1'$COSIGN_SHA256_WINDOWS = '8d57f8a42a981d27290c4227271fa9f0f62ca6630eb4a21d316bd6b01405b87c'$REKOR_MAX_AGE_SECONDS = 86400-# WAVE 2 PINNED OFFLINE KEY — fingerprint 40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee+# WAVE 2 PINNED OFFLINE KEY — fingerprint 1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a## Ed25519 public key produced in the air-gapped offline-ceremony documented# in docs/supply-chain/wave2-key-ceremony.md. Fingerprint is sha256(DER(pubkey)).@@ -66,13 +66,13 @@ $REKOR_MAX_AGE_SECONDS = 86400# the released copy and refuses to proceed if the two diverge.$OFFLINE_CEREMONY_PUBKEY_PEM = @'-----BEGIN PUBLIC KEY------MCowBQYDK2VwAyEAyQ4Jmisu92/f92Os8DRmIwbwN/rjOuLsRTYTaHmNnN0=+MCowBQYDK2VwAyEArlfig3ALFBrED+VrNZ8hlrVnRJxDnI8PCkxGB26N4U4=-----END PUBLIC KEY-----'@-$OFFLINE_CEREMONY_PUBKEY_FINGERPRINT = '40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee'+$OFFLINE_CEREMONY_PUBKEY_FINGERPRINT = '1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a'# WAVE 4 PINNED POST-QUANTUM KEY - fingerprint-# 30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a+# db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073## ML-DSA-65 public key (NIST FIPS 204 category 3). Generated alongside the# Wave-2 offline-ceremony key using OpenSSL 3.5.6's@@ -83,51 +83,51 @@ $OFFLINE_CEREMONY_PUBKEY_FINGERPRINT = '40cdb1b9e255e797909fba4fb5983450ccf7fa26# two diverge - same defense pattern as the Wave-2 offline key.$PQ_MLDSA65_PUBKEY_PEM = @'-----BEGIN PUBLIC KEY------MIIHsjALBglghkgBZQMEAxIDggehAAUJoP74UbGXJIuYqNVfNlQsgUhXpI/8qm4J-L6qfWHzHkEZmAuD/VMHgIrm1OX/XRXVRZo7e4ecqsX2rRNei/4HT6Sx612VgRTFg-snJ0B5kEJYSl2bpuPGS418ArsZ0dG6UjkfEHUC8lbrdNasG7ox+gaxxyfswFwL5F-muEFUG+ziAg4OHEqkGHoN/pAaX8Iix6nWrKeiKlx9QdVn3OxCaghFXmn02pR5Cg3-sTpsg2de+ddfntaZiiKdT0R5712MzwM0Nr3PEyMp6YvU0mCujyInOj6qWPofHwTs-/INNtpN3Djga+IuF7Hvh0dmcOrHogquIiF6ezG4cEumpTSUdMeDtZNB1S1cTFGfi-nh0BPXnkvLDTgGLyNBF1Cpg81d2g02400g558PkvwSLlGrgiC7bqFu6VfuAj6oGG-BIk+fyNbiUDt3Kir6YYAh/Q4uOzdbHl0K8IXflZcm6tzS7NBYVEJ2CqIYjxhi6vO-jkuDlWDASTXvimnew1TtPM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WURACMNEWpbeQi8rXcDek73etqTKkzmubhejBwGAmBG7xnP3+kY2hEaGnEoNAmdtV/ZCjlIDlih4ThL8Mj534/iUUAbq53xe4G25DfMW2nSXZ3kd/+m44926SSX9P88TGGOG3YFxR0bCyB0cz7tN+LIoKAqRInNJDN25Ycjhfg17/gOsdd+AzOtNJQtb2RSGSaWO83RtQhcY0ZS05b2lY0lYDy4rLWQAypw19XsL0hYPucfm2YF+1RB2YpTqiZSTYKQvEonT3Vk6O4tIDWXfLBxIffQeLp9QJQIjcN36cuzkHKzSd249++h3y177YOIuSmQurLVNibRqajhKHmIDOE0CSGXRwvp15P0+weC5yYT4O0iWj/efW+vv81Qlf/DYRCFyq3swIL5LBOyFPQOfh1eFJ7bGpkR8L3C9LePmjk8piMwxP6IyYo+bEwacFTIaZ/bENBu+9FSsrhibyy3+O7V17xfVq3fDrTzVMv2j8S3vobm3CM1WcyU+h5pIHhiz-----END PUBLIC KEY-----'@-$PQ_MLDSA65_PUBKEY_FINGERPRINT = '30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a'+$PQ_MLDSA65_PUBKEY_FINGERPRINT = 'db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073'# Released asset name (axis-D pubkey cross-check) - must match the# workflow's `cp install/keys/pq-mldsa65.pub.pem out/pq-mldsa65.pub.pem`.$PQ_MLDSA65_PUBKEY_ASSET_NAME = 'pq-mldsa65.pub.pem'diff --git a/install/install-verify.sh b/install/install-verify.shindex 1540484ced..0c71e4e8a4 100755--- a/install/install-verify.sh+++ b/install/install-verify.sh@@ -98,7 +98,7 @@ readonly COSIGN_SHA256_DARWIN_ARM64="13343856b69f70388c4fe0b986a31dde5958e444b41# 24 hours is tight; raise this only with a documented justification.readonly REKOR_MAX_AGE_SECONDS=86400-# WAVE 2 PINNED OFFLINE KEY — fingerprint 40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee+# WAVE 2 PINNED OFFLINE KEY — fingerprint 1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a## Ed25519 public key produced in the air-gapped offline-ceremony documented in# docs/supply-chain/wave2-key-ceremony.md. Fingerprint is sha256(DER(pubkey)).@@ -108,14 +108,14 @@ readonly REKOR_MAX_AGE_SECONDS=86400# two diverge.read -r -d '' OFFLINE_CEREMONY_PUBKEY_PEM <<'WAVE2_OFFLINE_KEY_EOF' || true-----BEGIN PUBLIC KEY------MCowBQYDK2VwAyEAyQ4Jmisu92/f92Os8DRmIwbwN/rjOuLsRTYTaHmNnN0=+MCowBQYDK2VwAyEArlfig3ALFBrED+VrNZ8hlrVnRJxDnI8PCkxGB26N4U4=-----END PUBLIC KEY-----WAVE2_OFFLINE_KEY_EOFreadonly OFFLINE_CEREMONY_PUBKEY_PEM-readonly OFFLINE_CEREMONY_PUBKEY_FINGERPRINT="40cdb1b9e255e797909fba4fb5983450ccf7fa26ec17c80f473fe360da5549ee"+readonly OFFLINE_CEREMONY_PUBKEY_FINGERPRINT="1e8f2fa590e6454daff34e88e7bde8ffcf04b1eb235f0ca11ff9ebc65e2d1d3a"# WAVE 4 PINNED POST-QUANTUM KEY — fingerprint-# 30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a+# db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073## ML-DSA-65 public key (NIST FIPS 204 category 3, ≥192-bit classical-# equivalent security floor). Generated alongside the Wave-2 offline-@@ -133,52 +133,52 @@ readonly OFFLINE_CEREMONY_PUBKEY_FINGERPRINT="40cdb1b9e255e797909fba4fb5983450cc# bug.read -r -d '' PQ_MLDSA65_PUBKEY_PEM <<'WAVE4_PQ_KEY_EOF' || true-----BEGIN PUBLIC KEY------MIIHsjALBglghkgBZQMEAxIDggehAAUJoP74UbGXJIuYqNVfNlQsgUhXpI/8qm4J-L6qfWHzHkEZmAuD/VMHgIrm1OX/XRXVRZo7e4ecqsX2rRNei/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8Q0JHQInmSoFo9HR06vXK3+psF2oKH/w4GV18pg+Oc2M+ePITf9E6XNn4jk6VYCGcMEx7D8YSdXmoYbD7bcSKCg+LaSDf5vVfDqGbWb8i96nvK5MhC82LcSZGA1wQOAu7KdVGBr8jbd7cUNkZZGoobrV+3cGCOxSbzfo1cGVLyKtyxfeht81wVMY8G/37vVOWybROvU2Ohokeu+LsEm0nNxeq+OQ0hspr+FDBlycaN9itAZBx71qPBdABVAhT33mgHfZ2cp7QYKahZtiMpopYMtlHS+oLFtWeWk1tUCE8FgqWsM+8Qvc+NxxIrZUBvjB8OsQymj8oWHtZfur4TEyD52H17x+LdLm2RDD9RHC1ND8diH8jauhBuDhFn9QgBV6aGvHBafkq36gwM9kG+6trKr7Tnj1+QjcP/ygmHyyAbGgkWURACMNEWpbeQi8rXcDek73etqTKkzmubhejBwGAmBG7xnP3+kY2hEaGnEoNAmdtV/ZCjlIDlih4ThL8Mj534/iUUAbq53xe4G25DfMW2nSXZ3kd/+m44926SSX9P88TGGOG3YFxR0bCyB0cz7tN+LIoKAqRInNJDN25Ycjhfg17/gOsdd+AzOtNJQtb2RSGSaWO83RtQhcY0ZS05b2lY0lYDy4rLWQAypw19XsL0hYPucfm2YF+1RB2YpTqiZSTYKQvEonT3Vk6O4tIDWXfLBxIffQeLp9QJQIjcN36cuzkHKzSd249++h3y177YOIuSmQurLVNibRqajhKHmIDOE0CSGXRwvp15P0+weC5yYT4O0iWj/efW+vv81Qlf/DYRCFyq3swIL5LBOyFPQOfh1eFJ7bGpkR8L3C9LePmjk8piMwxP6IyYo+bEwacFTIaZ/bENBu+9FSsrhibyy3+O7V17xfVq3fDrTzVMv2j8S3vobm3CM1WcyU+h5pIHhiz-----END PUBLIC KEY-----WAVE4_PQ_KEY_EOFreadonly PQ_MLDSA65_PUBKEY_PEM-readonly PQ_MLDSA65_PUBKEY_FINGERPRINT="30a634809c19c41abcead8e657bfe19a53f9f4c831a82d2939cb7d5c40efe01a"+readonly PQ_MLDSA65_PUBKEY_FINGERPRINT="db0073bf5b77d5b0e4e5547bfcf86227031c9a138cb3088a57c270b8fbac4073"# Released asset name (axis-D pubkey cross-check) — must match the# workflow's `cp install/keys/pq-mldsa65.pub.pem out/pq-mldsa65.pub.pem`.readonly PQ_MLDSA65_PUBKEY_ASSET_NAME="pq-mldsa65.pub.pem"diff --git a/install/keys/offline-ceremony.pub b/install/keys/offline-ceremony.pubindex 6db13285df..e6464c64e9 100644--- a/install/keys/offline-ceremony.pub+++ b/install/keys/offline-ceremony.pub@@ -1,3 +1,3 @@-----BEGIN PUBLIC KEY------MCowBQYDK2VwAyEAyQ4Jmisu92/f92Os8DRmIwbwN/rjOuLsRTYTaHmNnN0=+MCowBQYDK2VwAyEArlfig3ALFBrED+VrNZ8hlrVnRJxDnI8PCkxGB26N4U4=-----END PUBLIC KEY-----diff --git a/install/keys/pq-mldsa65.pub.pem b/install/keys/pq-mldsa65.pub.pemindex 22a2372555..a1ff19a2ae 100644--- a/install/keys/pq-mldsa65.pub.pem+++ b/install/keys/pq-mldsa65.pub.pem@@ -1,44 +1,44 @@-----BEGIN PUBLIC KEY------MIIHsjALBglghkgBZQMEAxIDggehAAUJoP74UbGXJIuYqNVfNlQsgUhXpI/8qm4J-L6qfWHzHkEZmAuD/VMHgIrm1OX/XRXVRZo7e4ecqsX2rRNei/4HT6Sx612VgRTFg-snJ0B5kEJYSl2bpuPGS418ArsZ0dG6UjkfEHUC8lbrdNasG7ox+gaxxyfswFwL5F-muEFUG+ziAg4OHEqkGHoN/pAaX8Iix6nWrKeiKlx9QdVn3OxCaghFXmn02pR5Cg3-sTpsg2de+ddfntaZiiKdT0R5712MzwM0Nr3PEyMp6YvU0mCujyInOj6qWPofHwTs-/INNtpN3Djga+IuF7Hvh0dmcOrHogquIiF6ezG4cEumpTSUdMeDtZNB1S1cTFGfi-nh0BPXnkvLDTgGLyNBF1Cpg81d2g02400g558PkvwSLlGrgiC7bqFu6VfuAj6oGG-BIk+fyNbiUDt3Kir6YYA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1ND8diH8jauhBuDhFn9QgBV6aGvHBafkq36gwM9kG+6trKr7Tnj1+QjcP/ygmHyyAbGgkWURACMNEWpbeQi8rXcDek73etqTKkzmubhejBwGAmBG7xnP3+kY2hEaGnEoNAmdtV/ZCjlIDlih4ThL8Mj534/iUUAbq53xe4G25DfMW2nSXZ3kd/+m44926SSX9P88TGGOG3YFxR0bCyB0cz7tN+LIoKAqRInNJDN25Ycjhfg17/gOsdd+AzOtNJQtb2RSGSaWO83RtQhcY0ZS05b2lY0lYDy4rLWQAypw19XsL0hYPucfm2YF+1RB2YpTqiZSTYKQvEonT3Vk6O4tIDWXfLBxIffQeLp9QJQIjcN36cuzkHKzSd249++h3y177YOIuSmQurLVNibRqajhKHmIDOE0CSGXRwvp15P0+weC5yYT4O0iWj/efW+vv81Qlf/DYRCFyq3swIL5LBOyFPQOfh1eFJ7bGpkR8L3C9LePmjk8piMwxP6IyYo+bEwacFTIaZ/bENBu+9FSsrhibyy3+O7V17xfVq3fDrTzVMv2j8S3vobm3CM1WcyU+h5pIHhiz-----END PUBLIC KEY-----diff --git a/install/tuf/1.root.json b/install/tuf/1.root.jsonindex 9177faf9eb..3a800beb41 100644--- a/install/tuf/1.root.json+++ b/install/tuf/1.root.json@@ -1 +1 @@-{"signatures":[],"signed":{"_type":"root","consistent_snapshot":true,"expires":"2027-05-26T20:50:23Z","keys":{"fulcio_oidc":{"axis":"fulcio_oidc","identity_regex":"^https://github\\.com/PersonalJarvis/PersonalJarvis/\\.github/workflows/sign-installer\\.yml@refs/tags/v[0-9].*$","keytype":"ecdsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0ghrh92Lw1Yr3idGV5WqCtMDB8Cx\n+D8hdC4w2ZLNIplVRoVGLskYa3gheMyOjiJ8kPi15aQ2//7P+oj7UvJPGw==\n-----END PUBLIC KEY-----\n"},"note":"Wave 2 verifier MUST invoke `cosign verify-blob` with --certificate-oidc-issuer=<oidc_issuer> and --certificate-identity-regexp=<identity_regex>. The keyval.public is the Sigstore Fulcio v1 intermediate CA, pinned for transparency.","oidc_issuer":"https://token.actions.githubusercontent.com","scheme":"ecdsa-sha2-nistp256","verifier":"cosign-verify-blob"},"offline_ceremony":{"axis":"offline_ceremony","keytype":"ed25519","keyval":{"public":"c90e099a2b2ef76fdff763acf034662306f037fae33ae2ec45361368798d9cdd"},"note":"Detached Ed25519 signature over the same artifact bytes as the Fulcio axis. Private key encrypted at install/keys/offline-ceremony.key.enc with the passphrase recorded in install/TRUST_ROOT.md \u00a73 (demo posture; production swaps for HSM or air-gapped laptop).","scheme":"ed25519","verifier":"ed25519-raw"}},"roles":{"root":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2},"snapshot":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2},"targets":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2},"timestamp":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2}},"spec_version":"1.0.31","version":1,"wave2_design":{"purpose":"close the xz-utils single-maintainer single-signing-axis gap","summary":"two-axis 2-of-2 signing \u2014 Fulcio OIDC AND offline Ed25519","verifier_contract":"Wave 2 install-verify script reads this root.json, then for each released artifact requires: (1) a Sigstore signature verifiable by cosign against the fulcio_oidc identity_regex, AND (2) a detached Ed25519 signature verifiable against the offline_ceremony public key. Either signature missing or failing aborts the install."}}}\ No newline at end of file+{"signatures":[],"signed":{"_type":"root","consistent_snapshot":true,"expires":"2027-05-26T20:50:23Z","keys":{"fulcio_oidc":{"axis":"fulcio_oidc","identity_regex":"^https://github\\.com/PersonalJarvis/PersonalJarvis/\\.github/workflows/sign-installer\\.yml@refs/tags/v[0-9].*$","keytype":"ecdsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0ghrh92Lw1Yr3idGV5WqCtMDB8Cx\n+D8hdC4w2ZLNIplVRoVGLskYa3gheMyOjiJ8kPi15aQ2//7P+oj7UvJPGw==\n-----END PUBLIC KEY-----\n"},"note":"Wave 2 verifier MUST invoke `cosign verify-blob` with --certificate-oidc-issuer=<oidc_issuer> and --certificate-identity-regexp=<identity_regex>. The keyval.public is the Sigstore Fulcio v1 intermediate CA, pinned for transparency.","oidc_issuer":"https://token.actions.githubusercontent.com","scheme":"ecdsa-sha2-nistp256","verifier":"cosign-verify-blob"},"offline_ceremony":{"axis":"offline_ceremony","keytype":"ed25519","keyval":{"public":"ae57e283700b141ac40fe56b359f2196b567449c439c8f0f0a4c46076e8de14e"},"note":"Detached Ed25519 signature over the same artifact bytes as the Fulcio axis. Private key held ONLY as the WAVE2_OFFLINE_KEY_B64 GitHub Actions secret (base64 PKCS#8 PEM); never in the repo, not even encrypted. Local backup in the maintainer's password manager. Keys rotated 2026-07-03.","scheme":"ed25519","verifier":"ed25519-raw"}},"roles":{"root":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2},"snapshot":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2},"targets":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2},"timestamp":{"keyids":["fulcio_oidc","offline_ceremony"],"threshold":2}},"spec_version":"1.0.31","version":1,"wave2_design":{"purpose":"close the xz-utils single-maintainer single-signing-axis gap","summary":"two-axis 2-of-2 signing \u2014 Fulcio OIDC AND offline Ed25519","verifier_contract":"Wave 2 install-verify script reads this root.json, then for each released artifact requires: (1) a Sigstore signature verifiable by cosign against the fulcio_oidc identity_regex, AND (2) a detached Ed25519 signature verifiable against the offline_ceremony public key. Either signature missing or failing aborts the install."}}}\ No newline at end of filediff --git a/install/tuf/SIGNING.md b/install/tuf/SIGNING.mdindex 3db205c30f..c52ee43bbe 100644--- a/install/tuf/SIGNING.md+++ b/install/tuf/SIGNING.md@@ -83,9 +83,10 @@ it pulls fresh signature material across every other role's expiry window.This deployment uses a **two-axis 2-of-2** signing model encoded in theroot, but with a deliberate division of labour:-1. **`offline_ceremony` (Ed25519, encrypted at rest)** signs every TUF- metadata file (root, targets, snapshot, timestamp). This is what gives- each metadata file its single satisfied signature in the demo posture.+1. **`offline_ceremony` (Ed25519; private key held only as a GitHub Actions+ secret)** signs every TUF metadata file (root, targets, snapshot,+ timestamp). This is what gives each metadata file its single satisfied+ signature in the demo posture.2. **`fulcio_oidc` (Sigstore keyless via GitHub Actions OIDC)** signs theactual binary blobs (`install.sh`, `installer.py`, …) out-of-band via`cosign verify-blob`, gated by `.github/workflows/sign-installer.yml`.@@ -114,16 +115,17 @@ and targets-blob) is disclosed inline as a `_comment` field inThis is the operational recipe a maintainer runs whenever the`offline_ceremony` key is rotated (suspected compromise, scheduled annualceremony, or first production deployment per-`install/TRUST_ROOT.md` §3.3 step 1).+`install/TRUST_ROOT.md` §3.5 rotation procedure).### 4.1 Re-key the offline keyFollow `docs/supply-chain/wave2-key-ceremony.md` to generate a fresh-Ed25519 keypair and a fresh passphrase from `openssl rand -base64 18`.-Encrypt the private half with-`openssl aes-256-cbc -pbkdf2 -iter 600000 -salt`. Overwrite-`install/keys/offline-ceremony.pub` and-`install/keys/offline-ceremony.key.enc`.+Ed25519 keypair in an air-gapped environment. Set the new private key as+the `WAVE2_OFFLINE_KEY_B64` GitHub Actions secret+(`base64 -w0 new-offline.key | gh secret set WAVE2_OFFLINE_KEY_B64`) —+never committed — and overwrite the committed **public** key+`install/keys/offline-ceremony.pub` and its inlined fingerprint in the+verifier scripts.### 4.2 Bump the root@@ -156,7 +158,8 @@ from securesystemslib.signer import CryptoSigner, SSlibKeyfrom tuf.api.metadata import Metadatafrom tuf.api.serialization.json import JSONSerializer-# Decrypt the offline key with the rotated passphrase.+# Load the offline key from the WAVE2_OFFLINE_KEY_B64 secret (base64 PKCS#8 PEM).+pem_bytes = base64.b64decode(os.environ["WAVE2_OFFLINE_KEY_B64"])priv = serialization.load_pem_private_key(pem_bytes, password=None)pub = SSlibKey(keyid="offline_ceremony", keytype="ed25519",scheme="ed25519",@@ -203,9 +206,9 @@ The metadata files in this directory are committed at version 1 by- runs the daily timestamp cron,is wired in by Wave 2 SA-5 in-`.github/workflows/sign-installer.yml`. SA-5 reuses the-`WAVE2_CEREMONY_PASSPHRASE` GitHub Actions secret described in-`install/TRUST_ROOT.md` §3.3 step 2.+`.github/workflows/sign-installer.yml`. SA-5 reads the offline private key+from the `WAVE2_OFFLINE_KEY_B64` GitHub Actions secret described in+`install/TRUST_ROOT.md` §3.3.---diff --git a/scripts/ci/check_no_private_keys.py b/scripts/ci/check_no_private_keys.pynew file mode 100644index 0000000000..8b051b10f3--- /dev/null+++ b/scripts/ci/check_no_private_keys.py@@ -0,0 +1,179 @@+#!/usr/bin/env python3+"""Fail-closed guard: private signing-key material must NEVER enter the repo.++Why this exists+---------------+The installer is signed on four axes; two of them (Wave 2 Ed25519, Wave 4+ML-DSA-65) are key-bound. Those PRIVATE keys live ONLY in GitHub Actions+secrets (base64 of the PKCS#8 PEM) - never in the repo, not even encrypted.++The predecessor scheme committed the encrypted private keys+(`install/keys/*.key.enc`) plus a DEMO passphrase in plaintext in the docs.+The passphrase leaked into 14 public snapshots - a permanent, world-readable+exposure. This guard makes that class of mistake fail-closed: any attempt to+commit or push private-key material is blocked here, before it can reach the+public history where deletion no longer un-publishes it.++What it blocks (any of these is a CONFIRMED finding -> exit 1)+-------------------------------------------------------------+ 1. A full PEM PRIVATE KEY block of any flavor+ (RSA / EC / DSA / OPENSSH / ENCRYPTED / PGP / PKCS#8 "PRIVATE KEY").+ A bare mention of the words "BEGIN PRIVATE KEY" (in a grep command, a+ detector regex, a doc) is NOT a block - only a full BEGIN..base64..END+ block is.+ 2. A tracked `*.key` or `*.key.enc` file (encrypted-at-rest private key).+ 3. A `WAVE2_CEREMONY_PASSPHRASE = <value>` assignment (the retired+ passphrase scheme). The GitHub Actions reference+ `${{ secrets.WAVE2_OFFLINE_KEY_B64 }}` has no inline value and is fine.++What it allows+--------------+ * `-----BEGIN PUBLIC KEY-----` blocks (public keys are meant to ship).+ * Secret *names* without a value (WAVE2_OFFLINE_KEY_B64, ...).+ * Paths listed in the allowlist (test fixtures with throwaway keys).++Modes+-----+ --staged scan the STAGED blobs (wired into .githooks/pre-commit)+ (default) scan every tracked file (wired into .githooks/pre-push + CI)++Exit codes: 0 = clean, 1 = confirmed finding. Fails OPEN (exit 0) only when it+genuinely cannot run (no git, unreadable tree) - the layered CI run is the+backstop. stdlib only, cross-platform (pathlib, UTF-8, subprocess git).+"""+from __future__ import annotations++import re+import subprocess+import sys+from pathlib import Path++# Optional allowlist: repo-relative glob patterns, one per line, "#"=comment.+ALLOWLIST_FILE = Path("scripts/ci/privacy_gate/references/private-key-allowlist.txt")++# A FULL PEM private-key block: header, >=80 chars of base64 body, footer.+# The [A-Za-z0-9+/=\r\n] body class is what distinguishes a real key from a+# mere textual mention of the header line.+PEM_PRIVATE_RE = re.compile(+ r"-----BEGIN (?:[A-Z0-9 ]+ )?PRIVATE KEY-----"+ r"[\r\n]+[A-Za-z0-9+/=\r\n]{40,}?"+ r"-----END (?:[A-Z0-9 ]+ )?PRIVATE KEY-----"+)++# Retired passphrase scheme: an assignment with an actual secret-shaped value+# (>=12 base64 chars, no spaces/brackets). This catches `...=env++<secret>`+# while NOT tripping on prose that mentions the scheme or a `<placeholder>`,+# and never on the Actions secret reference `${{ secrets.WAVE2_... }}`.+PASSPHRASE_ASSIGN_RE = re.compile(r"WAVE2_CEREMONY_PASSPHRASE\s*=\s*[A-Za-z0-9+/]{12,}")++KEY_FILE_RE = re.compile(r"\.key(\.enc)?$", re.IGNORECASE)++# This guard file necessarily NAMES the patterns it hunts for; never scan it.+SELF = "scripts/ci/check_no_private_keys.py"+++def _git(args: list[str]) -> str:+ return subprocess.run(+ ["git", *args], capture_output=True, text=True, check=True+ ).stdout+++def _tracked_files(staged: bool) -> list[str]:+ if staged:+ out = _git(["diff", "--cached", "--name-only", "--diff-filter=ACM"])+ else:+ out = _git(["ls-files"])+ return [ln for ln in out.splitlines() if ln.strip()]+++def _read(path: str, staged: bool) -> str | None:+ try:+ if staged:+ return subprocess.run(+ ["git", "show", f":{path}"],+ capture_output=True, check=True,+ ).stdout.decode("utf-8", "replace")+ return Path(path).read_text(encoding="utf-8", errors="replace")+ except (subprocess.CalledProcessError, OSError):+ return None+++def _load_allowlist() -> list[str]:+ if not ALLOWLIST_FILE.exists():+ return []+ pats = []+ for ln in ALLOWLIST_FILE.read_text(encoding="utf-8").splitlines():+ ln = ln.strip()+ if ln and not ln.startswith("#"):+ pats.append(ln)+ return pats+++def _allowed(path: str, patterns: list[str]) -> bool:+ p = Path(path)+ return any(p.match(pat) or path == pat for pat in patterns)+++def main() -> int:+ staged = "--staged" in sys.argv[1:]+ try:+ files = _tracked_files(staged)+ except (subprocess.CalledProcessError, FileNotFoundError):+ # No git / not a repo -> cannot run -> fail OPEN (CI is the backstop).+ return 0++ allowlist = _load_allowlist()+ findings: list[str] = []++ for path in files:+ if path == SELF or _allowed(path, allowlist):+ continue++ if KEY_FILE_RE.search(path):+ findings.append(+ f"{path}: tracked private-key file (*.key/*.key.enc) - private "+ f"keys belong ONLY in GitHub Actions secrets, never in the repo"+ )+ continue++ # Only scan plausibly-textual files; skip large/binary blobs cheaply.+ text = _read(path, staged)+ if text is None or "\x00" in text[:4096]:+ continue++ if PEM_PRIVATE_RE.search(text):+ m = PEM_PRIVATE_RE.search(text)+ line = text[: m.start()].count("\n") + 1+ findings.append(+ f"{path}:{line}: full PEM PRIVATE KEY block - never commit a "+ f"private key (public keys / GitHub secrets only)"+ )+ if PASSPHRASE_ASSIGN_RE.search(text):+ m = PASSPHRASE_ASSIGN_RE.search(text)+ line = text[: m.start()].count("\n") + 1+ findings.append(+ f"{path}:{line}: WAVE2_CEREMONY_PASSPHRASE=<value> - the "+ f"passphrase scheme is retired; keys live only in secrets"+ )++ if findings:+ sys.stderr.write(+ "check_no_private_keys: BLOCKED - private-key material must never "+ "enter the repo (CLAUDE.md rule). Findings:\n"+ )+ for f in findings:+ sys.stderr.write(f" - {f}\n")+ sys.stderr.write(+ "\nFix: remove the key material. Store signing private keys ONLY as\n"+ "GitHub Actions secrets (base64 of the PEM): the workflow reads\n"+ "WAVE2_OFFLINE_KEY_B64 / WAVE4_MLDSA65_KEY_B64. Keep a local backup\n"+ "in your password manager. See docs/supply-chain/wave2-key-ceremony.md.\n"+ )+ return 1++ print("check_no_private_keys: OK - no private-key material in the tree.")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())