Skip to content

ci(interop): pin openssh-client to the snapshot the image was built from (ADR-0034) - #161

Merged
gonzafg2 merged 2 commits into
mainfrom
ci/interop-snapshot-pin
Sep 23, 2026
Merged

gonzafg2 merged 2 commits into
mainfrom
ci/interop-snapshot-pin

Conversation

@gonzafg2

Copy link
Copy Markdown
Owner

Summary

The OpenSSH interop gate installs openssh-client=1:10.0p1-7+deb13u4 from the snapshot.debian.org archive state its digest-pinned image was built from, and asserts the exact ssh -V string. This is the package-version pin ADR-0020 decided and #84 left out; ADR-0034 records the mechanism and supersedes ADR-0020's literal OpenSSH_10.0p1 assertion.

Motivation

  • ADR-0020 decided the pin; ci(interop): pin openssh-client to an exact version via snapshot.debian.org #98 could not land it. ci(interop): pin openssh-client to an exact version via snapshot.debian.org #98 pointed apt at a snapshot older than the image, whose libc6 was already newer than the archive; libc6-dev could not resolve. Reproduced locally on 2026-09-22 in the exact image (debian@sha256:28de0877… = debian:trixie-20260623-slim, amd64): the image's own debian.sources carries the snapshot timestamp it was built from (20260623T000000Z); at that timestamp the package installs with no libc6 change and ssh -V reads OpenSSH_10.0p2 Debian-7+deb13u4, OpenSSL 3.5.6 7 Apr 2026. One day and three months later the same package version still installs but libc6 and OpenSSL move underneath it; earlier timestamps fail as ci(interop): pin openssh-client to an exact version via snapshot.debian.org #98 did. So timestamp and version pin together, and the timestamp is read from the image, not chosen. The step checks SNAPSHOT against the image before apt runs.
  • Since ADR-0031 the gate blocks every merge, with no admin bypass. A client that floats with the mirror can turn every open PR red for a reason in no PR.
  • http rather than https (the slim image has no CA bundle; fetching one from the live mirror first is the mixed state ci(interop): pin openssh-client to an exact version via snapshot.debian.org #98 failed on; apt verifies the Release signatures) and Check-Valid-Until off (archived trixie-updates/-security Release files are past their seven-day validity). trixie-security offered only an older openssh-client at every timestamp; kept for symmetry.

This PR's own openssh-interop run is the first CI execution of the recipe; the local measurements (three timestamps, no throttling, ~2× slower than the CDN mirror from that network) are in ADR-0034's Context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that changes existing behaviour)
  • Documentation only
  • Refactor / chore / CI / build

Checklist

  • My commits are signed off under the
    Developer Certificate of Origin
    (git commit -s).
  • My commit messages follow Conventional Commits.
  • I have run cargo fmt --all and cargo clippy --workspace --all-targets -- -D warnings locally. (N/A: no Rust; actionlint passes.)
  • I have added or updated tests where appropriate. (N/A: the gate itself is the test.)
  • I have updated documentation (rustdoc, docs/, or README.md) where appropriate.
  • I have added a CHANGELOG.md entry under ## [Unreleased] if this change is user-visible. (N/A)
  • If this change introduces a new dependency, I have justified it in the PR description and verified it passes cargo deny check. (N/A)

Security considerations

Supply-chain hardening of the gate: base filesystem, package and OpenSSL now come from one frozen archive state, verified by apt's Release signatures; an OpenSSH change reaches the gate only through a reviewed bump of four values that move together (digest, SNAPSHOT, OPENSSH_CLIENT_VERSION, SSH_V_EXPECTED). New runtime dependency: snapshot.debian.org reachability, with Acquire::Retries "3". Every value in the run: script enters through env:.

Notes for reviewers

Automated reviews

PRs authored by dependabot[bot] (and other bots) do not trigger opencode, Claude Code Review or codex.
They are covered by CI (commit-lint, build, cargo deny, openssh-interop; cargo audit runs weekly) and manual review when needed.

