T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:54
- Finding
- Secrets Exposed Through Command-Line Arguments## Vulnerability Details **File Location**: `SKILL.md:54-71` **Vulnerability Type**: Secrets passed as plaintext command-line arguments **Risk Level**: Medium ### Vulnerable 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 commands place passwords, API keys, and other sensitive values directly in command-line arguments. Depending on the operating system, shell, agent execution environment, and logging configuration, these values may be exposed through: - Shell history files - Process listings and process-monitoring interfaces - Agent command transcripts - Debug or telemetry logs - Terminal session recording - Error reports that capture complete command invocations Although the commands use the legitimate 1Password CLI, the secrets can escape 1Password's protected storage before being submitted to it. The warning not to print secrets does not prevent command arguments from being recorded by the surrounding shell or agent infrastructure. ### Attack Path 1. An agent follows the documented create or edit example and substitutes a real password or API key. 2. The shell, process monitor, agent runtime, or diagnostic system records or observes the complete command. 3. A local user, administrator, monitoring service, or attacker with access to those records retrieves the plaintext argument. 4. The exposed credential is used to access the associated service or account with the credential's existing privileges. ### Impact Assessment Exploitation can disclose credentials stored or updated through the documented workflow. The resulting privileges depend on the compromis ...[truncated 333 chars]
- Remediation
- ## Remediation Suggestions - Replace command-line secret assignments with a 1Password CLI template or JSON-input workflow that avoids including secret values in process arguments. - Where supported, provide sensitive input through a protected standard-input channel rather than the command line. - If a temporary input file is unavoidable, create it with owner-only permissions, store it on an appropriately protected filesystem, and securely remove it immediately after use. - Configure agent runtimes and execution wrappers to redact secret-bearing input and avoid recording full command invocations. - Disable or temporarily suppress shell history for secret-handling operations. - Add an explicit warning that real passwords, tokens, and API keys must not be embedded in command arguments. - Use narrowly scoped credentials and rotate any secret suspected of appearing in process listings, histories, transcripts, or logs.
