Skip to content

Document process argv privacy rules#547

Merged
AlexandreYang merged 3 commits into
mainfrom
alex/rshell-rules
Jul 2, 2026
Merged

Document process argv privacy rules#547
AlexandreYang merged 3 commits into
mainfrom
alex/rshell-rules

Conversation

@AlexandreYang

@AlexandreYang AlexandreYang commented Jul 1, 2026

Copy link
Copy Markdown
Member

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, macOS KERN_PROCARGS*, Windows command-line APIs, and equivalent sources. Process-listing commands such as ps remain 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 ps design.

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. ps populates CMD from process comm/executable metadata only, and ss rejects -p/--processes.

Testing

  • Ran make fmt.
  • Ran go test ./builtins/ps ./builtins/tests/ps ./builtins/ss ./builtins/tests/ss ./builtins/tests/help ./builtins/tests/uname.

Checklist

  • Tests added/updated
  • Documentation updated (if applicable)

@AlexandreYang AlexandreYang changed the title alex/rshell-rules Document process argv privacy rules Jul 1, 2026
@AlexandreYang
AlexandreYang marked this pull request as ready for review July 2, 2026 12:54
@AlexandreYang
AlexandreYang added this pull request to the merge queue Jul 2, 2026
Merged via the queue into main with commit 6307c94 Jul 2, 2026
41 checks passed
@AlexandreYang
AlexandreYang deleted the alex/rshell-rules branch July 2, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants