T09 · Insecure Skill Coding Practices
- Location
SKILL.md:52- Finding
Secrets Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 52-66
Vulnerability Type: Sensitive information exposure through process arguments and shell history
Risk Level: MediumVulnerable Code:
bash op item create --category login --title "My Service" --url "https://example.com" --vault "Vault Name" username="myuser" password="mypassword"bash op item create --category "Secure Note" --title "API Key" --vault "Vault Name" notes="my-secret-key"bash op item edit "Item Name" password="newpassword" --vault "Vault Name"Technical Analysis
The documented examples pass passwords and API keys as literal command-line arguments. If an agent replaces these placeholders with genuine credentials, the sensitive values may be exposed through shell history, process-argument inspection, terminal transcripts, command auditing, agent execution logs, telemetry, or debugging output.
Quoting the values does not protect their confidentiality; it only affects shell parsing. Any system capable of recording or inspecting the resulting argument vector may capture the secrets.
Attack Path
- An agent or user follows an example and substitutes a real password or API key.
- The command is submitted to the shell with the secret embedded in its arguments.
- The shell, agent framework, terminal recorder, audit subsystem, or monitoring process records or observes the command.
- A local user, process, administrator, or log consumer retrieves the exposed value.
- The recovered credential is used to access the corresponding external account or service.
Impact Assessment
Exploitation does not directly grant additional local privileges, but it may disclose any credential supplied through these commands. The resulting external privileges are those associated with the exposed password or API key and may include access to third-party accounts, APIs, data, or administrative functionality.
T ...[truncated 181 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not place real passwords, tokens, API keys, or secure-note contents directly in command-line arguments.
- Use a protected input mechanism supported by the 1Password CLI, such as standard input or a securely generated item template, so secret values do not become part of the argument vector.
- Disable command echoing when handling secrets and ensure sensitive commands are not retained in shell history.
- Configure agent execution frameworks, terminal recorders, telemetry, and audit logging to redact credential values.
- If a temporary file is unavoidable, create it with restrictive permissions, store it on an appropriate protected filesystem, and securely delete it immediately after use.
- Add an explicit warning to the documentation that example placeholders must not be replaced with real secrets directly on the command line.
