Back to skill

Security audit

1password 1.0.1

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent 1Password CLI helper, but its examples can cause an agent to print or persist decrypted secrets in logs, transcripts, or local files.

Review before installing. Only use this skill when you intentionally want an agent to operate an authenticated 1Password CLI session. Avoid the examples that print secrets, disable masking, or write decrypted secrets to files unless you have a specific need and have controlled logs, permissions, cleanup, and credential rotation risk.

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:10
Finding
Decrypted 1Password secrets may be exposed through captured output and plaintext files## Vulnerability Details **File Location**: `references/cli-examples.md`, lines 10-23 **Vulnerability Type**: Plaintext sensitive-data exposure **Risk Level**: High **Complete Code Snippet**: ```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` - `op inject -i config.yml.tpl -o config.yml` ``` ### Technical Analysis The documented `op read` examples emit decrypted passwords, one-time passwords, and private keys directly to standard output. In an AI-agent environment, command output is commonly captured in tool responses, execution logs, terminal scrollback, or conversation transcripts. Consequently, following these examples can move secrets out of 1Password's protected storage and into less-protected records. The command `op run --no-masking -- printenv DB_PASSWORD` presents a particularly direct disclosure path: it explicitly disables 1Password's output masking and then prints the decrypted database password. This behavior conflicts with the guardrail in `SKILL.md` that states secrets must never be pasted into logs or chat. The `--out-file ./key.pem` and `op inject -o config.yml` examples also persist decrypted material to ordinary filesystem paths. The documentation does not require restrictive permissions, a private temporary directory, secure cleanup, or protection against pre-existing files and symbolic links. Such files can remain accessible through local users, other processes, backups, workspace collection, or later agent tasks. ### Attack Path 1. An agent follows one of the do ...[truncated 1487 chars]
Remediation
## Remediation Suggestions 1. Remove examples that print decrypted secrets directly to standard output, especially passwords, OTP values, and private keys. 2. Remove `--no-masking -- printenv DB_PASSWORD`; never disable output masking when a command can emit secret-bearing values. 3. Demonstrate `op run` using a real application that consumes the environment variable without printing it, and explicitly warn users not to enable shell tracing or verbose environment logging. 4. Prefer process-local secret delivery through `op run` or in-memory pipelines over persistent output files. 5. When a file is unavoidable, create it in a private directory with `umask 077`, enforce mode `0600`, reject unsafe pre-existing paths or symbolic links, minimize its lifetime, and guarantee cleanup with a shell trap. 6. Add an explicit warning that command output may be captured by agent tools, tmux `capture-pane`, CI systems, terminal logs, and conversation transcripts. 7. Replace disclosure-oriented examples with non-sensitive verification commands such as `op whoami`, `op vault list`, or commands that report only successful secret injection without displaying the resulting value. 8. Rotate any credential that may already have been exposed through logs, transcripts, generated files, or terminal captures.
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 (6)

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
70% confidence
Finding
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

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
70% confidence
Finding
Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

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
91% confidence
Finding
The examples show writing secrets or secret-rendered material to disk via `--out-file` and `op inject -o` without any warning that the resulting files may persist, be backed up, or receive unsafe filesystem permissions. In a secrets-management skill, omission of persistence warnings can lead users to accidentally store sensitive material in plaintext files.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The examples explicitly print a secret-derived environment variable to process output using `printenv DB_PASSWORD`, including one variant with `--no-masking`. This is dangerous because terminal output may be visible to other users, captured in shell history, CI logs, recordings, or observability systems.

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.