T09 · Insecure Skill Coding Practices
- Location
references/cli-examples.md:10- Finding
Secret Disclosure Through Plaintext CLI Output and Insecure File Export Examples
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is for 1Password CLI use, but its examples can expose real passwords or keys in terminal output and local files, so it needs review before installation.
Install only if you are comfortable with an agent helping operate your 1Password CLI. Do not run the examples that print secrets, disable masking, capture terminal panes after secret output, or write keys/configs to disk unless you have isolated the environment and planned permissions and cleanup.
references/cli-examples.md:10Secret Disclosure Through Plaintext CLI Output and Insecure File Export Examples
op run --no-masking -- printenv DB_PASSWORD resolves the secret into an environment variable and then prints it, which is a direct credential disclosure pattern. This is especially dangerous in shells, CI systems, and shared terminals where stdout may be logged or observed by other users or processes.
## Run
- `export DB_PASSWORD="op://app-prod/db/password"`
- `op run --no-masking -- printenv DB_PASSWORD`
- `op run --env-file="./.env" -- printenv DB_PASSWORD`
## Inject
The example explicitly disables masking with --no-masking and prints the secret via printenv, causing the secret value to be exposed in terminal output, logs, recordings, or CI job traces. Because this skill is specifically about handling secrets with 1Password, demonstrating unmasked output materially increases the chance users will leak credentials.
Using op run --env-file="./.env" -- printenv DB_PASSWORD still demonstrates printing a secret-bearing environment variable, exposing the resolved secret to stdout. Although it does not disable masking explicitly, the example normalizes a workflow where secrets are surfaced in command output rather than consumed safely by an application.
- `export DB_PASSWORD="op://app-prod/db/password"`
- `op run --no-masking -- printenv DB_PASSWORD`
- `op run --env-file="./.env" -- printenv DB_PASSWORD`
## Inject
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- `export DB_PASSWORD="op://app-prod/db/password"`
- `op run --no-masking -- printenv DB_PASSWORD`
- `op run --env-file="./.env" -- printenv DB_PASSWORD`
## Inject
The examples include commands that write secret material to local files and inject secrets into files or stdout without any warning about secure handling. In a secrets-management skill, this can lead users to leave plaintext secrets on disk, in shell history, backups, or world-readable locations, increasing accidental exposure risk.
Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.
- macOS: Settings > Developer > Integrate with 1Password CLI (Touch ID optional).
- Windows: turn on Windows Hello, then Settings > Developer > Integrate.
- Linux: Settings > Security > Unlock using system authentication, then Settings > Developer > Integrate.
- After integration, run any command to sign in (example in docs: `op vault list`).
- If multiple accounts: use `op signin` to pick one, or `--account` / `OP_ACCOUNT`.
- For non-integration auth, use `op account add`.
No suspicious patterns detected.