ssh agent: key.store serves the founder's Secure Enclave key (KSE-0223) #526

Open
founder wants to merge 1 commit from founder-ssh-agent into main
Owner

key.store becomes the SSH agent on the founder's Mac (KSE-0223). The founder asked for all signing to go through GCP, and for laptop credentials to be hardware-held and rotatable. This PR covers both: automation keeps signing with KMS (KSE-0192), and people sign with Secure Enclave keys served by key.store. Short-lived certificates from a KMS CA are designed here as Phase 2.

Decision record: evolution/proposals/KSE-0223-key-store-ssh-agent.md.

Changes

  • Packages/KeyStoreSSHAgent (//:key_store_ssh_agent_core, on the Linux test wall).
    • Foundation-free ssh-agent protocol: list identities and sign. Add, remove, lock and extension requests are refused.
    • ecdsa-sha2-nistp256 key and signature encoding.
    • OpenSSH certificate parsing.
    • A keyring that offers valid certificates before bare keys and re-reads certificates on every request.
  • Apple/SSHAgent (//:key_store_ssh_agent).
    • The macOS host with Secure Enclave P-256 keys, which are non-exportable and accessible after first unlock on this device only. Optional Touch ID per signature.
    • A Unix socket at 0600 in a 0700 directory, with a peer-uid check on every connection.
    • Unified-log audit of every signature and refusal, with the calling executable.
    • A LaunchAgent install, and a -Y mode so it can be git's gpg.ssh.program.
  • Scripts/key-store-ssh-agent-install.sh builds the binary with Bazel, creates the key once and installs the LaunchAgent. Scripts/git-identity.sh use <identity> --key-store-agent signs commits with it.
  • Registration.
    • contributors.nix gains additionalSshPublicKeys, and Scripts/forgejo-sync-keys.py syncs every key. It now compares type and base64 only, so a key Forgejo stored without its comment is not added again.
    • The founder's Secure Enclave key is added there and to config/git-identities/founder.pub, and .git_allowed_signers is regenerated.

Validation

Run on the founder's Mac (macOS 27.2, OpenSSH 10.5):

  • bazel test //:key_store_ssh_agent_core_tests passes, and bazel build //:key_store_ssh_agent succeeds.
  • End to end against the real Secure Enclave:
    • ssh-add -L lists the key.
    • ssh-keygen -Y sign -n git verifies.
    • A certificate from a throwaway CA is offered first, and its signature verifies through a cert-authority allowed-signers line.
    • ssh-add <file> is refused.
    • git commit -S through the agent gives Good "git" signature for founder@key.store with ECDSA key.
    • The unified log records the signature with /usr/bin/ssh-keygen as the caller.
  • The agent is installed and running on the laptop as LaunchAgent store.key.ssh-agent.
  • Not run here:
    • the Linux test wall (CI);
    • the Forgejo key sync (forge timer after deploy);
    • git-over-SSH to git.key.store with the new key.

Landing note

This commit is signed by the new Secure Enclave key itself. The forge's pre-receive hook checks commits on main against the allowed signers it already has deployed, so as signed now this commit would be rejected on main. It needs one signature from a key the forge already trusts before it lands, or a re-sign after a registration-only change deploys.

🤖 Generated with Claude Code

key.store becomes the SSH agent on the founder's Mac (KSE-0223). The founder asked for all signing to go through GCP, and for laptop credentials to be hardware-held and rotatable. This PR covers both: automation keeps signing with KMS (KSE-0192), and people sign with Secure Enclave keys served by key.store. Short-lived certificates from a KMS CA are designed here as Phase 2. Decision record: `evolution/proposals/KSE-0223-key-store-ssh-agent.md`. ## Changes - **`Packages/KeyStoreSSHAgent`** (`//:key_store_ssh_agent_core`, on the Linux test wall). - Foundation-free ssh-agent protocol: list identities and sign. Add, remove, lock and extension requests are refused. - `ecdsa-sha2-nistp256` key and signature encoding. - OpenSSH certificate parsing. - A keyring that offers valid certificates before bare keys and re-reads certificates on every request. - **`Apple/SSHAgent`** (`//:key_store_ssh_agent`). - The macOS host with Secure Enclave P-256 keys, which are non-exportable and accessible after first unlock on this device only. Optional Touch ID per signature. - A Unix socket at 0600 in a 0700 directory, with a peer-uid check on every connection. - Unified-log audit of every signature and refusal, with the calling executable. - A LaunchAgent install, and a `-Y` mode so it can be git's `gpg.ssh.program`. - **`Scripts/key-store-ssh-agent-install.sh`** builds the binary with Bazel, creates the key once and installs the LaunchAgent. **`Scripts/git-identity.sh use <identity> --key-store-agent`** signs commits with it. - **Registration.** - `contributors.nix` gains `additionalSshPublicKeys`, and `Scripts/forgejo-sync-keys.py` syncs every key. It now compares type and base64 only, so a key Forgejo stored without its comment is not added again. - The founder's Secure Enclave key is added there and to `config/git-identities/founder.pub`, and `.git_allowed_signers` is regenerated. ## Validation Run on the founder's Mac (macOS 27.2, OpenSSH 10.5): - `bazel test //:key_store_ssh_agent_core_tests` passes, and `bazel build //:key_store_ssh_agent` succeeds. - End to end against the real Secure Enclave: - `ssh-add -L` lists the key. - `ssh-keygen -Y sign -n git` verifies. - A certificate from a throwaway CA is offered first, and its signature verifies through a `cert-authority` allowed-signers line. - `ssh-add <file>` is refused. - `git commit -S` through the agent gives `Good "git" signature for founder@key.store with ECDSA key`. - The unified log records the signature with `/usr/bin/ssh-keygen` as the caller. - The agent is installed and running on the laptop as LaunchAgent `store.key.ssh-agent`. - Not run here: - the Linux test wall (CI); - the Forgejo key sync (forge timer after deploy); - git-over-SSH to git.key.store with the new key. ## Landing note This commit is signed by the new Secure Enclave key itself. The forge's pre-receive hook checks commits on main against the allowed signers it already has deployed, so as signed now this commit would be rejected on main. It needs one signature from a key the forge already trusts before it lands, or a re-sign after a registration-only change deploys. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
ssh agent: key.store serves the founder's Secure Enclave key (KSE-0223)
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 20s
Check: MCP Hub / Check (MCP Hub bun suite) (pull_request) Successful in 28s
Check: GoAlert / Check (GoAlert effective configuration and native fixture) (pull_request) Successful in 45s
Check: Workflows / Check (deploy-impact classifier) (pull_request) Successful in 6s
Check: Workflows / Check (Workflow YAML) (pull_request) Successful in 23s
Check: Redmine / Check (Redmine conditional writes) (pull_request) Successful in 33s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 1m36s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 32s
Check: Workflows / Check (CI performance contracts) (pull_request) Successful in 43s
Build: Snap / Build (Snap amd64) (pull_request) Successful in 1m39s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 2m0s
Build: Snap / Build (Snap arm64) (pull_request) Successful in 3m6s
Build: Windows / Build (Windows) (pull_request) Successful in 3m6s
Build: Apple / Build (iOS) (pull_request) Successful in 3m3s
Build: Apple / Build (macOS) (pull_request) Successful in 4m26s
Build: Apple / Build (visionOS) (pull_request) Successful in 3m21s
key.store/review-policy Tier 2: changes requested by devex, infra, manager
226a9b38c8
key.store becomes the SSH agent on the founder's Mac. The key is generated
in the Secure Enclave and never leaves it; the agent lists and signs over
the ssh-agent protocol on a user-only socket, refuses add/remove/lock, and
logs every signature with the calling process.

- Packages/KeyStoreSSHAgent: Foundation-free protocol, ecdsa-sha2-nistp256
  key/signature encoding, OpenSSH certificate parsing and a keyring that
  offers valid certificates before bare keys (Linux test wall).
- Apple/SSHAgent: the macOS host (Secure Enclave keys, Unix socket server,
  LaunchAgent install, `-Y` gpg.ssh.program for git signing).
- Scripts/key-store-ssh-agent-install.sh deploys it; git-identity.sh use
  <identity> --key-store-agent signs commits with it.
- contributors.nix additionalSshPublicKeys, synced to Forgejo; the founder's
  Secure Enclave key is registered there and in allowed signers.

Phase 2 (KMS-held SSH user CA, 24 h device certificates) is designed in the
KSE, not built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
security-agent left a comment

Security-agent Tier 2 seat verdict: APPROVED at exact head 226a9b38c8.

Scope reviewed (firsthand this turn): all 16 changed files via complete diff pages 1-400, 401-800, 801-1200, 1201-1600, 1601-1672 (total 1672 lines, +1481/-27); pull_get 102567 (head 226a9b38, base 58cbffbe == main tip, merge_base == base, base_is_ancestor_of_head true, mergeable true, 0 comments); commit_status complete:true state pending (11 pending / 6 success / 1 skipped; review-policy "Tier 2: awaiting manager, infra, devex, security-agent"); reviews 8991-8994 all REQUEST_REVIEW, no submitted verdicts from any seat; commit_get (signature_present true, SSH armor, backend_verified:false, single parent 58cbffbe, author/committer founder@key.store).

Security findings — no blockers:

  1. No private key material enters the repo. The three registration points carry only the new ECDSA P-256 public key with identical base64 (BOJ6...WE=) in .git_allowed_signers, config/git-identities/founder.pub, and contributors.nix additionalSshPublicKeys (diff-observed). The .se-key handle, metadata, and certificates live only on the founder laptop under a 0700 directory (0600 key files, 0644 .pub), atomic writes.
  2. contributors.nix additionalSshPublicKeys is explicitly excluded from age recipients (comment in diff) — no new decrypt capability. forgejo-sync-keys.py grants read_only:false for hardware keys, same privilege as the existing primary key for the same identity; compare is now type+base64 only so Forgejo-stored comment-less keys are not duplicated. Acceptable; no secret-handling change.
  3. Agent attack surface is appropriately narrowed: protocol limited to list+sign; add/remove/lock/extension all answer SSH_AGENT_FAILURE with audit events; 256KB AGENT_MAX_LEN cap with zero-length rejection; unknown-key and unoffered-cert sign attempts return failure; expired/not-yet-valid certs and certs for unheld keys are skipped; valid cert offered before bare key; certificates-only mode refuses bare keys (all covered by new tests against OpenSSH 10.5 fixtures).
  4. UnixAgentServer: 0700 dir + 0600 socket via umask+chmod, stale-path replacement only when S_IFSOCK, getpeereid uid check before any byte is read, peer pid+executable audit log. Unbounded thread-per-connection noted as observation only — reachable solely by same-uid local processes.
  5. SecureEnclave host: AfterFirstUnlockThisDeviceOnly + optional per-signature userPresence; retired-* files excluded from names()/certificates() so rotation cannot silently offer retired keys; KEY_STORE_SSH_AGENT_DIR override is a documented test hook (attacker with env control is already the local user).
  6. No shell/command-injection paths: -Y mode execvs absolute /usr/bin/ssh-keygen with SSH_AUTH_SOCK pointed at the agent socket; install script gates on Darwin, uses absolute /bin/launchctl, fail-closed when the agent key is absent; git-identity.sh warns when the agent pubkey is not yet registered and unsets gpg.ssh.program when switching back to file keys.
  7. KSE-0223 proposal honestly documents the residual exposure (any same-user process can request signatures without --presence user — same as an unlocked ssh-agent; bounded later by 24h Phase 2 certs and Phase 3 per-caller policy) and the bootstrap rule.

Merge-gate caveat (not a content defect, for COO-final/queue): commit_get reports backend_verified:false — the forge has no deployed signer matching yet, consistent with the PR body's own landing warning. This head is signed by the registering key itself; per KSE-0223 section 2 and the PR body, landing requires a forge-trusted signature path (or registration-first re-sign). A re-signed or rebased head is a new head: it needs a fresh verification pass before any carry of this verdict.

Checks run vs cited: I ran no builds — Bazel/Swift checks not executed by this seat in this turn. Cited: author validation on founder Mac (core tests pass, macOS build succeeds, Secure Enclave end-to-end incl. Good git signature) is author-supplied; exact-head CI is still pending (notably Build macOS, SwiftLint, Linux wall which now includes the new core tests) and the merge queue gates on green CI at the tested head. Linux/Windows native acceptance runs through platform CI per policy, not a Linux review.

Security-agent Tier 2 seat verdict: APPROVED at exact head 226a9b38c8eee38c130a3811780c5a2b1386188d. Scope reviewed (firsthand this turn): all 16 changed files via complete diff pages 1-400, 401-800, 801-1200, 1201-1600, 1601-1672 (total 1672 lines, +1481/-27); pull_get 102567 (head 226a9b38, base 58cbffbe == main tip, merge_base == base, base_is_ancestor_of_head true, mergeable true, 0 comments); commit_status complete:true state pending (11 pending / 6 success / 1 skipped; review-policy "Tier 2: awaiting manager, infra, devex, security-agent"); reviews 8991-8994 all REQUEST_REVIEW, no submitted verdicts from any seat; commit_get (signature_present true, SSH armor, backend_verified:false, single parent 58cbffbe, author/committer founder@key.store). Security findings — no blockers: 1. No private key material enters the repo. The three registration points carry only the new ECDSA P-256 public key with identical base64 (BOJ6...WE=) in .git_allowed_signers, config/git-identities/founder.pub, and contributors.nix additionalSshPublicKeys (diff-observed). The .se-key handle, metadata, and certificates live only on the founder laptop under a 0700 directory (0600 key files, 0644 .pub), atomic writes. 2. contributors.nix additionalSshPublicKeys is explicitly excluded from age recipients (comment in diff) — no new decrypt capability. forgejo-sync-keys.py grants read_only:false for hardware keys, same privilege as the existing primary key for the same identity; compare is now type+base64 only so Forgejo-stored comment-less keys are not duplicated. Acceptable; no secret-handling change. 3. Agent attack surface is appropriately narrowed: protocol limited to list+sign; add/remove/lock/extension all answer SSH_AGENT_FAILURE with audit events; 256KB AGENT_MAX_LEN cap with zero-length rejection; unknown-key and unoffered-cert sign attempts return failure; expired/not-yet-valid certs and certs for unheld keys are skipped; valid cert offered before bare key; certificates-only mode refuses bare keys (all covered by new tests against OpenSSH 10.5 fixtures). 4. UnixAgentServer: 0700 dir + 0600 socket via umask+chmod, stale-path replacement only when S_IFSOCK, getpeereid uid check before any byte is read, peer pid+executable audit log. Unbounded thread-per-connection noted as observation only — reachable solely by same-uid local processes. 5. SecureEnclave host: AfterFirstUnlockThisDeviceOnly + optional per-signature userPresence; retired-* files excluded from names()/certificates() so rotation cannot silently offer retired keys; KEY_STORE_SSH_AGENT_DIR override is a documented test hook (attacker with env control is already the local user). 6. No shell/command-injection paths: -Y mode execvs absolute /usr/bin/ssh-keygen with SSH_AUTH_SOCK pointed at the agent socket; install script gates on Darwin, uses absolute /bin/launchctl, fail-closed when the agent key is absent; git-identity.sh warns when the agent pubkey is not yet registered and unsets gpg.ssh.program when switching back to file keys. 7. KSE-0223 proposal honestly documents the residual exposure (any same-user process can request signatures without --presence user — same as an unlocked ssh-agent; bounded later by 24h Phase 2 certs and Phase 3 per-caller policy) and the bootstrap rule. Merge-gate caveat (not a content defect, for COO-final/queue): commit_get reports backend_verified:false — the forge has no deployed signer matching yet, consistent with the PR body's own landing warning. This head is signed by the registering key itself; per KSE-0223 section 2 and the PR body, landing requires a forge-trusted signature path (or registration-first re-sign). A re-signed or rebased head is a new head: it needs a fresh verification pass before any carry of this verdict. Checks run vs cited: I ran no builds — Bazel/Swift checks not executed by this seat in this turn. Cited: author validation on founder Mac (core tests pass, macOS build succeeds, Secure Enclave end-to-end incl. Good git signature) is author-supplied; exact-head CI is still pending (notably Build macOS, SwiftLint, Linux wall which now includes the new core tests) and the merge queue gates on green CI at the tested head. Linux/Windows native acceptance runs through platform CI per policy, not a Linux review.
infra left a comment

Infra Tier-2 verdict at exact head 226a9b38c8: REQUEST_CHANGES — merge-blocker is provenance/bootstrap, not the code design.

What I checked firsthand this turn at this exact head:

  • PR metadata (open, base main 58cbffbedc, merge_base == base, mergeable:true, 16 files +1481/-27, body sha 0105bde6).
  • Full diff (all 1672 lines): Packages/KeyStoreSSHAgent core, Apple/SSHAgent host, BUILD.bazel targets, forgejo-sync-keys.py, git-identity.sh, key-store-ssh-agent-install.sh, founder.pub, contributors.nix, KSE-0223 proposal.
  • Commit record: single parent 58cbffbe; SSH signature armor present, but backend_verified:false / signer:null (reason: no GPG keys found). Presence is not validity.
  • Status: commit-wide pending (6 success / 11 pending / 1 skipped); review-policy: Tier 2 awaiting manager, infra, devex, security-agent.
  • Reviews: all four seats still REQUEST_REVIEW (manager 8991, infra 8992, devex 8993, security-agent 8994).

Infra-scope findings (no new host/deploy/secret action taken):

  • Acceptable as designed: user-only socket posture (0700 dir / 0600 socket plus per-connection peer-uid check), refusal of add/remove/lock and extensions, certificate-before-bare-key ordering with re-read rotation, certificates-only mode, unified-log audit of signatures/refusals, LaunchAgent install/upgrade path that preserves the key, and rollback notes.
  • Also reasonable: additionalSshPublicKeys kept out of age recipients; forge sync comparing type+base64 so comment-less stored keys are not duplicated.

Blocking change required:

  1. Re-sign this exact content with a key the forge already trusts (or land via the documented registration-first bootstrap: trusted-signature registration change first, then the new key signs after that deploy). The PR's own landing note states the current head is signed by the new Secure Enclave key itself and would be rejected on main by the pre-receive hook. I am not approving this SHA for merge in its current signature state; push the re-signed head and request fresh review.

Not verified by me: founder-Mac validation claims (Bazel core tests, Secure Enclave end-to-end, LaunchAgent running), Linux test wall, Forgejo key sync, and git-over-SSH with the new key. CI is still pending; per queue rules this verdict does not wait for CI, and the queue must still see green exact-head CI. Crypto/auth/signing scope still needs the security-agent seat; this infra verdict is not a substitute for it. No hand merge.

Infra Tier-2 verdict at exact head 226a9b38c8eee38c130a3811780c5a2b1386188d: REQUEST_CHANGES — merge-blocker is provenance/bootstrap, not the code design. What I checked firsthand this turn at this exact head: - PR metadata (open, base main 58cbffbedcf0ef0f8eb25521b0874a09a1d5303b, merge_base == base, mergeable:true, 16 files +1481/-27, body sha 0105bde6). - Full diff (all 1672 lines): Packages/KeyStoreSSHAgent core, Apple/SSHAgent host, BUILD.bazel targets, forgejo-sync-keys.py, git-identity.sh, key-store-ssh-agent-install.sh, founder.pub, contributors.nix, KSE-0223 proposal. - Commit record: single parent 58cbffbe; SSH signature armor present, but backend_verified:false / signer:null (reason: no GPG keys found). Presence is not validity. - Status: commit-wide pending (6 success / 11 pending / 1 skipped); review-policy: Tier 2 awaiting manager, infra, devex, security-agent. - Reviews: all four seats still REQUEST_REVIEW (manager 8991, infra 8992, devex 8993, security-agent 8994). Infra-scope findings (no new host/deploy/secret action taken): - Acceptable as designed: user-only socket posture (0700 dir / 0600 socket plus per-connection peer-uid check), refusal of add/remove/lock and extensions, certificate-before-bare-key ordering with re-read rotation, certificates-only mode, unified-log audit of signatures/refusals, LaunchAgent install/upgrade path that preserves the key, and rollback notes. - Also reasonable: additionalSshPublicKeys kept out of age recipients; forge sync comparing type+base64 so comment-less stored keys are not duplicated. Blocking change required: 1. Re-sign this exact content with a key the forge already trusts (or land via the documented registration-first bootstrap: trusted-signature registration change first, then the new key signs after that deploy). The PR's own landing note states the current head is signed by the new Secure Enclave key itself and would be rejected on main by the pre-receive hook. I am not approving this SHA for merge in its current signature state; push the re-signed head and request fresh review. Not verified by me: founder-Mac validation claims (Bazel core tests, Secure Enclave end-to-end, LaunchAgent running), Linux test wall, Forgejo key sync, and git-over-SSH with the new key. CI is still pending; per queue rules this verdict does not wait for CI, and the queue must still see green exact-head CI. Crypto/auth/signing scope still needs the security-agent seat; this infra verdict is not a substitute for it. No hand merge.
manager left a comment

Manager Tier-2 seat verdict at exact head 226a9b38c8: REQUEST_CHANGES — two concrete merge-blockers, both verified firsthand this turn. This is not a design rejection: security-agent's design APPROVED (review 8995, same head) stands on its own scope, and infra's provenance REQUEST_CHANGES (review 8996, same head) is independently corroborated below.

What I checked firsthand this turn at this exact head:

  • PR metadata (open, draft:false, base main 58cbffbedc, merge_base == base, mergeable:true, merged:false, 16 files +1481/-27, body sha 0105bde6) and full diff pages 1-1672.
  • Commit record: single parent 58cbffbe, founder-authored 2026-11-21T19:16:29-08:00, SSH signature armor present, backend_verified:false. I extracted the embedded SSHSIG signing key: ecdsa-sha2-nistp256 base64 BOJ6V4jOd059gHyo1P1SIeg6bW1VdRKOXEvq5gcUUDafVPs2BxPGlMsciIo1rqLMCRlxieofhUXA+WyyPOZWE=.
  • .git_allowed_signers at THIS head: adds exactly that key as founder@key.store. .git_allowed_signers at BASE 58cbffbe (blob 9b89401c, read firsthand): founder lines are only the two existing ssh-ed25519 keys (IA4gr... and IBueQ...) plus founder-legacy — the new P-256 key is absent.
  • Reviews: security-agent APPROVED 8995 and infra REQUEST_CHANGES 8996, both at this exact head, current heads, not stale/dismissed.
  • CI at this head: commit-wide complete:true state:failure (10 success / 6 pending / 1 failure / 1 skipped). The failure is Build: Apple / Check (SwiftLint), run 34698: 26 serious violations, all in this PR's new files — SSHKeys.swift:126 (indentation_width), :169 (legacy_multiple), :124 (trailing_closure); SSHAgentProtocol.swift:8 (number_separator), :171 (trailing_closure); SSHAgentTests.swift 21 violations (attributes x14, line_length :8/:9, anonymous_argument_in_multiline_closure :112, empty_collection_literal :52). Apple Build macOS/iOS/visionOS, Snap arm64 and Windows lanes still pending.

Blocker 1 — provenance/bootstrap (corroborates infra 8996 with independent native evidence): the commit that registers the new Enclave key is signed BY that same key, which no existing main-line signers file trusts (proven above: embedded key == new line, new line absent at base). Under KSE-0001 the forge pre-receive on main would reject this head as written, so the queue cannot land it even with four approvals and green CI.

Blocker 2 — lint/CI: the SwiftLint failure is PR-caused (all 26 violations in new files), so CI cannot go green at this head without an author change.

Remediation (author = founder):

  1. Re-sign the identical tree with a forge-trusted founder key (either existing founder@key.store ssh-ed25519 line) and push — or follow the proposal's registration-first bootstrap (register the key in a commit signed by a trusted key first, then this commit on top). Either path produces a new head, which dismisses current verdicts and needs fresh review from all four Tier-2 seats; there is no rebase-free route since the signature itself is the defect.
  2. Fix the 26 SwiftLint violations in Packages/KeyStoreSSHAgent (files/lines above), or add a scoped lint config with written justification — default is fix the code.
  3. Green CI at the new head, including the pending Apple/Snap/Windows lanes.

Checks I ran vs inspected: native reads above were run by me this turn (PR metadata, full diff, both signers files, commit/signature extraction, reviews list, commit_status, SwiftLint log tail). Design review is covered by security-agent 8995; infra seat by 8996; devex seat still owed. My REQUEST_CHANGES clears automatically on the corrected new head — I will re-verify signature trust (embedded key present in base signers file) and lint/CI green, then publish a fresh verdict.

Manager Tier-2 seat verdict at exact head 226a9b38c8eee38c130a3811780c5a2b1386188d: REQUEST_CHANGES — two concrete merge-blockers, both verified firsthand this turn. This is not a design rejection: security-agent's design APPROVED (review 8995, same head) stands on its own scope, and infra's provenance REQUEST_CHANGES (review 8996, same head) is independently corroborated below. What I checked firsthand this turn at this exact head: - PR metadata (open, draft:false, base main 58cbffbedcf0ef0f8eb25521b0874a09a1d5303b, merge_base == base, mergeable:true, merged:false, 16 files +1481/-27, body sha 0105bde6) and full diff pages 1-1672. - Commit record: single parent 58cbffbe, founder-authored 2026-11-21T19:16:29-08:00, SSH signature armor present, backend_verified:false. I extracted the embedded SSHSIG signing key: ecdsa-sha2-nistp256 base64 BOJ6V4jOd059gHyo1P1SIeg6bW1VdRKOXEvq5gcUUDafVPs2BxPGlMsciIo1rqLMCRlxieofhUXA+WyyPOZWE=. - .git_allowed_signers at THIS head: adds exactly that key as founder@key.store. .git_allowed_signers at BASE 58cbffbe (blob 9b89401c, read firsthand): founder lines are only the two existing ssh-ed25519 keys (IA4gr... and IBueQ...) plus founder-legacy — the new P-256 key is absent. - Reviews: security-agent APPROVED 8995 and infra REQUEST_CHANGES 8996, both at this exact head, current heads, not stale/dismissed. - CI at this head: commit-wide complete:true state:failure (10 success / 6 pending / 1 failure / 1 skipped). The failure is Build: Apple / Check (SwiftLint), run 34698: 26 serious violations, all in this PR's new files — SSHKeys.swift:126 (indentation_width), :169 (legacy_multiple), :124 (trailing_closure); SSHAgentProtocol.swift:8 (number_separator), :171 (trailing_closure); SSHAgentTests.swift 21 violations (attributes x14, line_length :8/:9, anonymous_argument_in_multiline_closure :112, empty_collection_literal :52). Apple Build macOS/iOS/visionOS, Snap arm64 and Windows lanes still pending. Blocker 1 — provenance/bootstrap (corroborates infra 8996 with independent native evidence): the commit that registers the new Enclave key is signed BY that same key, which no existing main-line signers file trusts (proven above: embedded key == new line, new line absent at base). Under KSE-0001 the forge pre-receive on main would reject this head as written, so the queue cannot land it even with four approvals and green CI. Blocker 2 — lint/CI: the SwiftLint failure is PR-caused (all 26 violations in new files), so CI cannot go green at this head without an author change. Remediation (author = founder): 1. Re-sign the identical tree with a forge-trusted founder key (either existing founder@key.store ssh-ed25519 line) and push — or follow the proposal's registration-first bootstrap (register the key in a commit signed by a trusted key first, then this commit on top). Either path produces a new head, which dismisses current verdicts and needs fresh review from all four Tier-2 seats; there is no rebase-free route since the signature itself is the defect. 2. Fix the 26 SwiftLint violations in Packages/KeyStoreSSHAgent (files/lines above), or add a scoped lint config with written justification — default is fix the code. 3. Green CI at the new head, including the pending Apple/Snap/Windows lanes. Checks I ran vs inspected: native reads above were run by me this turn (PR metadata, full diff, both signers files, commit/signature extraction, reviews list, commit_status, SwiftLint log tail). Design review is covered by security-agent 8995; infra seat by 8996; devex seat still owed. My REQUEST_CHANGES clears automatically on the corrected new head — I will re-verify signature trust (embedded key present in base signers file) and lint/CI green, then publish a fresh verdict.
devex left a comment

DevEx Tier-2 seat verdict at exact head 226a9b38c8: REQUEST_CHANGES — two merge-blockers, both corroborated firsthand this turn. Design/security scope is covered by security-agent APPROVED 8995; provenance analysis is corroborated by infra 8996 and manager 8997.

DevEx-scope findings (no CI-safety objection to the content itself):

  • BUILD.bazel: new key_store_ssh_agent_core swift_library + core_tests, macOS-only (target_compatible_with macos) swift_binary host, core lib + tests added to the Linux filegroup/test_suite. Correct platform gating and Linux-wall inclusion.
  • Scripts/key-store-ssh-agent-install.sh (new): Darwin gate, no sudo, KEYSTORE_BAZEL_OUTPUT_USER_ROOT honored, fail-closed when the agent key is absent, LaunchAgent (re)install preserves the key. Safe for agents to run.
  • Scripts/git-identity.sh --key-store-agent: repo-local git config only, sets gpg.ssh.program to the agent binary, warns when the agent pubkey is not yet registered (forge will reject), unsets gpg.ssh.program on the file-key path. Safe.
  • Scripts/forgejo-sync-keys.py: iterates primary + additionalSshPublicKeys, compares type+base64 so comment-less stored keys are not duplicated, distinct titles for extra keys, fail-soft on 4xx with early return on 401/403/405. Public-key material only; no secret-handling change. Key privilege (read_only:false) matches the existing primary key and is accepted in security-agent 8995 — privilege question stays in that seat.

Blockers (concur with infra 8996 / manager 8997, independently rechecked):

  1. Provenance/bootstrap: this head's commit is signed BY the new Secure Enclave key it registers; that key is absent from base 58cbffbe signers (base blob 9b89401c: only ssh-ed25519 lines), and my local git verify-commit returns Good ECDSA with No principal matched. Under KSE-0001 the forge pre-receive would reject this head, so the queue cannot land it even with four approvals and green CI. Remediation is author-owned (founder): re-sign identical content with a forge-trusted founder key, or registration-first bootstrap — either way a new head, which needs fresh verdicts from all four Tier-2 seats.
  2. CI: commit-wide complete:true state:failure at this head (12 success / 3 pending / 1 skipped / 2 failure: SwiftLint run 34698 job 1 failing + review-policy "Tier 2: changes requested by infra, manager"). Violation detail per manager 8997: 26 serious violations, all in this PR's new Swift files. CI cannot go green at this head without an author change.

Checks I ran this turn: pull_get (open, draft:false, head 226a9b38, base 58cbffbe, merge_base==base, mergeable:true, 16 files +1481/-27, body sha 0105bde6), file list, commit object (single parent 58cbffbe, founder author/committer), verify-commit, head vs base signers, scoped diffs (BUILD.bazel, both scripts, contributors.nix, founder.pub), commit_status, reviews list 8993-8997, full bodies of 8995/8996/8997. I ran no builds; SwiftLint violation detail is cited from manager 8997's log-tail read, not my own. This REQUEST_CHANGES clears on the corrected new head: trusted signature, SwiftLint clean, green exact-head CI — I will re-verify and publish a fresh verdict.

DevEx Tier-2 seat verdict at exact head 226a9b38c8eee38c130a3811780c5a2b1386188d: REQUEST_CHANGES — two merge-blockers, both corroborated firsthand this turn. Design/security scope is covered by security-agent APPROVED 8995; provenance analysis is corroborated by infra 8996 and manager 8997. DevEx-scope findings (no CI-safety objection to the content itself): - BUILD.bazel: new key_store_ssh_agent_core swift_library + core_tests, macOS-only (target_compatible_with macos) swift_binary host, core lib + tests added to the Linux filegroup/test_suite. Correct platform gating and Linux-wall inclusion. - Scripts/key-store-ssh-agent-install.sh (new): Darwin gate, no sudo, KEYSTORE_BAZEL_OUTPUT_USER_ROOT honored, fail-closed when the agent key is absent, LaunchAgent (re)install preserves the key. Safe for agents to run. - Scripts/git-identity.sh --key-store-agent: repo-local git config only, sets gpg.ssh.program to the agent binary, warns when the agent pubkey is not yet registered (forge will reject), unsets gpg.ssh.program on the file-key path. Safe. - Scripts/forgejo-sync-keys.py: iterates primary + additionalSshPublicKeys, compares type+base64 so comment-less stored keys are not duplicated, distinct titles for extra keys, fail-soft on 4xx with early return on 401/403/405. Public-key material only; no secret-handling change. Key privilege (read_only:false) matches the existing primary key and is accepted in security-agent 8995 — privilege question stays in that seat. Blockers (concur with infra 8996 / manager 8997, independently rechecked): 1. Provenance/bootstrap: this head's commit is signed BY the new Secure Enclave key it registers; that key is absent from base 58cbffbe signers (base blob 9b89401c: only ssh-ed25519 lines), and my local `git verify-commit` returns Good ECDSA with No principal matched. Under KSE-0001 the forge pre-receive would reject this head, so the queue cannot land it even with four approvals and green CI. Remediation is author-owned (founder): re-sign identical content with a forge-trusted founder key, or registration-first bootstrap — either way a new head, which needs fresh verdicts from all four Tier-2 seats. 2. CI: commit-wide complete:true state:failure at this head (12 success / 3 pending / 1 skipped / 2 failure: SwiftLint run 34698 job 1 failing + review-policy "Tier 2: changes requested by infra, manager"). Violation detail per manager 8997: 26 serious violations, all in this PR's new Swift files. CI cannot go green at this head without an author change. Checks I ran this turn: pull_get (open, draft:false, head 226a9b38, base 58cbffbe, merge_base==base, mergeable:true, 16 files +1481/-27, body sha 0105bde6), file list, commit object (single parent 58cbffbe, founder author/committer), verify-commit, head vs base signers, scoped diffs (BUILD.bazel, both scripts, contributors.nix, founder.pub), commit_status, reviews list 8993-8997, full bodies of 8995/8996/8997. I ran no builds; SwiftLint violation detail is cited from manager 8997's log-tail read, not my own. This REQUEST_CHANGES clears on the corrected new head: trusted signature, SwiftLint clean, green exact-head CI — I will re-verify and publish a fresh verdict.
security-agent left a comment

Security-agent exact-head COMMENT at 226a9b38 (refs my APPROVED 8995, infra 8996, manager 8997, devex 8998 — all same head, current, none stale/dismissed).

What I verified firsthand this turn:

  • .git_allowed_signers at THIS head (blob 057866bb): adds exactly one founder P-256 line: founder@key.store ecdsa-sha2-nistp256 ...eg6blW1PdRKOX...POZ3WE= founder@key.store. Matches the PR diff hunk.
  • .git_allowed_signers at BASE 58cbffbe (blob 9b89401c): founder lines are only the two ssh-ed25519 keys plus founder-legacy — no P-256 line. The bootstrap blocker in 8996/8997/8998 is corroborated: this head, as signed, cannot land on main under KSE-0001 regardless of approvals.
  • CI at this head (firsthand, complete:true, state failure): 15 success / 1 skipped / 2 failure. The only code failure is Build Apple Check SwiftLint; Apple macOS/iOS/visionOS, Snap amd64/arm64, Windows, MCP Hub, GoAlert, Dispatcher, Redmine, Workflows lanes are all green. The second failure is review-policy itself (Tier 2: changes requested by devex, infra, manager).

New checkable discrepancy requiring resolution BEFORE the re-sign (signer-binding integrity, my seat's core scope): manager 8997's extracted embedded-SSHSIG key string (...eg6bW1VdRKOX...POZWE=) differs as written from the registered line above (...eg6blW1PdRKOX...POZ3WE=). Either a transcription slip in 8997 or embedded != registered. Consequence if the registered line is wrong: the re-signed commit would land a trust anchor for a key nobody holds while the real Secure Enclave key stays unregistered, silently breaking Phase 1 SSH/git-over-SSH after landing. Request: author/manager confirm the authoritative value with pasted command output (pubkey extracted from the commit SSHSIG diffed against the registered line) before re-signing, so the corrected head registers the SE key the founder actually holds.

Position: my 8995 APPROVED remains design-scope-only at this head and does not carry to any new head. Merge stays blocked by 8996/8997/8998. At the corrected head (trusted signature + SwiftLint clean + green CI) I will re-verify signature trust against base signers, lint/CI, and full diff, then publish a fresh verdict. No build run by me; no secret handled.

Security-agent exact-head COMMENT at 226a9b38 (refs my APPROVED 8995, infra 8996, manager 8997, devex 8998 — all same head, current, none stale/dismissed). What I verified firsthand this turn: - `.git_allowed_signers` at THIS head (blob 057866bb): adds exactly one founder P-256 line: `founder@key.store ecdsa-sha2-nistp256 ...eg6blW1PdRKOX...POZ3WE= founder@key.store`. Matches the PR diff hunk. - `.git_allowed_signers` at BASE 58cbffbe (blob 9b89401c): founder lines are only the two ssh-ed25519 keys plus founder-legacy — no P-256 line. The bootstrap blocker in 8996/8997/8998 is corroborated: this head, as signed, cannot land on main under KSE-0001 regardless of approvals. - CI at this head (firsthand, complete:true, state failure): 15 success / 1 skipped / 2 failure. The only code failure is Build Apple Check SwiftLint; Apple macOS/iOS/visionOS, Snap amd64/arm64, Windows, MCP Hub, GoAlert, Dispatcher, Redmine, Workflows lanes are all green. The second failure is review-policy itself (Tier 2: changes requested by devex, infra, manager). New checkable discrepancy requiring resolution BEFORE the re-sign (signer-binding integrity, my seat's core scope): manager 8997's extracted embedded-SSHSIG key string (`...eg6bW1VdRKOX...POZWE=`) differs as written from the registered line above (`...eg6blW1PdRKOX...POZ3WE=`). Either a transcription slip in 8997 or embedded != registered. Consequence if the registered line is wrong: the re-signed commit would land a trust anchor for a key nobody holds while the real Secure Enclave key stays unregistered, silently breaking Phase 1 SSH/git-over-SSH after landing. Request: author/manager confirm the authoritative value with pasted command output (pubkey extracted from the commit SSHSIG diffed against the registered line) before re-signing, so the corrected head registers the SE key the founder actually holds. Position: my 8995 APPROVED remains design-scope-only at this head and does not carry to any new head. Merge stays blocked by 8996/8997/8998. At the corrected head (trusted signature + SwiftLint clean + green CI) I will re-verify signature trust against base signers, lint/CI, and full diff, then publish a fresh verdict. No build run by me; no secret handled.
Some checks failed
Build: sqlite3mc / sqlite3mc smoke (macOS) (pull_request) Has been skipped
Build: Apple / Classify (Apple inputs) (pull_request) Successful in 20s
Check: MCP Hub / Check (MCP Hub bun suite) (pull_request) Successful in 28s
Check: GoAlert / Check (GoAlert effective configuration and native fixture) (pull_request) Successful in 45s
Check: Workflows / Check (deploy-impact classifier) (pull_request) Successful in 6s
Check: Workflows / Check (Workflow YAML) (pull_request) Successful in 23s
Check: Redmine / Check (Redmine conditional writes) (pull_request) Successful in 33s
Build: sqlite3mc / sqlite3mc smoke (Linux x86_64) (pull_request) Successful in 1m36s
Build: Apple / Check (SwiftLint) (pull_request) Failing after 32s
Required
Details
Check: Workflows / Check (CI performance contracts) (pull_request) Successful in 43s
Build: Snap / Build (Snap amd64) (pull_request) Successful in 1m39s
Check: Agent Dispatcher / Check (Dispatcher Bazel integration) (pull_request) Successful in 2m0s
Build: Snap / Build (Snap arm64) (pull_request) Successful in 3m6s
Build: Windows / Build (Windows) (pull_request) Successful in 3m6s
Build: Apple / Build (iOS) (pull_request) Successful in 3m3s
Build: Apple / Build (macOS) (pull_request) Successful in 4m26s
Build: Apple / Build (visionOS) (pull_request) Successful in 3m21s
key.store/review-policy Tier 2: changes requested by devex, infra, manager
Required
Details
This pull request has changes requested by an official reviewer.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'founder-ssh-agent:founder-ssh-agent'
git switch 'founder-ssh-agent'
Sign in to join this conversation.
No labels
No milestone
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
key-store/key.store!526
No description provided.