Skip to content

security: PR #4320 removed a committed EC private key from HEAD, but it remains in this public repo's git history — disposition the s11-relay leaf key #10541

Closed

Description

@dezren39

Finding

PR #4320 ("repo: preserve backup residue and guard snapshots (#3151)") removed 34 tracked residue files from HEAD. One of them is a real EC private key:

  • Path: doc/2026-10-11T03-44-33Z_design_groups_events_delegation/spikes/s11-relay/certs/live/leaf.key.bak-20261011T122827Z
  • The PR diff deletes a complete -----BEGIN PRIVATE KEY----- block (P-256 key, 241-byte blob, git blob 9e3731643df1fb4ecb412e620f4d6e3144c8d8e4).

Removing a file from HEAD does not remove it from git history, and this repository is public (private=false, visibility=public, verified via gh api repos/developing-today/code at review time). The key is still retrievable from history: the file is present at pre-merge main b8bbe734 (contents API returns blob 9e3731643d…, size 241) and absent on current main (404). PR #4320's body treats history retention as an acceptable two-way door for the residue set as a whole, but no issue records a disposition for the one actual credential in the set; source issue #3151 (closed) describes the 34 files as backup/config residue and does not mention a private key.

Mitigating evidence (verified during review)

The matching leaf certificate (deleted in the same PR, leaf.pem.bak-20261011T122827Z, decoded with openssl):

  • Subject CN = localhost; SAN DNS:localhost, IP Address:127.0.0.1
  • Issuer CN = s11 test CA 1 (a local test CA for the s11-relay design spike)
  • Validity 2026-10-11 12:14:53 UTC → 2026-10-14 12:14:53 UTC — expired over a year ago

So this is very likely a dead, localhost-only spike key. What is missing is the verification and the recorded disposition, not an emergency rotation.

Why it matters

A private key in a public repo's history must be treated as disclosed until someone verifies it protects nothing: that nothing still trusts the s11 test CA 1 chain, that the key pair is not reused by any live relay/cert elsewhere in the fleet, and that the spike is fully retired. Until that check is recorded, every future residue/history cleanup will re-litigate the same question from scratch.

