Skip to content

docs(adr): ADR-0053–0057, the subsidiary decisions of RFC-0017 - #250

Merged
gonzafg2 merged 13 commits into
mainfrom
docs/adr-0053-0057-distribution
Nov 3, 2026
Merged

gonzafg2 merged 13 commits into
mainfrom
docs/adr-0053-0057-distribution

Conversation

@gonzafg2

@gonzafg2 gonzafg2 commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Summary

These are the five subsidiary ADRs that RFC-0017 §12 lists. All are Proposed; each flips to Accepted with its implementing PR.

ADR Decision
0053 Release workflow release.yml runs on v* and rehearsal-* tags. Its jobs are precheck (ancestry, plus git tag -v against main's keys/security.asc), build, the gates, attest and publish, and each holds only its own permissions. The workflow uses no caches, a static-link check fails closed, and runners are pinned (never *-latest). The v* tag ruleset blocks update and delete, and a failed release consumes its version. SLSA Build Level 2, with Level 3 deferred.
0054 Artifact integrity Attestations cover the tarballs and the SBOM. The SBOM is CycloneDX, made by cargo-cyclonedx in its own read-only sbom job, which never holds a tarball. Before signing, scripts/verify-release.sh checks the tag signature, the ancestry, the pinned attestations, the attested commit, the recomputed SHA256SUMS and the gate digests. Releases are immutable from 0.2.0, and the user recipe is documented.
0055 Gates on published artifacts interop.yml becomes callable with a prebuilt artifact. One container pin covers both Linux architectures: the pinned Debian forky digest is an OCI index that includes linux/arm64/v8, checked on 2026-11-03. On macOS, the client is built from the OpenSSH 10.6p1 tarball, pinned by SHA-256. The systemd test runs on the x86_64 artifact, and every gate records the digests it ran.
0056 Homebrew tap gonzafg2/homebrew-quantumssh is a labelled single-user evaluation path that departs from ADR-0016. It ships a binary formula, a Homebrew-path config and service do, and is updated by a manual PR per release, with no token kept here. The tap's CI verifies the formula's checksums against the PGP-verified SHA256SUMS.
0057 Release-signing key Release tags and SHA256SUMS are signed by the project PGP key's primary, which is [SC]; the only subkey is [E]. Signing happens only in the maintainer's terminal. A signing subkey is deferred to the 2028 rotation. The ADR covers compromise and rotation, and supersedes ADR-0006's disclosure-only wording; ADR-0006's Status line records this.

RFC-0017's unresolved questions settled here:

  • the aarch64 image (ADR-0055 §1);
  • macOS client pinning (ADR-0055 §3), which lets macOS reach Tier 1 once implemented;
  • the SBOM tool (ADR-0054 §2);
  • updating the tap (ADR-0056 §3);
  • primary key or subkey (ADR-0057).

The musl linking question stays open until the first rehearsal run. The keygen ADR for RFC-0018 is a separate PR.

Refs #248

Test plan

  • Every ADR-NNNN and ../rfcs/ link in the five files resolves to a file in the repository
  • The facts used were checked on 2026-11-03: the registry's OCI index for the interop digest; gpg --list-keys for the key structure; the SHA-256 of openssh-10.6p1.tar.gz and its signature check; both gate scripts already honour QUANTUMSSH_BIN
  • Reviewers: Claude Code Review, Codex, opencode

https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu

- ADR-0053, the release workflow:
  - triggered by v* and rehearsal-* tags;
  - precheck, build, gates, attest and publish jobs, each with only its
    own permissions, and no caches;
  - a static-link check;
  - a v* tag ruleset with no update or delete;
  - a failed release consumes its version;
  - SLSA Build L2, with L3 deferred.
- ADR-0054, artifact integrity:
  - attestations on the tarballs and the SBOM;
  - a CycloneDX SBOM made by cargo-cyclonedx in the read-only build job;
  - the SHA256SUMS format;
  - scripts/verify-release.sh, which checks the tag signature, the
    ancestry, the pinned attestations, the attested commit, the
    recomputed checksums and the gate digests before signing;
  - immutable releases from 0.2.0;
  - the user recipe.
- ADR-0055: interop.yml becomes callable with a prebuilt artifact. The
  pinned Debian forky digest is a multi-arch OCI index with
  linux/arm64/v8, so one pin covers both Linux targets. The macOS client
  is built from the OpenSSH 10.6p1 tarball, pinned by SHA-256. The
  systemd test runs on the x86_64 artifact, and every gate records the
  digests it ran.
- ADR-0056, the Homebrew tap, a labelled departure from ADR-0016 as a
  single-user evaluation path:
  - binary formula, Homebrew-path config, `service do`;
  - a manual PR per release, with no token stored here;
  - the tap's CI verifies the formula's checksums against the
    PGP-verified SHA256SUMS.
- ADR-0057: release tags and SHA256SUMS are signed with the project PGP
  key's primary, only in the maintainer's terminal. A signing subkey is
  deferred to the 2028 rotation, and the ADR covers compromise and
  rotation. It supersedes ADR-0006's disclosure-only wording, and
  ADR-0006's Status line records that.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2 gonzafg2 added the documentation Improvements or additions to documentation label Nov 3, 2026
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

/oc

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T17:48:55.691794Z 069b3fe Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: ce1874f4ea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/adr/0056-homebrew-tap.md Resolved
…056 tap checks required

Claude Code Review on #250:

- ADR-0057: an attacker who holds the key can backdate a signature, and
  a hard revocation invalidates every signature the key made.
  "Unaffected" now rests on the immutable-release records and the
  attestations' transparency-log time. An advisory signed by the
  successor key lists each unaffected release by its SHA256SUMS digest.
  ADR-0054 §6 gives the post-revocation recipe: gh release verify, the
  attestation, and a match against the advisory.
- ADR-0056: the tap's branch protection now actually matches main's:
  signed commits, linear history, PR only, no force push or deletion,
  enforce_admins, and the CI jobs as required checks. The checksum check
  is therefore enforced rather than advisory. The Negative bullet names
  what is still not defended against: the maintainer's own account.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: cf09748fa2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

PR Review: docs(adr): ADR-0053–0057, the subsidiary decisions of RFC-0017 (#250)

Decision: 🔴 Blocked
Iteration: First review
Lenses applied: design decision (docs/adr/0053–0057), CI/release workflow and supply chain (ADR-0053–0056). The diff is documentation only, so the Rust-under-crates/ lens does not apply.

Executive summary

The five ADRs are well structured, cite their parent RFC and related decisions, and mostly stay within RFC-0017 §12's scope. The release and tap designs, however, contain confirmed contradictions with the gate scripts they claim to reuse, a false statement about cipher coverage, and a compromise-recovery rule that trusts a signer-controlled timestamp. The tap's only technical checksum control is also advisory rather than a required check.

New findings

🔴 Blocking (resolve before merge)

docs/adr/0055-interop-gate-on-published-artifacts.md:71-79 — CI gate design (confidence: 90)

Problem: ADR-0055 builds the macOS client with make ssh ssh-keygen and then says the gate script runs unchanged. The script unconditionally invokes sftp and scp, which are separate binaries in openssh-portable and are not produced by those targets. The built directory therefore cannot supply them; they resolve to the macOS system OpenSSH 10.5p1, which per RFC-0017 cannot negotiate ssh-mldsa44-ed25519, or the step fails outright. Either way the "pinned client" and macOS Tier-1 claim are not delivered.

- **The build is `./configure --without-openssl --without-zlib && make
  ssh ssh-keygen`.**
- **The gate script runs unchanged.** It gets the built client first on
  `PATH` ...

Fix: Build every client the gate uses, e.g. make ssh ssh-keygen sftp scp (or the full portable client set), put the whole built directory first on PATH, and add sftp -V / scp -V assertions so a silent fallback to the OS client cannot pass.
Anchor: ADR-0055 §3/§Consequences; RFC-0017 §1 Tier-1 ("a pinned OpenSSH ≥ 10.6 client"); tests/interop/run_openssh_client.sh:155-163; ADR-0020 (pinned client).

docs/adr/0055-interop-gate-on-published-artifacts.md:107-108 — security coverage claim (confidence: 92)

Problem: The ADR says [email protected] loses macOS coverage but "keeps its Linux coverage". No gate forces or asserts a cipher: the script only checks the KEX and host-key algorithm. Stock OpenSSH lists [email protected] first, the server advertises it first, and negotiation is client-list-wins, so both the Linux and macOS gates negotiate ChaCha. The second AEAD kept as ADR-0021's independent hedge has no real-client interop coverage on any target; the sentence misstates the security posture the ADR is recording.

- `[email protected]` gets no macOS coverage. It keeps its Linux
  coverage.

Fix: Add a Linux gate step with -o [email protected] and assert the negotiated kex: cipher: line, or correct the consequence to say AES-GCM has unit-level coverage only.
Anchor: ADR-0021 §Decision slots 3–4 and Alternative 1 (the two-AEAD hedge); RFC-0017 §1 Tier-1; tests/interop/run_openssh_client.sh:70-93; crates/quantumssh-core/src/kex.rs:65,375.

docs/adr/0057-release-signing-with-the-project-pgp-key.md:58-63 — release trust / compromise recovery (confidence: 90)

Problem: The compromise rule classifies releases by signature age: "Releases whose signature is older than that time are listed as unaffected." An OpenPGP signature's creation time and a git tag's tagger date are signer-chosen. An attacker holding the compromised key can sign a forged tag or SHA256SUMS dated before the exposure and land in the bucket users are told to trust. The rule needs an unforgeable timestamp, not the signature's self-asserted date.

- Releases whose signature is older than that time are listed as
  unaffected. Newer ones are listed as untrusted.

Fix: Classify by the GitHub immutable-release publication record (and the release attestation), plus a digest comparison against what the project published before the exposure. State explicitly that a signature's claimed date is not evidence.
Anchor: RFC-0017 §5/§11/§12; threat model §5.5.2.b; ADR-0005.

🟡 Important (should be resolved)

docs/adr/0056-homebrew-tap.md:91-102 — tap CI cannot start the service (confidence: 88)

Problem: Step 4 generates a host key and starts the service, but no step creates authorized_keys; main.rs treats a missing or empty authorized-keys file as fatal, so the server exits before binding and keep_alive true restart-loops. The step also assumes a "Homebrew ssh-keygen" that the CI never installs: the stock macOS client is 10.5p1 and ubuntu-24.04 ships 9.6p1, neither of which can create mldsa44-ed25519.

4. Generate a host key with the Homebrew `ssh-keygen`, start the
   service, and wait until `127.0.0.1:2222` accepts a connection.

Fix: Add brew install openssh and use "$(brew --prefix openssh)/bin/ssh-keygen" -t mldsa44-ed25519; generate an Ed25519 client key and install its .pub as authorized_keys before starting the service.
Anchor: ADR-0056 §4; crates/quantumssh/src/main.rs:581-596; crates/quantumssh-core/src/auth.rs (empty file rejected); RFC-0017 client-floor table; ADR-0043 §7 reference-test setup.

docs/adr/0056-homebrew-tap.md:36-39 — tap supply-chain control (confidence: 86)

Problem: The tap's branch protection is called "the same as this repository's" but is reduced to signed commits, PRs, and no force push. The tap CI checksum job is never made a required status check. This repository's actual protection (ADR-0008, updated by ADR-0031) also requires status checks, linear history, enforce-on-admins, conversation resolution, and forbids branch deletion. With an advisory check, an attacker with write access can merge a formula pointing at attacker-hosted bytes with a matching self-chosen sha256; brew install trusts the formula's sha256, not the PGP signature, so the check that is supposed to narrow the risk blocks nothing.

- **Branch protection on `main`** is the same as this repository's:
  - signed commits;
  - changes through a pull request;
  - no force push.

Fix: Name the tap's checksum and install jobs as required status checks, add enforce-on-admins/linear history/conversation resolution/no deletion, or state the reduced set explicitly and stop claiming equivalence with this repository.
Anchor: RFC-0017 §11; ADR-0008 §Decision; ADR-0031 §Context/Decision; threat model §5.5.2.b.

docs/adr/0053-release-workflow.md:65-67 — pinning claim (confidence: 86)

Problem: "The build never uses *-latest, so the runner image cannot change under a release" overstates what a versioned GitHub-hosted label pins. ubuntu-24.04, ubuntu-24.04-arm, and versioned macOS labels are updated in place; the linker, binutils, system headers/libraries, and the macOS SDK/Xcode can change without a reviewed diff. rust-toolchain.toml pins rustc only. The repo's own doctrine treats labels as mutable and pins by digest (ADR-0020/0034/0048), so this sentence records a guarantee the design does not provide.

The build never uses `*-latest`, so the runner image cannot change
under a release.

Fix: Say that avoiding *-latest prevents an unannounced jump to a new OS major, but the hosted image still rolls in place; either record the runner image version per release or build inside a digest-pinned container if reproducibility is to be claimed.
Anchor: ADR-0020:31; ADR-0034:55-59; ADR-0048:58-64; RFC-0017 §2.

docs/adr/0053-release-workflow.md:54-56 — RFC conformance / token exposure (confidence: 86)

Problem: RFC-0017 §4 step 2 explicitly requires the build job to check out with persist-credentials: false, precisely because it runs the untrusted build script under threat model §5.5.2.a. ADR-0053 gives that setting only to precheck; the build and gates rows omit it, so actions/checkout leaves the read token in .git/config where the build script or an executed binary can read it. The ADR's "runs in a job that can read the repository and nothing else" is weaker than the RFC's control.

| `precheck` | `contents: read` | Checks out with `fetch-depth: 0` and `persist-credentials: false`. ...
| `build` (matrix of three) | `contents: read` | `rustup target add <t>`, then ...

Fix: Add persist-credentials: false to the build checkout (and the gates checkout for the same reason), and state it in the table.
Anchor: RFC-0017 §4 step 2; threat model §5.5.2.a; ADR-0053 §2.


opencode v2.2.3 · opencode-go/deepseek-v4.1-flash · github run

…st a real client

Claude Code Review on #250, second pass:

- `gpg --verify` exits 0 with "Good signature" for a revoked or expired
  key. ADR-0054 §7 defines a pinned signature check on --status-fd
  (git verify-tag --raw for tags). It requires VALIDSIG with the pinned
  fingerprint and fails on REVKEYSIG, KEYREVOKED, EXPKEYSIG, EXPSIG or
  BADSIG. ADR-0053's precheck, verify-release.sh, the user recipe and
  the tap's CI all use it, and ADR-0057's compromise text relies on it.
- cargo-cyclonedx compiles third-party code that can write anywhere on
  its runner, so it moves to its own `sbom` job (contents: read) that
  never holds a tarball. The SBOM-safety claim is corrected.
- No OpenSSH client run had ever negotiated [email protected],
  because the gate sets no Ciphers= and OpenSSH prefers ChaCha20.
  ADR-0055 §5 adds an `openssh_aes_gcm` check, mandatory wherever the
  client offers the cipher. The macOS leg skips it and logs that.
- Files that do not exist yet (release.yml, verify-release.sh) are
  marked as new in ADR-0054 and ADR-0055.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

…age record, persist-credentials, tap CI

opencode's first review of #250 (of ce1874f):

- ADR-0055 §3: the gate uses sftp and scp, which also run the ssh of
  their compiled-in prefix, so the macOS client is now installed whole
  into one prefix. The job asserts that all four tools resolve there and
  that ssh -V prints the pinned version, so it cannot fall back silently
  to macOS's 10.5p1.
- ADR-0053: a versioned hosted label still rolls in place. Each build
  records ImageOS, ImageVersion and rustc -vV, and the release notes
  state them, without claiming reproducibility. Every checkout in
  release.yml sets persist-credentials: false.
- ADR-0056 §4: the tap's CI installs Homebrew openssh and creates both
  the host key and authorized_keys, without which the server refuses to
  start. It then checks the service with a real ssh exec. Branch
  protection adds resolved conversations, matching main.

Already fixed before this review: AES-GCM real-client coverage
(cf5addd), PGP-timestamp-independent compromise handling, and the tap's
required checks (cf09748).

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Answer to the opencode review of ce1874f. This review ran before two later pushes, so three of its findings were already fixed. The rest are fixed in d0ad61e.

Blocking

  1. macOS client lacks sftp and scp. Agreed (d0ad61e). ADR-0055 §3 now runs ./configure --prefix="$P" … && make && make install-nosysconf, which installs ssh, ssh-keygen, sftp and scp into one prefix. scp and sftp also run the ssh of their compiled-in prefix. Before the gate, the job asserts that all four resolve under $P/bin and that "$P/bin/ssh" -V prints the pinned version, so it cannot fall back silently to macOS's 10.5p1 client.
  2. AES-GCM has no real-client coverage. Already fixed in cf5addd. ADR-0055 §5 adds an openssh_aes_gcm check (-o [email protected], with the negotiated cipher asserted in the -v log). It is mandatory wherever the client offers the cipher, which covers the PR-time gate and both Linux release legs.
  3. Compromise classified by signature age. Already fixed in cf09748. "Unaffected" no longer depends on the PGP key. It rests on GitHub's immutable-release record and on the attestations' transparency-log time. An advisory signed by the successor key lists the unaffected releases by digest. cf5addd adds that gpg --verify exits 0 for a revoked key, so every check uses ADR-0054 §7's pinned signature check.

Important

  1. Tap CI cannot start the service. Agreed (d0ad61e). ADR-0056 §4 step 4 now:
    • runs brew install openssh;
    • creates the host key with the Homebrew ssh-keygen;
    • generates an Ed25519 client key and installs its .pub as authorized_keys;
    • starts the service, waits for the port, and requires a real ssh … true with exit status 0.
  2. Tap branch protection. Already fixed in cf09748; completed in d0ad61e. The list matches main's: signed commits, linear history, PR only, no force push or deletion, enforce_admins, and the tap's CI jobs as required checks, so the checksum check is enforced. d0ad61e adds resolved conversations, which main also requires (required_conversation_resolution: true).
  3. Versioned labels still roll. Agreed (d0ad61e). ADR-0053 §2 now says that avoiding *-latest prevents only an unannounced OS-major jump. Each build records ImageOS, ImageVersion and rustc -vV as an artifact, and the release notes state them. No reproducibility is claimed; that remains Phase 3.
  4. persist-credentials: false only on precheck. Agreed (d0ad61e). §1 now requires it on every actions/checkout in release.yml, build and gates included.

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

/oc

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: cf5adddd59

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: d0ad61e259

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/adr/0056-homebrew-tap.md Resolved
…e tap exception

Claude Code Review on #250:

- GnuPG reports EXPKEYSIG against today's date, so the pinned check would
  have failed every release once its key expired. That broke ADR-0057's
  promise that old releases remain verifiable. ADR-0054 §7 now has a
  pin set: the current key, plus retired keys with their validity windows
  kept in keys/.
  - REVKEYSIG, KEYREVOKED and BADSIG always fail.
  - EXPKEYSIG fails for the current key.
  - For a retired key, EXPKEYSIG is accepted only when the
    immutable-release record dates the release inside that key's window.
    The signature's own timestamp plays no part.
  ADR-0057's rotation bullet points at the rule.
- ADR-0016's Status line records the Homebrew tap's single-user exception
  (ADR-0056), as ADR-0006's records ADR-0057.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 301a8d2e4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

/oc

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

PR Review: docs(adr): ADR-0053–0057, the subsidiary decisions of RFC-0017 (#250)

Decision: 🟡 Minor changes
Iteration: Review #5 (13 resolved, 0 open)
Lenses applied: design decision (docs/adr/0053–0057, 0006, 0016), CI/supply chain (ADR-0053–0056 against the existing workflows), key lifecycle and the release-verification chain. The Rust-under-crates/ lens does not apply: the diff is documentation only.

Executive summary

Five Proposed ADRs record RFC-0017's release infrastructure: the tag-triggered workflow, artifact integrity and SBOM, interop/systemd gates on published binaries, the Homebrew tap, and PGP release signing. The earlier round's fail-open tooling issues are genuinely fixed, and the ADRs now inherit the RFC's containment model. The remaining risk is concentrated in the verification chain: the documented user path cannot verify retired-key releases, compromise recovery has no authenticated successor key, the advisory contradicts its own remediation, and the release gate reuses a workflow that still carries a persisted token and a cache. None is a live vulnerability — the ADRs are Proposed and the workflow is unwritten — but each is a design gap that should be closed in the ADR before the implementing PRs land.

Previous issues

# Issue Status Notes
1 macOS gate built only ssh/ssh-keygen, so sftp/scp fell back to the system 10.5p1 ✅ resolved ADR-0055 §3: make install-nosysconf plus the pre-gate resolution assertion (d0ad61e)
2 [email protected] had no real-client coverage; Linux coverage was overstated ✅ resolved ADR-0055 §5: openssh_aes_gcm check (cf5addd)
3 Compromise "unaffected" classification trusted a signer-controlled PGP timestamp ✅ resolved ADR-0057: immutable-release record + attestation transparency-log time (cf09748)
4 Tap CI could not start the service (no host key, no authorized_keys) ✅ resolved ADR-0056 §4 step 4 (d0ad61e)
5 Tap branch protection weaker than main's; checksum check only advisory ✅ resolved Required checks plus enforce_admins (cf09748, d0ad61e)
6 release.yml/verify-release.sh referenced as existing, without (new) markers ✅ resolved cf5addd
7 Bare gpg --verify passes for revoked/expired keys ✅ resolved ADR-0054 §7 pinned check used in all four places (cf5addd)
8 cargo-cyclonedx ran in the build job beside the release tarball ✅ resolved Own sbom job, contents: read (cf5addd)
9 EXPKEYSIG made "old releases remain verifiable" false ✅ resolved Pin set + retired-key rule (706c825)
10 ADR-0016 had no reciprocal status note for the tap exception ✅ resolved 706c825
11 Retired-key window only consulted when EXPKEYSIG fired ✅ resolved Window applies to every retired VALIDSIG (c97d3cf)
12 Retired-key date check accepted a forged SHA256SUMS ✅ resolved Also requires gh release verify-asset (14fc91d)
13 v0.1.0 unverifiable after expiry, listed as a benefit without caveat ✅ resolved 301a8d2

New findings

🟡 Important (should be resolved)

docs/adr/0053-release-workflow.md:44-50 — CI/supply chain (confidence: 84)

Problem: ADR-0053 §1 states two invariants for the release run, and the second says explicitly that "an executed binary must find no token in .git/config". But ADR-0055 §1 delegates the release gates to interop.yml (0055:39-47), and that workflow contradicts both invariants on the artifact path:

# .github/workflows/interop.yml:99-100 — no with:, so persist-credentials defaults to true
- name: Checkout
  uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

# ..:122-123 — unconditional, runs on the artifact path too
- name: Cache cargo registry, index and target
  uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2.9.3

ADR-0055 §1 says only that the artifact path "skips the toolchain and cargo build". Nothing removes the cache or the persisted token from the job that extracts and executes the release binary. ADR-0053 §1's wording ("in this workflow") is scoped to release.yml's own YAML, so the invariant is quietly lost in the called workflow.
Fix: In the implementing change to interop.yml, set with: persist-credentials: false on the checkout and guard the cache step (if: inputs.artifact == ''). Amend ADR-0053 §1 to say the invariants cover called workflows, and ADR-0055 §1 to list the cache and checkout credentials among the things the artifact path must remove.
Anchor: ADR-0053 §1 (and its citation of RFC-0017 §4 step 2); threat model §5.5.2.a.

docs/adr/0054-release-artifact-integrity.md:111-114 and :152-184 — key lifecycle / user verification (confidence: 88)

Problem: The documented user path cannot verify a release signed by a retired key, which contradicts ADR-0057's promise that "old releases remain verifiable after the key expires" (0057:56-61). Two separate causes:

  1. §6 step 1 says "Import the project key" and points at SECURITY.md, which publishes only keys/security.asc — a single key (SECURITY.md:29-45). ADR-0005's rotation updates that file to the successor, so after a rotation a user has no retired key in the keyring: an old SHA256SUMS.asc fails with NO_PUBKEY before §7's rule can run.
  2. §7 says the check is used in the user recipe "which docs/deployment.md gives as a one-line shell function". The retired-key branch requires three operations: gh release verify (publication date inside the window in keys/) and gh release verify-asset for both SHA256SUMS and SHA256SUMS.asc. No one-line gpg invocation can perform them.
    Fix: Publish the pin set as an importable bundle or a keys/ manifest (fingerprint, current/retired role, first-use and retirement dates), make §6 step 1 import all of it, and replace the one-liner with a script or an explicit multi-step procedure that runs the window and asset-digest checks for retired keys.
    Anchor: ADR-0057 §Rotation; ADR-0054 §6/§7; threat model §6.5 ("documentation as defence").

docs/adr/0057-release-signing-with-the-project-pgp-key.md:51-53 and :80-81 — key lifecycle / compromise recovery (confidence: 82)

Problem: The compromise procedure has no authenticated successor key. Rotation says "The successor key is published in keys/ with a signature from the old key", and the compromise section reuses that mechanism ("signed by the successor key, published under keys/ as under rotation"). But in the compromise case the old key is hard-revoked and held by the attacker: its certification of the successor is worthless, and ADR-0054 §7's pinned check rejects every signature it made. An attacker can mint a rogue key certified by the stolen old key and sign a rogue advisory. The only out-of-band channel in the repo is SECURITY.md's optional "for extra assurance" cross-check, which the procedure never invokes.
Fix: Pre-commit the successor fingerprint through a channel the old key does not control (the project site, DNS, or a signed statement carried in a release published before the compromise) and make the advisory's verification name that value. Alternatively state plainly that recovery depends on that out-of-band value and remove the implication that the old-key certification authenticates the successor.
Anchor: ADR-0057 §Compromise; ADR-0054 §7; RFC-0017 §11 (the signing ADR must cover what a PGP-key compromise means for published releases).

docs/adr/0057-release-signing-with-the-project-pgp-key.md:85 — contradiction in the recovery procedure (confidence: 84)

Problem: The advisory "lists every later release as untrusted", while the next bullet says "The fix ships as a new release signed with the successor key." The fix is necessarily a later release, so the advisory classifies the remediation as untrusted and users have no trusted version to move to.

- lists every later release as untrusted.
...
- **The fix ships as a new release** signed with the successor key.

Fix: Scope the bullet to releases signed with the compromised key at or after the exposure ("every later release signed with the compromised key"), and list the successor-signed fix as trusted by digest.
Anchor: ADR-0057 §Compromise; ADR-0054 §6.

docs/adr/0054-release-artifact-integrity.md:74-84 — verification-chain completeness (confidence: 80)

Problem: §4 verifies "each tarball and the SBOM", recomputes SHA256SUMS from those files, and compares it with the draft's copy — but it never asserts that the draft contains exactly the §1 assets and no others. The draft is mutable until publication (docs/adr/0054...:100-103), and the publish job holds contents: write. An extra unsigned asset added to the draft (for example an install.sh) ships inside the immutable release, has no line in SHA256SUMS, and every documented check still passes. RFC-0017 §3 defines a closed set of per-release artifacts.
Fix: Before signing, assert that the draft's asset names equal the §1 table exactly and fail on any extra or missing asset (and record that check in scripts/verify-release.sh).
Anchor: ADR-0054 §1/§4; RFC-0017 §3; threat model §6.4 ("substitution of a release asset after publication").

💡 Suggestions (nice to have)

  • docs/adr/0054-release-artifact-integrity.md:138: §7 equates gpg --status-fd 1 --verify with "git verify-tag --raw for tags", but --raw writes the GnuPG status to stderr. State the exact invocation (2>&1) and the "no VALIDSIG line ⇒ failure" rule, so the precheck implementation cannot parse an empty stdout and either block every release or accept every tag.
  • [PR description]: it still says the SBOM is "made by cargo-cyclonedx in the read-only build job". ADR-0054 §2 and ADR-0053 §2 now put it in its own sbom job; the description is stale from before cf5addd.

opencode v2.2.3 · opencode-go/deepseek-v4.1-flash · github run

…set bundle, successor auth, exact draft assets

opencode, fifth review of #250 (of 301a8d2):

- ADR-0053 §1: the no-cache and persist-credentials invariants cover
  called workflows. ADR-0055 §1's artifact path skips rust-cache and
  checks out without persisted credentials.
- ADR-0054 §6: the pin set is published as keys/release-keys.txt (with
  role and window), the current key, and keys/retired/*.asc, and users
  import all of them. The one-liner is replaced by
  scripts/verify-download.sh, which implements §7 including the
  retired-key branch.
- ADR-0057: in a compromise, the old key's certification of the
  successor proves nothing. The successor fingerprint is authenticated
  by an SSH-signed commit on main (ADR-0006) and by quantumssh.org. The
  advisory marks as untrusted only releases signed with the compromised
  key, and lists the successor-signed fix as trusted.
- ADR-0054 §4: the draft must hold exactly §1's assets, and any extra or
  missing asset stops the release.
- ADR-0054 §7: `git verify-tag --raw` writes status lines to stderr
  (2>&1). Output with no VALIDSIG line fails.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Answer to opencode review #5 (of 301a8d2). All of it is fixed in c653999. e0088c1 then merges main, signed.

  1. Called workflows. Agreed. ADR-0053 §1 now says that the no-cache and persist-credentials: false invariants hold for release.yml and every workflow it calls. ADR-0055 §1's artifact path skips Swatinem/rust-cache (if: inputs.artifact == '') and checks out with persist-credentials: false.
  2. Users cannot verify a retired-key release. Agreed.
    • ADR-0054 §6 publishes the pin set as keys/release-keys.txt (fingerprint, role, first use, retirement), along with keys/security.asc and keys/retired/<fingerprint>.asc. Users import every key the manifest lists.
    • The one-liner is replaced by scripts/verify-download.sh vX.Y.Z, which implements §7 in full, including the retired-key window and the asset-digest checks.
    • ADR-0057's rotation bullet updates the manifest and moves the old key to keys/retired/.
  3. The successor is not authenticated in a compromise. Agreed. ADR-0057 now says that the old key's certification proves nothing in that case. The successor's fingerprint is published through channels the PGP key does not control: an SSH-signed commit on main (ADR-0006) and quantumssh.org. The advisory names that fingerprint, and users check it on both channels.
  4. "Every later release untrusted" also condemns the fix. Agreed. The advisory now marks as untrusted only the releases signed with the compromised key at or after the exposure, and lists the successor-signed fix as trusted, by digest.
  5. Exact draft asset set. Agreed. ADR-0054 §4 step 2 now requires the draft to hold exactly §1's assets. An extra asset, such as an unsigned install.sh, or a missing one stops the release.

Suggestions:

  • git verify-tag --raw. §7 now gives 2>&1, because --raw writes status to stderr, and says that no VALIDSIG line at all is a failure.
  • Stale PR description. It now says the SBOM comes from its own sbom job.

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

/oc

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: e0088c15a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

PR Review: docs(adr): ADR-0053–0057, the subsidiary decisions of RFC-0017 (#250)

Decision: 🔴 Blocked
Iteration: Review #6 (17 resolved, 1 partly resolved)
Lenses applied: design decision (docs/adr/0053–0057, 0006, 0016), CI/supply chain (ADR-0053–0056 against the existing workflows), key lifecycle and the release-verification chain. The Rust-under-crates/ lens does not apply: the diff is documentation only.

Executive summary

The five ADRs are well structured, cite RFC-0017 accurately, and close most of the fail-open issues raised in earlier rounds. The remaining risk is concentrated in compromise recovery: the successor-authentication channel is not actually independent, and the compromise procedure never delivers the revocation to the key file every documented verifier imports. Two further verification-chain inconsistencies remain in ADR-0054 and ADR-0056. External facts (the Debian OCI index, the OpenSSH tarball hash, repository settings) could not be verified without network access and are not treated as findings; commit signatures were taken from commits.jsonl (verified: true for all ten commits).

Previous issues

# Issue Status Notes
1 macOS gate built only ssh/ssh-keygen, so sftp/scp fell back to the system 10.5p1 ✅ resolved ADR-0055 §3: make install-nosysconf plus the pre-gate resolution assertion (d0ad61e)
2 [email protected] had no real-client coverage ✅ resolved ADR-0055 §5: openssh_aes_gcm check (cf5addd)
3 Compromise “unaffected” classification trusted a signer-controlled PGP timestamp ✅ resolved ADR-0057 now uses the immutable-release record and attestation time (cf09748)
4 Tap CI could not start the service / lacked authorized_keys ✅ resolved ADR-0056 §4 step 4 (d0ad61e)
5 Tap branch protection was weaker than claimed and the checksum check advisory ✅ resolved ADR-0056 §1/§4 (cf09748, d0ad61e)
6 Non-existent release.yml / verify-release.sh referenced without a (new) marker ✅ resolved ADR-0053/0054/0055 implementation lines now mark them (cf5addd)
7 cargo-cyclonedx ran in the build job that held release tarballs ✅ resolved ADR-0054 §2 / ADR-0053 §2: separate sbom job (cf5addd)
8 Bare gpg --verify exits 0 for revoked/expired keys ✅ resolved ADR-0054 §7 pinned status-fd check (cf5addd)
9 EXPKEYSIG made old releases unverifiable after expiry ✅ resolved Pin set and retired-key rule (706c825)
10 ADR-0016 had no reciprocal Status note ✅ resolved ADR-0016 Status line (706c825)
11 Retired-key window was gated on EXPKEYSIG only ✅ resolved Window applies to every retired-key VALIDSIG (c97d3cf)
12 Retired-key date check did not bind SHA256SUMS to the immutable asset digest ✅ resolved gh release verify-asset added (14fc91d)
13 v0.1.0 unverifiable after key expiry, without caveat ✅ resolved ADR-0057 Positive bullet caveat (301a8d2)
14 Called workflows still carried a cache/persisted credentials ✅ resolved ADR-0053 §1 and ADR-0055 §1 (c653999)
15 User path could not verify retired-key releases ✅ resolved Pin set + scripts/verify-download.sh (c653999)
16 Successor key not authenticated in a compromise 🔄 partly resolved c653999 added the SSH-signed commit and quantumssh.org; the latter is a redirect to the same GitHub repo, so the claim is not met — see New finding 1
17 Advisory “every later release untrusted” also condemned the fix ✅ resolved Fix is now trusted by digest (c653999)
18 Exact draft asset set not enforced ✅ resolved ADR-0054 §4 step 2 added the exact-set check (c653999); the new wording has its own contradiction — see New finding 4

New findings

🔴 Blocking (resolve before merge)

docs/adr/0057-release-signing-with-the-project-pgp-key.md:81-92 — compromise recovery / successor authentication (confidence: 92)

Problem: The ADR says the successor fingerprint is published through channels the PGP key does not control: an SSH-signed commit on main and quantumssh.org, “a different origin.” In fact quantumssh.org is a 301 to https://github.com/gonzafg2/quantumssh and serves no independent copy (docs/infrastructure.md:161-164). Both named channels therefore resolve to the same GitHub repository. The SSH channel is independent only against a PGP-key-only compromise: docs/threat-model.md §5.5.2.b explicitly includes compromise of the maintainer’s development environment and credentials, and ADR-0006 itself says reusing the SSH auth key means one compromise affects both surfaces. Under the compromise this procedure is meant to recover from, an attacker can publish a rogue successor and have it “verified” by both channels.

- **The successor is authenticated without the old key.** ...
  - an SSH-signed commit on `main` ...
  - `quantumssh.org`, a different origin, which `SECURITY.md`
    already names for cross-checks.

Fix: Remove the false “different origin” claim and narrow the SSH-channel claim to a PGP-key-only compromise. Add a genuinely independent channel — e.g. a pre-committed successor fingerprint, a _security.quantumssh.org DNSSEC TXT record verified with dig, an offline/hardware-backed key, or a multi-party witness — and record the residual risk for full endpoint/GitHub compromise in threat model §7.
Anchor: threat model §5.5.2.b; ADR-0006 §Consequences/Negative; CLAUDE.md “Fail closed”.

docs/adr/0057-release-signing-with-the-project-pgp-key.md:63-72 — revocation delivery / fail-open (confidence: 90)

Problem: The compromise step says only “Publish the revocation certificate (ADR-0005)” and then assumes “After the revocation reaches a user’s keyring, every PGP check of every release fails.” But ADR-0005 contains no compromise procedure, and every documented verifier imports the repository file: ADR-0054 §6 users import keys/security.asc from main, the tap CI fetches the same file, and precheck reads it from origin/main. The compromise section never says to append the revocation to keys/security.asc, update keys/release-keys.txt, SECURITY.md, operations.md, or the tap’s pinned fingerprint, nor to tell users to re-import. A maintainer who publishes only to a keyserver leaves every documented verifier importing a stale unrevoked key; the §7 check then sees a clean VALIDSIG with no REVKEYSIG/KEYREVOKED and accepts a forged SHA256SUMS.

- **Compromise.**
  - Publish the revocation certificate (ADR-0005). ...
    After the revocation reaches a user's keyring, every PGP check of
    every release fails.

Fix: Make repository key publication a required, ordered step: append the hard revocation to keys/security.asc, commit it on main with an SSH-signed commit, update the manifest/SECURITY.md/tap pin, and instruct users to re-fetch and re-import before running §7. Add a negative test that a revoked keys/security.asc makes verify-download.sh and the tap CI fail.
Anchor: ADR-0054 §6–§7; ADR-0005; CLAUDE.md “Fail closed”; threat model §6.4.

🟡 Important (should be resolved)

docs/adr/0057-release-signing-with-the-project-pgp-key.md:93-99 — advisory classification still trusts signer time (confidence: 84)

Problem: Lines 73–76 correctly say an attacker can forge signature timestamps and that “unaffected” must rest on immutable-release publication evidence. The advisory bullet then lists as untrusted every release “signed with the compromised key at or after that time” — a signature-creation-time test. A backdated forged signature, or a release signed before exposure but published after it, falls into neither the unaffected list nor the untrusted list. This is the residual of the earlier signer-timestamp issue on the untrusted half.
Fix: Use publication time from the immutable-release record, and make the classification exhaustive: list every unaffected release by SHA256SUMS digest, and state that every release not on that list is untrusted. Never key the denylist to the signature timestamp.
Anchor: ADR-0054 §7 (“Neither check trusts a signer-chosen timestamp”); ADR-0057 lines 73–76; CLAUDE.md “Fail closed”.

docs/adr/0054-release-artifact-integrity.md:74-79 — contradictory pre-signature asset set (confidence: 88)

Problem: §1’s asset table includes SHA256SUMS.asc, but §4 step 2 says the draft must hold “exactly the assets of §1, the three tarballs, the SBOM and SHA256SUMS, and nothing else.” SHA256SUMS.asc is uploaded only later, after scripts/verify-release.sh passes. Under the literal six-asset reading the script fails on every release; the likely workaround is to drop the exact-set check, reopening the extra-asset hole this exact-set rule was added to close.
Fix: Define the pre-signature draft as exactly five assets (three tarballs, SBOM, unsigned SHA256SUMS), then re-check exactly §1’s six assets after SHA256SUMS.asc is uploaded and immediately before publishing. Keep equality, never a presence-only check.
Anchor: RFC-0017 §4 step 4; ADR-0054 §1; CLAUDE.md “Fail closed”.

docs/adr/0056-homebrew-tap.md:102-107 — tap CI does not implement the §7 pin set (confidence: 85)

Problem: Tap CI step 1 fetches only keys/security.asc and pins one current fingerprint; step 2 then claims to run ADR-0054 §7. But §7 is defined over keys/release-keys.txt, keys/retired/<fingerprint>.asc, the retired-key window from gh release verify, and the gh release verify-asset checks. None of those appear in the tap CI. ADR-0054 §7 explicitly lists the tap CI as a user of the full check, and ADR-0057 promises old releases remain verifiable after rotation. The usual per-release bump is unaffected, but at rotation, during an in-flight release, or when re-pointing to an older release, the required tap check fails closed and blocks all tap maintenance until the workflow is manually edited.
Fix: Fetch and import the full pin-set bundle, invoke the shared scripts/verify-download.sh (or equivalent) including the retired-key branch, and add “update the tap’s pinned current fingerprint” to ADR-0057’s rotation checklist.
Anchor: ADR-0054 §6–§7; ADR-0057 rotation; RFC-0017 §7; CLAUDE.md “Fail closed”.

💡 Suggestions (nice to have)

  • docs/rfcs/0017-alpha-distribution.md:117,325,401: the accepted RFC still shows bare gpg --verify for the user install, maintainer check, and tap CI, which ADR-0054 §7 now declares insufficient. Add a post-acceptance erratum under ADR-0052 pointing at scripts/verify-download.sh / the pinned check, so the source-of-truth RFC does not keep a fail-open command.
  • docs/infrastructure.md:275-277: “PGP remains the project’s tool for embargoed-disclosure encryption; the two roles are intentionally separated by tool” is now false for PGP, since ADR-0057 gives it release-signing too. Update the identity/signing section to match ADR-0006’s new Status line and ADR-0057.

opencode v2.2.3 · opencode-go/deepseek-v4.1-flash · github run

…cedure, DNSSEC anchor, five-then-six assets

opencode, sixth review of #250 (of e0088c1):

- ADR-0057's compromise section is now an ordered procedure:
  1. revoke in keys/security.asc on main via an SSH-signed commit, and
     update the manifest, SECURITY.md and the tap pin, with a negative
     test proving a revoked key fails verify-download.sh and the tap CI;
  2. every PGP check then fails after re-import;
  3. classification is exhaustive, by immutable publication record:
     every release not on the advisory's digest list is untrusted, with
     no signature-time denylist;
  4. the successor is authenticated by an SSH-signed commit (independent
     only of a PGP-key compromise) and by a DNSSEC-signed TXT record,
     _release-key.quantumssh.org, behind the separate Cloudflare
     credential;
  5. the fix ships as a new release.
  quantumssh.org is no longer called an independent origin, since it
  redirects to GitHub. The residual risk of an endpoint plus Cloudflare
  compromise is stated. Rotation also updates the TXT record and the tap
  pin.
- ADR-0054 §4: the draft must hold exactly five assets before signing
  and exactly six before publishing, compared for equality.
- ADR-0056 §4: the tap CI imports the whole pin set and runs
  scripts/verify-download.sh, retired-key branch included.
- Suggestions:
  - RFC-0017 gets an ADR-0052 erratum: its bare `gpg --verify` commands
    fail open, and each is to be read as ADR-0054 §7's check;
  - docs/infrastructure.md now records PGP's release-signing role.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Answer to opencode review #6 (of e0088c1). Everything is fixed in 23489c3.

Blocking

  1. Successor authentication. Agreed; the "different origin" claim was false. quantumssh.org is a 301 to the repository (docs/infrastructure.md §"Web endpoints"). ADR-0057's compromise step 4 now names two channels:

    • An SSH-signed commit on main. It is now described as independent only of a PGP-key compromise, because the SSH key lives on the same endpoint (threat model §5.5.2.b).
    • A DNSSEC-signed TXT record, _release-key.quantumssh.org, carrying the current release-key fingerprint. It is set when the ADR is implemented and updated at every rotation. Changing it requires the separate Cloudflare credential, and users check it with dig +dnssec.

    The residual risk is now stated explicitly: a compromise of the endpoint together with the Cloudflare account defeats both channels, and with one maintainer there is no independent witness. It is assigned to threat model §7.

  2. Revocation delivery. Agreed. Step 1 is now ordered:

    • append the hard revocation to keys/security.asc in an SSH-signed commit on main;
    • mark the key revoked in the manifest;
    • update SECURITY.md and the tap pin.

    The text says why a keyserver-only revocation would fail open. Step 2 tells users to re-fetch and re-import. It adds a negative test requiring that a revoked keys/security.asc makes verify-download.sh and the tap CI fail.

Important

  1. Classification still trusted signature time. Agreed. Step 3 is now exhaustive and based on the immutable publication record. The advisory lists every unaffected release by its SHA256SUMS digest, the successor-signed fix included, and every release not on that list is untrusted. There is no denylist keyed to a signature time.
  2. Pre-signature asset set. Agreed. ADR-0054 §4 now checks for exactly five assets before signing (three tarballs, the SBOM and the unsigned SHA256SUMS). It checks again for exactly six after SHA256SUMS.asc is uploaded, immediately before publishing. Both checks are equality checks.
  3. The tap CI did not implement the pin set. Agreed. ADR-0056 §4 now imports the whole bundle (manifest, current key, retired keys) and runs the shared scripts/verify-download.sh, including the retired-key branch. ADR-0057's rotation updates the tap pin and the TXT record.

Suggestions

  • RFC-0017 gains an ADR-0052 post-acceptance erratum: its bare gpg --verify commands fail open, and each one is to be read as ADR-0054 §7's pinned check.
  • docs/infrastructure.md now records PGP's release-signing role (ADR-0057), with commits staying on SSH.

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

/oc

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23489c3cd1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…delv

Codex on #250 (P2): `dig +dnssec` only requests DNSSEC records and does
not validate them. Users now check `_release-key.quantumssh.org` with
`delv`, which validates against the root trust anchor locally, and accept
the fingerprint only on "; fully validated". A resolver's `ad` flag
counts only over an authenticated channel such as DoT or DoH.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: ed2e606a11

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

PR Review: docs(adr): ADR-0053–0057, the subsidiary decisions of RFC-0017 (#250)

Decision: 🟡 Minor changes
Iteration: Review #7 (six earlier opencode rounds on this PR; 16 issues re-checked: 15 resolved, 1 partly resolved)
Lenses applied: design decision (docs/adr/0053–0057, 0006, 0016), release supply chain/CI (ADR-0053–0056), key lifecycle and verification chain (ADR-0054 §6–7, ADR-0057). The Rust-under-crates/ lens does not apply: the diff is documentation only.

Executive summary

The PR closes RFC-0017 §12 with five Proposed ADRs for the release workflow, artifact integrity, gates on published bytes, the Homebrew tap and PGP release signing. The containment model is sound — least-privilege jobs, gates before attestation, the pinned --status-fd signature check, and a labelled tap exception — and the earlier fail-open issues are genuinely fixed at head. The remaining problems are in the design record itself: the pin-set schema cannot express the state its own compromise procedure creates, one documented verifier is left out of the revocation-delivery invariant, and the ADR still presents the planned pin-set files as existing.

Previous issues

# Issue Status Notes
1 macOS gate built only ssh/ssh-keygen, so sftp/scp fell back to the system 10.5p1 ✅ ADR-0055 §3: make install-nosysconf plus the pre-gate resolution assertion (d0ad61e)
2 [email protected] had no real-client coverage ✅ ADR-0055 §5 openssh_aes_gcm check (cf5addd)
3 Compromise "unaffected" classification trusted a signer-chosen PGP timestamp ✅ ADR-0057 step 3 now uses the immutable-release record and attestation time (cf09748)
4 Tap CI could not start the service (no host key, no authorized_keys) ✅ ADR-0056 §4 step 4 (d0ad61e)
5 Tap branch protection weaker than claimed; checksum check advisory ✅ ADR-0056 §1 adds enforce_admins and required checks (cf09748, d0ad61e)
6 Bare gpg --verify fails open for revoked/expired keys ✅ ADR-0054 §7 pinned check replaces it everywhere (cf5addd)
7 cargo-cyclonedx installed in the job that holds the release tarball ✅ Own sbom job, contents: read (cf5addd)
8 New files referenced without a (new) marker 🔄 Fixed for release.yml (cf5addd); recurs for the keys/ pin set — see finding 1
9 Called workflows kept caches and persisted credentials ✅ ADR-0053 §1 covers called workflows; ADR-0055 §1 (c653999)
10 Users could not verify a retired-key release ✅ Pin set + scripts/verify-download.sh (c653999)
11 Successor key not authenticated in a compromise; quantumssh.org falsely called independent ✅ SSH-signed commit + DNSSEC TXT record + stated residual risk (23489c3)
12 Compromise procedure never delivered the revocation to the key file verifiers import ✅ ADR-0057 step 1 is now ordered (23489c3)
13 Classification still trusted signature time ✅ Step 3 is exhaustive, by SHA256SUMS digest (23489c3)
14 Draft asset set not compared for exactness ✅ ADR-0054 §4: five assets before signing, six before publishing (23489c3)
15 Retired-key window enforced only on EXPKEYSIG; then no asset-digest binding ✅ c97d3cf, 14fc91d
16 v0.1.0 unverifiable after key expiry, listed as a benefit without caveat ✅ 301a8d2

New findings

🟡 Important (should be resolved)

docs/adr/0054-release-artifact-integrity.md:9 — documentation accuracy (confidence: 84)

Problem: The Related line says "Two files are new … .github/workflows/release.yml and scripts/verify-release.sh". The same ADR declares a third at :135 ("scripts/verify-download.sh vX.Y.Z, a new file created by the implementing PR"), and §6 presents keys/release-keys.txt (:122) and keys/retired/<fingerprint>.asc (:126) in the present tense, with §7 adding "Today that is only 66DB…" (:167). In this tree keys/ contains only security.asc, and neither script exists. ADR-0056 §4 then instructs the tap CI to fetch keys/release-keys.txt, keys/security.asc and keys/retired/*.asc from main (:102–106). This is the rule raised for release.yml in an earlier round, now recurring for the pin set.
Fix: Correct the count to three files plus the keys/retired/ directory, mark keys/release-keys.txt and keys/retired/ as new in §6 (or state that the implementing PR creates them before 0.2.0), and list them in the Implementation line.
Anchor: CLAUDE.md §What not to do: "Do not reference files or paths that do not exist yet as if they do; mark planned work (Phase 2+) as TBD."

docs/adr/0057-release-signing-with-the-project-pgp-key.md:69–70 — key-lifecycle schema inconsistency (confidence: 88)

Problem: The compromise procedure says "In the same commit, mark the key revoked in keys/release-keys.txt", but ADR-0054 §6 defines the manifest with "role (current or retired)" only (:123) and assigns keys/security.asc to "the current key" (:125). The procedure also never says where the revoked key or the successor goes afterwards — step 4 only "adds the key to keys/ and the manifest" (:104–105). A verifier following §6 ("import every key the manifest lists") therefore has no defined behaviour for the one state the compromise procedure creates, and §7's guarantee that REVKEYSIG/KEYREVOKED always fail depends on the revoked key staying in the imported pin set.
Fix: Extend the role enum to current | retired | revoked, and state the post-compromise layout explicitly: successor → keys/security.asc; revoked key → keys/retired/<fingerprint>.asc with the revocation certificate; then define how scripts/verify-download.sh treats each role.
Anchor: ADR-0054 §7 ("no REVKEYSIG, KEYREVOKED or BADSIG line appears. These always fail") and threat model §6.5 (verification recipes must let an operator confirm the claim).

docs/adr/0057-release-signing-with-the-project-pgp-key.md:73–76 — fail-closed gap in the release chain (confidence: 82)

Problem: "Every documented verifier imports from main: ADR-0053's precheck, verify-download.sh and the tap's CI." This omits scripts/verify-release.sh, which ADR-0054 §7 lists as one of the four places the pinned check is used (:205–210). ADR-0054 §4 never says where that script gets its keyring, while precheck is explicitly pinned to keys/security.asc from origin/main (ADR-0053:59). A script using the maintainer's local keyring would not have imported the revocation/retired keys published to main and could pass a signature the documented check must reject — contradicting step 2 ("every PGP check of every release fails") and ADR-0054 §7 ("Every PGP verification in the release chain therefore runs …").
Fix: Add scripts/verify-release.sh to the list and require it to import the pin set from origin/main, exactly as precheck does, before the tag and SHA256SUMS checks.
Anchor: CLAUDE.md §Hard security rules: "Fail closed. … No downgrade path may exist."

💡 Suggestions (nice to have)

Verification notes: commit signatures were read from .verified in commits.jsonl (all 11 commits true). External facts — the Debian OCI index including linux/arm64/v8, the OpenSSH 10.6p1 tarball hash, gh/GnuPG flag behaviour, and repository settings — could not be verified offline and are not treated as findings.


opencode v2.2.3 · opencode-go/deepseek-v4.1-flash · github run

…verify-release keyring, shipped unit

opencode, seventh review of #250 (of 23489c3):

- ADR-0054 marks every new path as created by the implementing PRs:
  verify-download.sh, keys/release-keys.txt and keys/retired/. The
  manifest's role is current, retired or revoked, and
  verify-download.sh's handling of each role is defined. Revoked keys
  stay in the imported set so that GPG reports REVKEYSIG, never
  NO_PUBKEY.
- ADR-0057's compromise layout: the revoked key moves to keys/retired/
  with its revocation certificate and the role `revoked`, and the
  successor takes security.asc once authenticated. verify-release.sh
  imports the pin set from origin/main like precheck does (ADR-0054 §4
  step 1), and it is added to the verifier list.
- Suggestions:
  - ADR-0055's systemd gate sets SRC to the extracted tarball, so the
    shipped unit is the one tested;
  - the accept.rs path is corrected.

Claude-Session: https://claude.ai/code/session_01QpBZ4pLj7mjenN8SXpJehu
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Answer to opencode review #7 (of 23489c3). Everything is fixed in 069b3fe.

Important

  1. New paths shown as existing. Agreed. ADR-0054's Implementation line now lists every new path the implementing PRs create before 0.2.0: release.yml, verify-release.sh, verify-download.sh, keys/release-keys.txt and keys/retired/. It also notes that keys/ holds only security.asc today. §6 marks the manifest and the directory as new.
  2. The manifest had no revoked role. Agreed.
    • The role is now current | retired | revoked, and verify-download.sh's handling of each one is defined: revoked always fails.
    • Revoked keys stay in the imported set, so GnuPG reports REVKEYSIG and never falls back to NO_PUBKEY.
    • ADR-0057's compromise step 1 now states the layout: the revoked key moves to keys/retired/<fingerprint>.asc with its revocation certificate and the role revoked, and the successor takes keys/security.asc once step 4 has authenticated it.
  3. verify-release.sh's keyring. Agreed. ADR-0054 §4 step 1 now imports the pin set from origin/main, as precheck does, never from the local keyring alone. ADR-0057 adds the script to the list of verifiers that import from main.

Suggestions

  • systemd gate. It now sets SRC to the extracted tarball, so the shipped contrib/systemd/quantumssh.service is the unit under test. The script writes its own config, and the ADR says the tarball's example config is not exercised.
  • accept.rs path. Corrected to crates/quantumssh-core/tests/accept.rs.

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@gonzafg2

gonzafg2 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

/oc

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 069b3fedd0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@gonzafg2
gonzafg2 merged commit 91cf15c into main Nov 3, 2026
14 checks passed
@gonzafg2
gonzafg2 deleted the docs/adr-0053-0057-distribution branch November 3, 2026 20:02
gonzafg2 added a commit that referenced this pull request Nov 4, 2026
Its Date line said "accepted on merge", and it merged in #250, but the
Status line still read Proposed. ADR-0006 already records the part of
its wording that ADR-0057 supersedes.

Refs #248

Signed-off-by: Gonzalo Fleming <[email protected]>
gonzafg2 added a commit that referenced this pull request Nov 4, 2026
* docs(adr): ADR-0053 and ADR-0055 are Accepted

Both were implemented in #253. The rehearsal run 41751733656 on
rehearsal-0.2.0-1 then passed end to end: three static builds, the SBOM,
the four gates on the artifacts, the attestations and the draft. The
draft held exactly five assets, the attestations verified under the
rehearsal ref and failed under refs/tags/v0.2.0, SHA256SUMS matched a
recomputation byte for byte, and the four gate records matched it. The
draft and the tag were deleted afterwards (ADR-0053 §4).

Refs #248

Signed-off-by: Gonzalo Fleming <[email protected]>

* docs(adr): ADR-0057 is Accepted

Its Date line said "accepted on merge", and it merged in #250, but the
Status line still read Proposed. ADR-0006 already records the part of
its wording that ADR-0057 supersedes.

Refs #248

Signed-off-by: Gonzalo Fleming <[email protected]>

---------

Signed-off-by: Gonzalo Fleming <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant