T09 · Insecure Skill Coding Practices
- Location
src/1password.js:43- Finding
Shell Command Injection in 1Password CLI Integration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
AgentGuard has a coherent security-tool purpose, but its artifacts contain serious implementation and documentation gaps that could expose credentials or bypass approval controls.
Review carefully before installing. Do not use this version for real secrets unless the default password is removed, approvals are authenticated, shell-based 1Password calls are replaced with safe argument-based execution, agent IDs are validated, and webhook/file-permission handling is tightened.
src/1password.js:43Shell Command Injection in 1Password CLI Integration
src/1password.js:70Command Injection Through tmux Command Construction
src/cli.js:24Predictable Hard-Coded Fallback Vault Password
src/human-gate.js:110Unauthenticated Approval of Dangerous Operations
src/vault-op.js:121Path Traversal Through Unvalidated Agent Identifiers
src/human-gate.js:41Sensitive Approval Records Created Without Explicit Restrictive Permissions
src/feishu-notifier.js:160Unrestricted and Potentially Plaintext Webhook Delivery of Approval Details
src/audit.js:16Audit Logs Are Unkeyed and Use Shared Cross-Agent Chain State
package-lock.json:24Dependency Lockfile Uses a Non-Official Package Registry Mirror
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The documentation claims permission scopes, human approval workflows, and audit trails, but the file itself does not provide a concrete policy model, enforcement architecture, or implementation evidence for those controls. For a credential-handling skill, incomplete or overstated security guarantees materially increase the risk of unauthorized secret use or unreviewed external actions.
The CLI silently falls back to a hardcoded master password when AGENTGUARD_PASSWORD is unset, which means all local secrets may be encrypted or protected with a publicly guessable value. In a credential-management tool, this defeats the core trust boundary because any user or malware aware of the default can access stored data.
The quick-start example shows a secret being passed directly on the command line (agentguard vault store my-agent OPENAI_API_KEY sk-xxx) without any warning or safer alternative. This can expose credentials through shell history, process listings, terminal logging, or copied documentation patterns, which is especially concerning in a skill centered on credential security.
The README states that dangerous operations always require human approval unless policy is set to auto-approve, which creates an explicit bypass for controls protecting high-risk actions such as credential access, external API calls, file writes, and command execution. In a trust middleware skill whose core purpose is enforcing permission boundaries and human oversight, allowing dangerous actions to be auto-approved weakens the security model and could enable fully autonomous sensitive or destructive behavior if misconfigured or abused.
## Dangerous Operations
These operations always require human approval (unless policy is `auto-approve`):
- `send_message`, `send_email`
- `financial_transaction`
The skill advertises credential storage, approval workflows, and external notifications, and the examples explicitly imply access to environment secrets and network-capable channels, but it declares no explicit tool scope or allowed-tools boundary. In a security-oriented skill, undeclared capabilities are especially risky because users may trust it to enforce boundaries while the runtime permissions remain ambiguous and potentially broader than expected.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Permission Levels
| Level | Auto-approve | Requires Human |
|-------|--------------|----------------|
| `read` | ✅ Read operations | ❌ |
| `write` | ✅ Read/Write | ❌ |
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Permission Levels
| Level | Auto-approve | Requires Human |
|-------|--------------|----------------|
| `read` | ✅ Read operations | ❌ |
| `write` | ✅ Read/Write | ❌ |
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Permission Levels
| Level | Auto-approve | Requires Human |
|-------|--------------|----------------|
| `read` | ✅ Read operations | ❌ |
| `write` | ✅ Read/Write | ❌ |
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
- Send messages/emails
- Financial transactions
- Delete data
- Modify system config
- Access sensitive credentials
- External API calls (configurable)
The setup example instructs users to export a master password in a shell environment variable without warning that environment variables can persist in shell history, process listings, CI logs, or inherited subprocess environments. For a security-focused tool, showing this as the default workflow may cause users to handle real secrets insecurely.
The documentation demonstrates retrieving a stored credential and states that the value is directly printed for scripting convenience, but it does not warn that secrets may be exposed in terminal scrollback, logs, screenshots, or piped subprocesses. In a credential-management skill, normalized examples like this can encourage unsafe secret handling patterns and lead users to leak live API keys during routine use.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
const apiKey = await guard.getCredential('nano', 'OPENAI_API_KEY');
// 使用 API
const response = await fetch('https://api.openai.com/v1/completions', {
headers: { 'Authorization': Bearer ${apiKey} }
});
The documentation tells users to store a credential directly on the command line (agentguard vault store my-agent API_KEY xxx), which can expose secrets through shell history, process inspection, terminal logs, or recorded transcripts. Because this is setup guidance for credential management software, readers may copy the pattern into real deployments and inadvertently leak API keys during onboarding.
The manifest describes AgentGuard as trust middleware focused on credential storage, permission scopes, human approval, and audit trails. This document introduces a broader 'Credit Score System' for agent reputation scoring and ranking, which is a materially different product capability rather than an obvious implementation detail of the stated features.
The report example recommends 'suggestedPermissions: ["admin"]' based on a reputation score, which normalizes privilege elevation from behavioral scoring rather than least-privilege review. In a credential and permission-guarding skill, this is dangerous because operators may treat a soft trust metric as sufficient justification for granting broad administrative access.
The documentation explicitly shows bypassing approval for high-scoring agents and auto-adjusting permissions without a strong warning about integrity and abuse risks. In the context of a security middleware skill, guidance that encourages approval bypass and automated elevation can lead adopters to weaken controls around dangerous operations.
The dynamic permissions example automatically increases an agent's permission level as its score rises, including promotion to admin at high scores. This creates an unsafe trust-to-privilege pipeline that can be gamed or miscalculated, turning reputation manipulation or scoring errors into direct privilege escalation.
The documentation shows approval details, including recipient and subject, being sent to Feishu without any warning that operational data will be disclosed to a third-party messaging platform. In a permission/approval system, these fields can contain sensitive business or personal information, so normal use can unintentionally leak data outside the primary system boundary.
Detected: suspicious.dangerous_exec, suspicious.exposed_secret_literal