T09 · Insecure Skill Coding Practices
- Location
references/cli-examples.md:8- Finding
Secret Exposure Through Unmasked Output, Terminal Capture, and Insecure File Persistence
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This 1Password CLI skill is coherent and not deceptive, but its examples can expose secrets in terminal output or files without enough containment guidance.
Install only if you are comfortable letting the agent operate an authenticated 1Password CLI session. Do not ask it to print passwords, OTPs, keys, or injected configs into chat or terminal output, and avoid examples that use --no-masking or write secret files unless you add strict permissions and cleanup.
references/cli-examples.md:8Secret Exposure Through Unmasked Output, Terminal Capture, and Insecure File Persistence
op run --no-masking -- printenv DB_PASSWORD intentionally resolves a secret and prints it in cleartext to stdout with masking disabled. This can leak credentials to terminal scrollback, logs, CI job output, screen recordings, or other monitoring systems, making credential exposure highly likely.
## 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
op run --env-file="./.env" -- printenv DB_PASSWORD still demonstrates printing a resolved secret to stdout, which exposes the secret even without the explicit --no-masking flag. In many environments, command output is captured by logs or CI systems, so this pattern normalizes unsafe handling of secrets.
- `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 demonstrate reading secrets, writing secret material to disk, disabling masking, and injecting secrets into files without any safety guidance. In a security-sensitive skill for a password manager CLI, omission of handling warnings increases the chance that users will expose credentials in shells, logs, or world-readable files during normal use.
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.