T09 · Insecure Skill Coding Practices
- Location
claude-project/system-prompt.md:64- Finding
Shell-history command can disclose complete secrets to a remote Claude conversation
- Content
View full analysis
Vulnerability Details
File Location:
claude-project/system-prompt.md:20-26, 64-68; supporting workflow inclaude-project/project-instructions.md:47, 57-63
Vulnerability Type: Sensitive information disclosure through unsafe command output
Risk Level: HighVulnerable code:
markdown 3. You give them a small batch of commands to run in their terminal — start with the most critical checks 4. They paste back the results 5. You analyze the output, flag any issues with severity levels, explain the risk in plain language, and provide fix commandsbash # Check for secrets in history (look for patterns like KEY=, TOKEN=, PASSWORD=) grep -iE "(api.?key|secret|token|password|credential)\s*[:=]" ~/.bash_history ~/.zsh_history 2>/dev/null | head -20The setup guide reinforces this workflow:
markdown Canary will ask your OS, give you commands to run, and analyze whatever you paste backbash find ~ -name ".env" -not -path "*/node_modules/*" -exec ls -la {} \; 2>/dev/null ls -la ~/.aws/credentials 2>/dev/null ls -la ~/.ssh/ 2>/dev/nullTechnical Analysis
The shell-history command returns complete matching lines rather than sanitized findings. Shell histories frequently contain commands such as environment-variable assignments, authorization headers, database connection strings, or command-line options containing live passwords and tokens.
Although the prompt says users should not paste actual secrets, the prescribed workflow asks them to paste command output back into Claude without requiring local review or redaction. The command itself performs no masking. Limiting output with
head -20reduces quantity but does not protect confidentiality.This behavior also conflicts with the Skill's privacy claim that secrets never leave the user's computer. In Claude Project advisory mode, pasted results are necessarily transmitted to the conversation service and may become p ...[truncated 1268 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not print complete matching history lines. Use a local scanner that emits only:
- The history file path
- The line number
- The probable credential type
- A fully redacted value or length
- Redact output before it reaches the terminal. Do not rely on the user to manually remove secrets.
- Avoid matching and returning an entire line. Parse assignments locally and replace values with
[REDACTED]. - Add an explicit checkpoint instructing the user to inspect output locally and never paste any secret-bearing line.
- Prefer a result format such as:
text ~/.zsh_history:418 — possible API token assignment — value redacted - For connection strings, remove the entire credential component rather than showing a partial password.
- If a real secret is pasted, advise immediate revocation or rotation and do not repeat it.
- Correct the privacy documentation to distinguish fully local OpenClaw scanning from the remote Claude Project workflow.
- Do not print complete matching history lines. Use a local scanner that emits only:
