Repository navigation
Conversation
Keys registered as ssh_agent_keys in authorization.json let the agent approve a request by an SSHSIG signature from the SSH agent at $SSH_AUTH_SOCK, usually forwarded. The agent answers with a single-use challenge bound to the requesting process and the request digest; the client signs it through its SSH agent and retries. sk- signatures must assert user presence, and user verification when required. Declines and stale sockets fall back to the next method. The approval anchor now records ssh-agent and the registered keys, so after the first registration only a signature by an anchored key approves the next policy change. Outstanding challenges hold their check open, keeping approvals and credential checks apart. The SSH agent protocol client is our own: the relay needs only two requests, and the signature blob is wrapped as the agent returned it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM
sorah
force-pushed
the
hardening/ssh-agent
branch
from
October 31, 2026 02:44
c1f3efc to
2e4e0c9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements docs/specs/013-ssh-agent.md.
ssh_agent_keysinauthorization.jsonand thessh-agentmethod; with keys registered the defaults becomemethods: ["ssh-agent", "platform"],approval_methods: ["ssh-agent"], and approval anchors record the keysREASON_CHALLENGEwith a single-use challenge (60 s, bound to the peer process, action and request digest); the retry's SSHSIG (namespaceco.0w0.mairu.authorize) must come from a registered key, with the user-presence flag forsk-keys (and user verification when required)SSH_AUTH_SOCKthrough a minimal agent client and retries, in exec (preflight and ECS), credential-process,policy approveandunlock --tool; it falls back to polkit and pkttyagentmairu lockdrops outstanding challengesdoctorshowsSSH_AUTH_SOCKreachability and registered keys; README covers tmux~/.ssh/rcsymlinksUses
ssh-key0.6 /ssh-encoding. The agent client wraps the signature exactly as returned, sincessh-key0.6 mis-encodessk-ecdsasignatures.rsa0.9 (RUSTSEC-2023-0071) is used for verification only.Verified in Docker (74 checks) with non-sk keys (no FIDO hardware): bootstrap through polkit, signatures approving exec and gate 2, fallbacks on missing/stale agents,
ssh -A localhostinto tmux, anchored key changes,mairu lockinvalidating a pending signature.sk-flag handling and replay are unit-tested.🤖 Generated with Claude Code
https://claude.ai/code/session_01Dg17LE9aWqsb1VBUCVcKLM