T09 · Insecure Skill Coding Practices
- Location
SKILL.md:23- Finding
Credential Exposure Through Shell History and Process Telemetry
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:23-24
Vulnerability Type: Plaintext credential exposure in command-line instructions
Risk Level: HighVulnerable Code
bash echo '{"username":"USER","password":"PASS","domain":"DOMAIN"}' | \ python3 skills/qr-password/scripts/generate-qr.py /tmp/qr-out.pngTechnical Analysis
The documented workflow instructs users or agents to place a plaintext password directly in a shell command. Although the credential is passed to the Python process through standard input, the command used to construct that input may be recorded in interactive shell history.
Depending on the execution environment, the complete command may also be retained by terminal recording, endpoint monitoring, audit infrastructure, agent tool-call history, or process execution telemetry. This contradicts the project's mandatory rule that credentials must never be logged.
Attack Path
- A user or agent follows the documented command and substitutes a real credential for
PASS. - The shell, agent runtime, terminal recorder, or endpoint monitoring system retains the command text.
- An attacker with access to the user's history file, audit records, support bundle, or execution trace searches for the QR-generation command.
- The attacker extracts the plaintext password and uses it against the associated username and domain.
Impact Assessment
An attacker who can read local shell history or execution telemetry can obtain the complete transferred credential. The vulnerability does not independently grant elevated system privileges, but the exposed credential may grant access to the associated external service with all privileges assigned to that account.
- A user or agent follows the documented command and substitutes a real credential for
- Remediation
View remediation
Remediation Suggestions
- Do not include passwords directly in shell command text.
- Add a secure interactive input mode based on Python's
getpass.getpass(). - Prefer direct vault integration or a protected file descriptor over command-line interpolation.
- If structured input is required, read it from a temporary descriptor created with restrictive permissions and remove it immediately after use.
- Warn users not to place credentials in shell history, agent prompts, or command arguments.
- Review execution and audit logging policies to ensure standard input containing credentials is not captured.
