agent: show requesting process in confirm prompt#124
Merged
Foxboron merged 1 commit intoFoxboron:masterfrom Apr 24, 2026
Merged
agent: show requesting process in confirm prompt#124Foxboron merged 1 commit intoFoxboron:masterfrom
Foxboron merged 1 commit intoFoxboron:masterfrom
Conversation
Append "Requested by ssh (1234) ← git ← zsh ← kitty" to the askpass prompt for keys added with -c, so users can tell what is asking. The peer pid comes from SO_PEERCRED on the accepted socket; the chain is read from /proc and omitted on failure. A connAgent wrapper carries the peer string into Sign since agent.ServeAgent hides the net.Conn. Allow RO /proc under landlock so the lookup works when sandboxed.
c7a0ce9 to
feb0f2d
Compare
Contributor
Author
|
CI bug looks pre-existing / flakey? |
Owner
Need to lock the kernel keyring to the process, but because Go green threads are weird the keyring is pinned to it's own os-thread and keys are communicated over a channel. I suspect there is something racey somewhere that works most of the time. https://github.com/Foxboron/ssh-tpm-agent/blob/master/internal/keyring/threadkeyring.go |
Foxboron
approved these changes
Apr 24, 2026
Owner
|
Thanks! |
Owner
|
@Mic92 are you fine if I use your screenshot in the release notes? |
Contributor
Author
Sure |
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.
As discussed in #123
When a key is added with
-c, append the requesting process and a few ofits ancestors to the askpass prompt:
The peer pid comes from
SO_PEERCREDon the accepted socket; the chain isread from
/proc/<pid>/status(max 4 hops). It's best effort and the line isomitted if the lookup fails.
One downside: RO
/prochas to be added to the landlock allowlist.This is from my laptop: