T09 · Insecure Skill Coding Practices
- Location
references/cli-examples.md:16- Finding
Plaintext Secret Disclosure Through Standard Output
- Content
View full analysis
Vulnerability Details
File Location:
references/cli-examples.md, lines 16 and 20
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: HighVulnerable Code
bash op run --no-masking -- printenv DB_PASSWORDbash echo "db_password: {{ op://app-prod/db/password }}" | op injectTechnical Analysis
The first command explicitly disables 1Password's output masking and passes a database password to
printenv, causing the resolved secret to be written to standard output. The second command sends an injected configuration containing the resolved database password to standard output.In an agent, CI, gateway, or terminal-automation environment, standard output may be retained in execution logs, terminal captures, chat transcripts, or monitoring systems. These examples therefore conflict with the guardrail in
SKILL.mdthat says secrets must never be pasted into logs, chat, or code.Attack Path
- A user or automated agent follows one of the documented examples.
- The authenticated
opprocess retrieves the referenced database password. --no-maskingcausesprintenvto display the real value, orop injectemits the resolved configuration.- The execution platform records standard output.
- A person or service with access to the retained output obtains the plaintext credential.
- The exposed credential can then be used against every database or service for which it remains valid.
Impact Assessment
The exposure does not itself grant additional local operating-system privileges. It can grant the application or database privileges associated with the disclosed credential, potentially including unauthorized data access, modification, or deletion. The scope depends on the credential's permissions, reuse, validity period, and the readership of captured output.
- Remediation
View remediation
Remediation Suggestions
- Remove the
--no-masking -- printenv DB_PASSWORDexample. - Do not demonstrate successful secret injection by printing the resolved value.
- Use
op runto pass secrets directly to the intended process while retaining masking. - If an example must verify injection, have the child process report only whether the variable is populated, never its value.
- Add an explicit warning that agent output, CI logs, terminal captures, and chat transcripts must be treated as disclosure channels.
- Rotate any credential that has already been exposed through captured output.
- Remove the