https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa

@github-actions

Copy link
Copy Markdown

Reviewer: Codex (openai/codex-action, model gpt-5.6-terra)

PR Review: ci(interop): pin openssh-client to the snapshot the image was built from (ADR-0034) (#161)

Decision: 🟡 Minor changes
Iteration: First review
Lenses applied: CI/workflow supply chain, ADR design

Executive summary

The workflow appropriately pins the container image, Debian snapshot, OpenSSH package version, and asserted client version; actions are SHA-pinned and permissions remain minimal. The new ADR correctly documents this hardening, but its status conflicts with the repository’s ADR lifecycle once its implementation merges.

New findings

🟡 Important (should be resolved)

docs/adr/0034-openssh-interop-client-pinned-to-image-build-snapshot.md:3-6 — ADR lifecycle (confidence: 88)

Problem: The ADR remains Proposed even though it records a decision implemented by this same PR and declares itself to supersede part of accepted ADR-0020. The ADR process requires an ADR to become Accepted on merge; leaving it Proposed makes the load-bearing CI decision non-authoritative until an unspecified follow-up.

Fix: Set the status to Accepted in this PR, with the merge date.

Anchor: CLAUDE.md, “RFC vs ADR vs plain PR” (an ADR records a decision taken); docs/adr/README.md §Process (“On merge, the ADR is Accepted.”).

@gonzafg2

Copy link
Copy Markdown
Owner Author

Re Codex review #1, ADR-0034 Status: Proposed on merge with a follow-up flip is this repository's practice since the #86 sweep — ADR-0030, ADR-0031 and ADR-0032 merged Proposed and were flipped together in #158 — and #159 (open) amends docs/adr/README.md step 5 to say exactly that. ADR-0034 follows the same path and will be flipped with ADR-0033 once both merge; no change here.

For the record, this PR's openssh-interop run is the first CI execution of the snapshot pin: SNAPSHOT matched the image's build timestamp, openssh-client=1:10.0p1-7+deb13u4 installed from snapshot.debian.org, ssh -V matched the pinned string verbatim, and the gate passed in 1m01s — within the range of the live-mirror runs.

@claude

claude Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

PR Review: ci(interop): pin openssh-client to the snapshot the image was built from (ADR-0034) (#161)

Decision: 🟢 Approved
Iteration: First review
Lenses applied: CI (.github/workflows/interop.yml), design decision (docs/adr/0034, docs/adr/0020)

Executive summary

This PR completes the supply-chain pin ADR-0020 originally decided but left unimplemented in #84: openssh-client is now installed at an exact version from the snapshot.debian.org archive state the container image was built from, with the ssh -V string asserted verbatim. The four values that must move together (digest, SNAPSHOT, OPENSSH_CLIENT_VERSION, SSH_V_EXPECTED) are documented as one reviewed event in ADR-0034. The implementation is sound — both Signed-By keyring paths are correct, the heredoc indentation is safe under YAML block-scalar dedent, the check-before-overwrite ordering is intentional, and the p1/p2 discrepancy between package version and binary string is documented in ADR-0034 §Context. No issues reach the reporting threshold.

No issues found. Checked for bugs, CLAUDE.md compliance (CI: unpinned actions, token permissions, authorization gates, supply-chain; ADR: soundness against all five MANIFIESTO commitments and the threat model).

@opencode-agent

Copy link
Copy Markdown

PR Review: ci(interop): pin openssh-client to the snapshot the image was built from (#161)

Decision: 🟢 Approved
Iteration: First review
Lenses applied: CI (.github/workflows/interop.yml), design decision (docs/adr/0034, ADR-0020 Status edit)

Executive summary

The PR implements the package-version pin ADR-0020 decided, by pointing apt at the snapshot timestamp recorded in the digest-pinned image and asserting ssh -V verbatim; the only other changes are a matching Status-line edit on ADR-0020 and the new ADR-0034. Reviewing against the five commitments and the threat model, no hard constraint is touched: there is no first-party Rust, no change to KEX, ciphers, auth or the transport state machine, third-party actions remain SHA-pinned (interop.yml:93,96,101), permissions stay at contents: read (interop.yml:22-23), and every value in the run: script enters through env: with no ${{ }} interpolation (no script-injection surface).

Verification performed

The install recipe was reproduced end-to-end against the digest-pinned image. The digest sha256:28de0877… resolves to debian:trixie-20260623-slim (created 2026-06-23), and that image's /etc/apt/sources.list.d/debian.sources carries the commented # http://snapshot.debian.org/archive/debian/20260623T000000Z the step greps for (interop.yml:57-58), plus the debian-archive-keyring.pgp the rewritten sources use. With the new sources, apt installs openssh-client=1:10.0p1-7+deb13u4 with no libc6 change, ssh -V equals SSH_V_EXPECTED exactly, and mlkem768x25519-sha256 is offered. The YAML block scalar, unquoted heredoc (${SNAPSHOT} expands) and quoted heredoc (apt.conf, no expansion) parse and behave correctly, and the set -e-guarded checks are correctly written.

Previous issues

None — this is the first review of the PR.

New findings

No finding reaches the reporting threshold (≥80/100), so there is nothing to block on. Three candidate issues were raised and each refuted before reaching this report:

  • ADR-0031's Negative bullet is now stale — refuted (score 25). ADR-0031:88-92 was true at acceptance; it explicitly calls the pin "a separate decision", and ADR-0015 errata applies only to claims wrong at acceptance, so no errata banner is permitted here. ADR-0034 already cites ADR-0031.
  • ADR-0020 stays self-contradictory (Implementation: TBD vs the new Status line) — refuted (score 20). docs/adr/0020-…md:71 was already false at acceptance; this PR does not introduce it, and the open errata PR docs: correct the statements that no longer match the repository (errata on ADR-0016..0024) #159 the description names is the process-correct fix. Not a new finding.
  • Supersession declared against a Proposed ADR — refuted (score 15). Declaring a bullet superseded by an ADR that merges as Proposed and flips later is the repo's documented practice (544e756: "The three ADRs merged with Status: Proposed, as the repository does"; same pattern ADR-0008→0031, ADR-0025→0032). .github/REVIEW-FORMAT.md forbids flagging a convention the repo has not adopted.

Limitations: the workflow's execution on the GitHub-hosted runner itself was not observed; the recipe was verified against the pinned image directly. The http source with Acquire::Check-Valid-Until "false" is a deliberate, ADR-0034-documented trade-off (Release signatures still verified, exact package version and verbatim ssh -V bound the substitution surface), not a new defect.

Decision: 🟢 Approved

github run

gonzafg2 added a commit that referenced this pull request Sep 22, 2026
…each edit touched

Claude checked the Links lines against the milestone PRs' file
lists and found four wrong attributions: server.rs (ADR-0016) and
everything ADR-0022 names landed in M0 (#62), not M5/M3;
transport.rs (ADR-0021) landed in M3 (#65), not M2; and
log_fields.rs (ADR-0024) came with #101 on 2026-07-06, after the
ADR's acceptance. All four corrected, with the banners' milestone
references.

Each banner now says which section the edit touched (Context in
0018/0019, Related in 0021/0023/0024, both in 0022) instead of the
same sentence everywhere. ADR-0020's Links line no longer carries a
note about the unimplemented package pin — that is decision-level
content and lives in ADR-0034 (#161). ADR-0023 no longer points at
"PR #50 in review" for the event schema, and ADR-0021 drops a "(TBD)"
next to the kex module.

docs/adr/README.md step 5 distinguishes the governance state from the
file's Status line and lists what actually happened (ADR-0027 merged
Accepted; 0028/0029 flipped in their implementing PRs; 0030-0032 in
#158) instead of calling one instance the practice.
docs/infrastructure.md says first-party unsafe would need a
superseding ADR, as ADR-0018 states, not an RFC. Findings by Claude
and opencode on #159.

Claude-Session: https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa
Signed-off-by: Gonzalo Fleming <[email protected]>
…rom (ADR-0034)

Implements the package-version pin ADR-0020 decided and #84 left out.
The digest-pinned image (debian:trixie-20260623-slim) records in its
own debian.sources the snapshot.debian.org timestamp it was built
from; apt now reads from that timestamp, installs
openssh-client=1:10.0p1-7+deb13u4 with the build prerequisites, and
the job asserts the exact `ssh -V` string, OpenSSL build included.
The step checks that SNAPSHOT matches the image before apt runs.

#98 failed by pointing apt at a snapshot older than the image (its
libc6 was already newer than the archive). Reproduced locally in the
same image on 2026-09-22: the build timestamp installs with no libc6
change; later timestamps install the same package but move libc6 and
OpenSSL under it; earlier ones cannot resolve libc6-dev. Timestamp and
version pin together, and the timestamp is read from the image.

http rather than https because the slim image has no CA bundle and
apt verifies the Release signatures anyway; Check-Valid-Until off
because the archived trixie-updates/-security Release files are past
their validity window. ADR-0034 records the mechanism and the bump
procedure; ADR-0020's Status line points at it.

Claude-Session: https://claude.ai/code/session_018UmL9wcgKBGFjdjGSSLafa
Signed-off-by: Gonzalo Fleming <[email protected]>
@gonzafg2
gonzafg2 force-pushed the ci/interop-snapshot-pin branch from 0e42268 to fb19e87 Compare September 23, 2026 01:13
@github-actions

Copy link
Copy Markdown

Reviewer: Codex (openai/codex-action, model gpt-5.6-terra)

PR Review: ci(interop): pin openssh-client to the snapshot the image was built from (ADR-0034) (#161)

Decision: 🟢 Approved
Iteration: Review #2 (1 resolved, 0 open)
Lenses applied: CI supply chain, design decision (ADR-0034 / ADR-0020)

Executive summary

The workflow now binds the container filesystem, Debian archive state, OpenSSH package, and asserted client build together, while retaining SHA-pinned actions and minimal permissions. No Rust or transport-security surface changes; the gate continues to require the hybrid PQ KEX.

Previous issues

# Issue Status Notes
1 ADR-0034 remains Proposed when merged. ✅ docs/adr/README.md:117-124 explicitly permits merging an ADR as Proposed and flipping its Status in a follow-up.

No new finding reaches the reporting threshold.

Decision: 🟢 Approved

@github-actions

Copy link
Copy Markdown

Reviewer: Codex (openai/codex-action, model gpt-5.6-terra)

PR Review: ci(interop): pin openssh-client to the snapshot the image was built from (ADR-0034) (#161)

Decision: 🟢 Approved
Iteration: Review #3 (1 resolved, 0 open)
Lenses applied: CI supply chain, design decision (ADR-0034 / ADR-0020)

Executive summary

The workflow now binds the digest-pinned Debian image, its recorded snapshot timestamp, the explicit OpenSSH package version, and the exact ssh -V result. Actions remain SHA-pinned, permissions remain minimal, and the hybrid-PQ KEX gate remains enforced.

Previous issues

# Issue Status Notes
1 ADR-0034 remains Proposed when merged. ✅ docs/adr/README.md:117-124 explicitly permits a proposed ADR to merge and have its Status changed in a follow-up.

No new finding reaches the reporting threshold.

Decision: 🟢 Approved

@opencode-agent

Copy link
Copy Markdown

PR Review: ci(interop): pin openssh-client to the snapshot the image was built from (ADR-0034) (#161)

Decision: 🟢 Approved
Iteration: Review #3 (1 resolved, 0 open)
Lenses applied: CI/workflow supply chain (.github/workflows/interop.yml), design decision (docs/adr/0034, ADR-0020 Status edit)

Executive summary

This PR closes the supply-chain pin ADR-0020 decided but left unimplemented in #84: openssh-client is now installed at an exact version from the snapshot.debian.org archive state the digest-pinned image was built from, the step asserts the snapshot matches the image before apt runs, and ssh -V is checked verbatim (OpenSSL build included). The four values that must move together (digest, SNAPSHOT, OPENSSH_CLIENT_VERSION, SSH_V_EXPECTED) are documented as one reviewed bump in ADR-0034. No Rust, KEX, cipher, auth, transport-state-machine or audit-log surface is touched; no hard constraint from the five commitments is implicated. Nothing new reaches the reporting threshold.

Previous issues

# Issue Status Notes
1 ADR-0034 remained Proposed while recording a decision implemented in the same PR. ✅ Repo practice, not a defect: docs/adr/README.md:117-124 explicitly allows merging Proposed and flipping in a follow-up (precedent ADR-0030/0031/0032 in #158); the owner's reply at 22:23 is accurate. Codex accepted this in review #2.
2 ADR-0031's Negative bullet ("pin … not implemented in interop.yml") becomes stale. ✅ Refuted. The bullet was true at ADR-0031's acceptance; ADR-0015 restricts errata to claims wrong at acceptance, and ADR-0031 itself calls the pin "a separate decision" — ADR-0034 is exactly that. Not reportable.
3 ADR-0020 self-contradiction (Implementation: TBD vs the new Status line). ✅ Refuted. The Implementation: TBD line was already false at acceptance; the open errata PR #159 (now merged, d315462) is the process-correct fix, not this PR's scope.

New findings

No finding reaches the ≥80 threshold. The change is a strict hardening over the previous workflow (adds set -euo pipefail, exact version pin, exact ssh -V assertion, snapshot check); the candidates examined and dropped:

  • http:// snapshot (.github/workflows/interop.yml:67,73) — score 45: apt still verifies the archive's Release signatures via Signed-By (:70,76); TLS would add confidentiality only. This is the explicit, reasoned trade-off in ADR-0034 §Decision (docs/adr/0034-…:66-72), so it is a documented decision, not a violation. Threat model §6.4 imposes no authenticated-transport rule for CI package fetches.
  • Acquire::Check-Valid-Until "false" (:79) — score 55: disables replay/freshness checking, but the archived trixie-updates/trixie-security Release files are past Valid-Until by construction, and the exact version pin + verbatim ssh -V bound substitution to a validly Debian-signed archive. Documented in ADR-0034 §Decision/§Negative.
  • Workflow header still says the container "provides OpenSSH 10.0p1" (:7) while SSH_V_EXPECTED is …10.0p2… (:54) — score 22, comment-only, below threshold.
  • Heredoc/YAML block-scalar rendering (:65-81) — score 10: rendered under yaml.safe_load, both heredocs dedent to column 0 and close correctly; unquoted <<EOF expands ${SNAPSHOT}, quoted <<'EOF' does not.
  • Actions, permissions, injection — all zero: third-party actions full-SHA pinned (:93,96,101), permissions: contents: read (:22-23), every run: value enters via env: with no ${{ }} interpolation.

Limitations: I could not observe the GitHub-hosted run, the debian@sha256:28de0877… → debian:trixie-20260623-slim mapping, the image's debian-archive-keyring.pgp path, or network reachability of snapshot.debian.org from this environment; the ADR's empirical claims (in-image timestamp, libc1/OpenSSL behaviour, exact ssh -V) are unverifiable here and are taken on the cited local reproduction plus the owner-reported passing run. Commit signatures and branch-protection state were not assessed (not observable on a runner; that is a GitHub API property, not a repo-content property).

Decision: 🟢 Approved

github run

@gonzafg2
gonzafg2 merged commit 6951ffb into main Sep 23, 2026
13 checks passed
@gonzafg2
gonzafg2 deleted the ci/interop-snapshot-pin branch October 12, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant