Marks / Execution controls / Credential handling
pi · Credential handling
Full env to bash; only inheritEnv:false for MCP and !command keychain lookups; L2 unmet: no denylist
Level
Criteria for this column
- 0
Full environment inherited, credentials stored in plaintext readable by agent code, no filtering
- 1
Some protection (keychain option, redaction of output, per-command secret injection), but the full environment is still inherited by default
met - 2
Default denylist filtering of the environment, but known provider keys or credential files remain reachable by agent code
- 3
Default cleared environment plus allowlist for agent processes; credential stores may still be readable on the same filesystem
- 4
Level 3, plus provider credentials held outside the agent's reach (separate process or broker) and auxiliary processes (MCP stdio) also get an allowlisted environment
What the source review found
bash inherits the full process.env, plus PI_* session vars when exposed. MCP stdio servers inherit the env unless inheritEnv: false. auth.json is 0600 under a lock but readable by the same user. Config values can come from a !command (e.g. a host keychain CLI). No in-tree keychain; redaction applies only to bug reports. X115X116X117X118X119
Pinned evidence
Cited by the mark
- X115
getShellEnv returns full process.env plus PATH
earendil-works/pi packages/coding-agent/src/utils/shell.ts L201-L213
- X117
MCP stdio inherits process.env unless inheritEnv false
- X119
!command config values executed via shell
earendil-works/pi packages/coding-agent/src/core/resolve-config-value.ts L140-L161
Also cited by the review finding
- X116
bash adds PI_* session vars when exposed
earendil-works/pi packages/coding-agent/src/core/tools/bash.ts L226-L241
- X118
auth file 0600, dir 0700
earendil-works/pi packages/coding-agent/src/core/auth-storage.ts L9-L37
Two independent graders
- Grader A
- 1 / 1
- Grader B
- 1 / 1
- Final
- 1 / 1