Document process argv privacy rules#547
Merged
Merged
Conversation
AlexandreYang
marked this pull request as ready for review
July 2, 2026 12:54
AlexandreYang
requested review from
astuyve,
julesmcrt,
matt-dz,
thieman and
val06
as code owners
July 2, 2026 12:54
julesmcrt
approved these changes
Jul 2, 2026
thieman
approved these changes
Jul 2, 2026
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.
What does this PR do?
Documents a security rule for process-introspection builtins: they must not read or expose raw host process argv / full command lines. The rule calls out
/proc/<pid>/cmdline, macOSKERN_PROCARGS*, Windows command-line APIs, and equivalent sources. Process-listing commands such aspsremain scoped to process name / executable metadata unless an explicit security-reviewed exception is documented.Motivation
Process argv can contain tokens, passwords, API keys, or other secrets from unrelated host processes. The rule makes that privacy boundary explicit for future builtins and preserves the existing
psdesign.Implementation audit
Reviewed the current process-introspection and process-adjacent code paths. Production code does not reference
/proc/<pid>/cmdline,KERN_PROCARGS*, Windows command-line APIs, or equivalent raw argv sources.pspopulatesCMDfrom process comm/executable metadata only, andssrejects-p/--processes.Testing
make fmt.go test ./builtins/ps ./builtins/tests/ps ./builtins/ss ./builtins/tests/ss ./builtins/tests/help ./builtins/tests/uname.Checklist