Back to skill

Security audit

my_skill

Security checks for vulnerabilities and agentic risk

Overview

The skill is for 1Password CLI use, but some included examples can expose real vault secrets in terminal output or plaintext files.

Review this skill carefully before installing. It is not evidence of a backdoor, but do not copy examples that print secrets, use `--no-masking`, capture secret output in tmux, or write keys/configs to ordinary working-directory files unless you have strict permissions and cleanup in place.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
references/cli-examples.md:8
Finding
Secret Disclosure Through Unsafe 1Password CLI Examples<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-examples.md`, lines 8–20 **Vulnerability Type**: Secret exposure through terminal output and insecure file persistence **Risk Level**: High ### Vulnerable Code ```bash - `op read op://app-prod/db/password` - `op read "op://app-prod/db/one-time password?attribute=otp"` - `op read "op://app-prod/ssh key/private key?ssh-format=openssh"` - `op read --out-file ./key.pem op://app-prod/server/ssh/key.pem` ## 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 - `echo "db_password: {{ op://app-prod/db/password }}" | op inject` ``` ### Technical Analysis The examples encourage operations that disclose highly sensitive 1Password values or persist them without adequate file-system protections: - `op read` writes passwords, one-time passwords, and private keys directly to standard output. - `op run --no-masking -- printenv DB_PASSWORD` explicitly disables 1Password's output masking and prints the resolved password. - `op read --out-file ./key.pem` writes an SSH private key to a normal working-directory file without establishing a restrictive `umask`, verifying permissions, or arranging cleanup. - `op inject` can emit resolved secrets to standard output or generate plaintext configuration files. This behavior conflicts with the guardrail in `SKILL.md` that prohibits placing secrets in logs, chat, or code. It is especially hazardous because the documented workflow captures tmux pane output. Terminal output containing secrets may consequently be retained in pane history, shell transcripts, agent tool results, conversation context, or centralized execution logs. Files generated in the working directory may also inherit permissive default permissions. On a multi-user host, another local account or process could read a private key or generated configuration file. ### Attack Path 1. A ...[truncated 1562 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove examples that print resolved secrets directly: - Do not demonstrate `op read` for passwords, OTPs, or private keys without a non-output consumer. - Remove `op run --no-masking -- printenv DB_PASSWORD`. - Do not pipe resolved `op inject` output to a terminal or captured pane. 2. Demonstrate secret use through a process that does not print its environment: ```bash export DB_PASSWORD="op://app-prod/db/password" op run -- application-command ``` 3. If writing a secret to disk is strictly necessary, establish restrictive permissions before creation and guarantee cleanup: ```bash umask 077 SECRET_DIR="$(mktemp -d)" trap 'rm -rf "$SECRET_DIR"' EXIT op read --out-file "$SECRET_DIR/key.pem" "op://app-prod/server/ssh/key.pem" chmod 600 "$SECRET_DIR/key.pem" ``` 4. Add explicit warnings that secret-bearing commands must not be followed by tmux pane capture, terminal recording, debug tracing, `printenv`, `env`, or log collection. 5. Prefer ephemeral mechanisms such as `op run` and direct process input over plaintext files. Where an application supports standard input or dedicated credential descriptors, pass secrets through those channels. 6. Document that generated configuration files containing injected secrets require restrictive permissions, exclusion from version control, and deletion immediately after use. 7. Add a review rule requiring all examples to remain consistent with the `SKILL.md` prohibition against placing secrets in logs, chat, or code. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Env Variable Harvesting

High
Category
Data Exfiltration
Content
## 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
Confidence
97% confidence
Finding
`op run --no-masking -- printenv DB_PASSWORD` resolves a secret and then deliberately prints it, which is a direct secret disclosure pattern. The added `--no-masking` makes the example more dangerous by disabling a protective control and normalizing secret exposure during routine usage.

Missing User Warnings

High
Confidence
98% confidence
Finding
These examples explicitly print a secret-derived environment variable, and one disables masking with `--no-masking`, making disclosure to the terminal, logs, CI output, shell history capture tools, or other observers much more likely. In the context of a 1Password CLI skill, demonstrating secret exfiltration to stdout without warning is especially risky because users may copy the pattern into automation.

Env Variable Harvesting

High
Category
Data Exfiltration
Content
- `export DB_PASSWORD="op://app-prod/db/password"`
- `op run --no-masking -- printenv DB_PASSWORD`
- `op run --env-file="./.env" -- printenv DB_PASSWORD`

## Inject
Confidence
94% confidence
Finding
`op run --env-file="./.env" -- printenv DB_PASSWORD` demonstrates harvesting a secret from the runtime environment and printing it to stdout. Even without `--no-masking`, showing `printenv` against a secret variable encourages a disclosure workflow that can leak credentials in terminals, CI logs, and recorded sessions.

Credential Access

High
Category
Privilege Escalation
Content
- `export DB_PASSWORD="op://app-prod/db/password"`
- `op run --no-masking -- printenv DB_PASSWORD`
- `op run --env-file="./.env" -- printenv DB_PASSWORD`

## Inject
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The example writes secret material directly to a local file (`--out-file ./key.pem`) without any warning about filesystem exposure, permissions, shell history, backups, or cleanup. In a secrets-management skill, omitting handling guidance can lead users to persist sensitive keys in insecure locations or with overly broad permissions.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The inject examples produce secret-populated output either to stdout or to a concrete config file, but provide no warning that the resulting data is now plaintext secret material. That can cause accidental exposure through terminal logs, insecure file permissions, source control, artifact uploads, or long-lived config files.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Content
- 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`.
Confidence
80% confidence
Finding
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.

Static analysis

No suspicious patterns detected.