Acceptance criteria

  • Verify nothing in the fleet (any of the four repos, laptop primaries, deployed services) trusts or references the s11 test CA 1 / s11-relay spike certificates; cite the searches run.
  • Verify the leaf key pair is not reused anywhere else (compare the certificate's public key against certs/keys in the repos and config; the private key itself must NOT be copied into any issue, comment, or file).
  • Record the disposition on this issue: either (a) accepted — expired localhost test key, history retention is fine, with the verification evidence above; or (b) escalate to Drew for a history purge / further action, with the blast radius of a public-repo history rewrite stated.
  • If (a), close with the evidence; if (b), apply user/escalated and surface it — the purge decision is Drew's.

Found by: pr-diff-review of PR #4320 (merge commit 930235d0de7d007eba0ed3d0576f32a8f571981f, ancestor-verified against main). Cross-checked: secrets scan of all 15 PR diffs in the 2026-11-15 13:24 CST batch found this key as the only credential-shaped material, and only in deletions.

Activity

  1. added
    kind/securitySecurity issue or security hardening
    task/triageQueue packet kind: verify, reproduce, and route this item
    user/reviewNeeds a user-look: Muse reviews first and handles what it can
    priority/lowNice to have; do when convenient
    on Nov 15, 2026
  2. developing-today commented on Nov 15, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: filed

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 15, 2026
  5. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · state: picked-up

  6. dezren39 commented on Nov 15, 2026

    @dezren39
    MemberAuthor

    Disposition: accepted with evidence (history retention)

    Scope/constraints followed: no private key material copied into this comment or any artifact; public-key comparison only. History rewrite itself is a Drew decision and was not performed.

    1) Trust/reference verification for s11 test CA 1 / s11-relay spike certs (searches cited)

    • Repo tree (working copy, developing-today/code): rg -n "s11 test CA" → no matches in working tree. find/git ls-tree show s11-relay material confined to doc/2026-10-11T03-44-33Z_design_groups_events_delegation/spikes/s11-relay/ (spike code, logs, configs, docs, and certs under .../certs/gen|live). No references outside that spike doc/spike directory found.
    • Decoded spike certs (local, read-only):
      • Deleted backup cert (blob at pre-merge b8bbe734:.../certs/live/leaf.pem.bak-20261011T122827Z, per PR repo: preserve backup residue and guard snapshots (#3151) #4320 evidence): subject=CN=localhost, issuer=CN=s11 test CA 1, notBefore=2026-10-11T12:14:53Z, notAfter=2026-10-14T12:14:53Z (expired), SAN DNS:localhost, IP Address:127.0.0.1.
      • .../certs/gen/ca1.pem: subject=issuer=CN=s11 test CA 1, self-signed, validity 2026-10-11..2026-10-14 (expired). ca2.pem is CN=s11 test CA 2 (separate test CA), same expired window.
      • Current .../certs/live/leaf.pem (HEAD): identical subject/issuer/dates/SAN as the deleted backup cert.
    • Other fleet repos (local clones present on this host): rg -n "s11-relay|s11 test CA" in ~/git/opencode, ~/git/openchamber-fork, ~/code/dezren39-nix → no matches.
    • GitHub code search (public repos, limit 10-20): gh search code --repo developing-today/code "s11-relay" returned only historical doc/spike references in this repo (doc/2026-10-11.../spikes/s11-relay/*, spikes/README.md, related design doc). gh search code --repo developing-today/opencode "s11-relay" → none; --repo developing-today/openchamber-fork "s11-relay" → none; --repo dezren39/nix "s11-relay" → none.

    Conclusion (trust): No evidence that anything in the fleet trusts or references the s11 test CA 1 chain outside this localhost-only design spike material; the CA/leaf are expired test artifacts (localhost/127.0.0.1, 3-day validity, expired 2026-10-14).

    2) Key pair reuse check (public-key comparison only)

    Compared SHA-256 of SubjectPublicKeyInfo (DER) derived locally without recording private key material:

    • Deleted backup key (.../certs/live/leaf.key.bak-20261011T122827Z, git history) pubkey fingerprint: 848d6c1263801b84380eb1c8613e4ccc16329f2804cb777fe781e1281990f856
    • Deleted backup cert (.../certs/live/leaf.pem.bak-20261011T122827Z) pubkey fingerprint: same (848d6c…f856)
    • Current HEAD .../certs/live/leaf.key pubkey fingerprint: same (848d6c…f856)
    • Current HEAD .../certs/live/leaf.pem pubkey fingerprint: same (848d6c…f856)

    No other cert/key in the searched scope was found to share this public key. The leaked backup was a backup of the same localhost spike leaf key pair that remains present in HEAD under certs/live/leaf.{key,pem} within the same spike directory (i.e. the key material is confined to that spike context, not reused elsewhere).

    3) Recorded disposition

    Accepted (a): history retention is acceptable for this expired, localhost-only (CN=localhost, SAN localhost/127.0.0.1), s11-relay design-spike test key/cert chain (s11 test CA 1, expired 2026-10-14) given the verification above — no fleet trust/reuse found, material confined to spike artifacts. PR #4320 correctly removed the backup copy from HEAD; the historical blob remains in public git history (and the same spike leaf key pair also remains in HEAD as certs/live/leaf.key in that doc spike). A public-repo history rewrite would be a high-blast-radius, Drew-owned decision (force-push/rewrite affecting all clones/forks/refs and PR SHAs) and is not requested here given the expired, non-trusted, localhost-only nature and lack of reuse evidence.

    Closing with evidence. If any future use/trust of this chain is discovered, escalate to Drew for rotation/purge decision.

    🤖 Agent note · state: done

  7. dezren39 commented on Nov 16, 2026

    @dezren39
    MemberAuthor

    Disposition recorded 2026-11-16: Drew reviewed this and ruled the key is unused — it is the expired (2026-10-14) localhost-only leaf key from the retired s11-relay design spike, issued by the local 's11 test CA 1'. Accepted: history retention is fine, no rotation or history purge. Closing per Drew's decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/securitySecurity issue or security hardeningpriority/lowNice to have; do when convenientsource/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/triageQueue packet kind: verify, reproduce, and route this itemuser/reviewNeeds a user-look: Muse reviews first and handles what it can

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions