Repository navigation
docs: note for updates from 0.5.0: keep the mask on for password commands and parent checks - #195
Merged
Merged
Conversation
…ands and parent checks (#191) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
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.
Fixes #191.
Since 0.6.0 (#171),
nodkey runmasks the output by default when stdout or stderr is not a terminal. Two setups broke with no warning: a password command that prints the secret through a pipe (it now gets***), and a wrapper that checks that its parent is its caller (nodkey now stays as the parent). This PR documents how to handle both with the mask on, and describes--no-maskas a last resort.What changes
nodkey run, withpassword.cmd = "printenv VAR". The value goes only from the program to its own child, never through the masked output. It also says that the program and its children keep the value in their environment for the whole run.nodkey(read from/proc/PID/stat, as/proc/PID/execannot be read) and look at its parent. A warning says a name is not proof: use it only as a convenience, not a security boundary.--no-maskas the last resort, with its cost.nodkey runwhose output another program reads, and each script that checks its parent.SIGKILLof nodkey does, exit codes. Checked againstinternal/client/run.goandrunmask.go, and with a small Go program for the fd and signal behavior.The title of this PR is a note for updates, so it shows in the changelog of the next release.
THREAT-MODEL.md: no change. This PR only describes behavior that exists; no check and no value path changes.
Security review
The
security-revieweragent reviewed it twice. The first pass found one medium issue (a wrong claim aboutSIGUSR1: the Go runtime drops it) and four low ones (the parent-name warning, theCAP_SYS_PTRACElimit of "not dumpable",EPIPEafter aSIGKILL, and the longer life of the value in the password-command pattern). All are fixed. The second pass found one low wording issue (the mask was overstated); it is fixed with the reviewer's text. No finding is open.go test .(the docs test) passes.🤖 Generated with Claude Code