Back to skill

Security audit

credential-vault-design

Security checks for vulnerabilities and agentic risk

Overview

This is a real local credential-vault package, but it handles highly sensitive secrets with under-scoped automation paths and some risky defaults users should review before installing.

Review this as a high-trust credential tool, not just documentation. Avoid giving an agent your master password, recovery key, or raw credential values; prefer interactive entry over --password or environment variables, keep backups before delete/remove operations, and do not rely on this package as an AI credential broker that prevents plaintext exposure until safer reveal and confirmation controls are added.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
tools/vault.py:349
Finding

Credential deletion proceeds without an enforced confirmation gate

Content
View full analysis

Vulnerability Details

File Location: tools/vault.py, lines 349–357
Vulnerability Type: Unconfirmed destructive operation
Risk Level: Medium

Vulnerable Code

python
def cmd_delete(args):
    v, kek = _open(args)
    v.delete_entry(kek, args.label)
    v._seal_and_save(kek)
    print(f"✔ 已删除:{args.label}")
    return 0

Technical Analysis

The delete command permanently removes a credential immediately after the vault is opened. It does not require an explicit confirmation flag, interactive acknowledgment, dry run, or backup.

Possession of the master password authenticates access to the vault, but it does not independently establish that the caller intended an irreversible deletion. This distinction is important because the Skill permits Agent and automation use, and tools/vault.py can be invoked directly without a separate confirmation mechanism.

The relevant flow is:

  1. _open(args) authenticates the caller and loads the vault.
  2. v.delete_entry(kek, args.label) removes the selected entry from in-memory state.
  3. v._seal_and_save(kek) immediately persists the modified vault.
  4. No confirmation is enforced between selecting the entry and committing the deletion.

This is a reachable destructive operation rather than evidence of malicious intent.

Attack Path

  1. A user provides or exposes the vault password through the supported argument or environment-variable mechanism.
  2. An Agent, automation workflow, or incorrectly interpreted instruction invokes:
    bash
    python tools/vault.py delete <label> --password <password>
    
  3. The command authenticates and locates the specified credential.
  4. The credential is deleted and the modified vault is immediately written to disk.
  5. The user receives no final opportunity to inspect or reject the destructive change.

Impact Assessment

The operation does not grant additional system privileges or disclose credential plaintext. Its confirmed impact is permanent l ...[truncated 248 chars]

Remediation
View remediation

Remediation Suggestions

  • Require an explicit --yes or --confirm-delete flag for non-interactive deletion.
  • In interactive mode, display the exact vault path and entry label and require the user to type the label before proceeding.
  • Refuse destructive execution when neither interactive confirmation nor the explicit non-interactive confirmation flag is present.
  • Add a --dry-run mode that reports the intended deletion without modifying the vault.
  • Consider moving deleted entries into a recoverable trash area rather than immediately removing them.
  • Optionally create a timestamped encrypted backup before committing deletion.
  • Add tests proving that deletion fails closed when confirmation is absent.

T09 · Insecure Skill Coding Practices

Warning
Location
tools/vault_cli.py:172
Finding

KeePass entry removal proceeds without an enforced confirmation gate

Content
View full analysis

Vulnerability Details

File Location: tools/vault_cli.py, lines 172–186
Vulnerability Type: Unconfirmed destructive operation
Risk Level: Medium

Vulnerable Code

python
def cmd_remove(args):
    _need(args.vault)
    kp = _open(args.vault, args.keyfile, args.interactive)
    e = kp.find_entries_by_title(args.title, first=True)
    if e is None:
        sys.stderr.write(f"未找到条目:{args.title}\n")
        sys.exit(2)
    kp.delete_entry(e)
    try:
        kp.save()
    except Exception as exc:
        sys.stderr.write(f"保存失败:{args.vault}\n")
        sys.stderr.write(f"原因:{exc}\n")
        sys.exit(2)
    print(f"[ok] 已删除条目:{args.title}")

Technical Analysis

The KeePass-based CLI authenticates to the selected database, finds the first entry matching the supplied title, deletes it, and immediately saves the database. There is no mandatory confirmation, explicit destructive-action flag, preview, or automatic backup.

The --interactive option only controls how the master password is acquired. It does not introduce a deletion confirmation. Consequently, both interactive and automated callers reach kp.delete_entry(e) without a distinct acknowledgment of destructive intent.

Selection by title also means that first=True determines which entry is removed when duplicate titles exist, increasing the importance of presenting the exact selected record before committing the operation.

Attack Path

  1. A caller obtains valid access to the user-selected KeePass database through the supported password and optional key-file mechanisms.
  2. An Agent, script, or mistaken instruction invokes:
    bash
    python tools/vault_cli.py remove --vault <database.kdbx> --title <title>
    
  3. _open authenticates to the database.
  4. find_entries_by_title(..., first=True) selects the first matching entry.
  5. kp.delete_entry(e) removes that entry.
  6. kp.save() immediately persists the deletion without a final user confirmation.

Impact A

...[truncated 385 chars]

Remediation
View remediation

Remediation Suggestions

  • Require --yes or an equivalent explicit confirmation flag for non-interactive removal.
  • In interactive mode, display the database path, group, title, username, and a stable entry identifier before requesting confirmation.
  • Reject ambiguous title-only deletion when multiple entries share the same title; require a unique UUID or group-qualified selector.
  • Implement a dry-run option that shows the entry that would be removed.
  • Create an encrypted backup or move the entry to the KeePass recycle bin before permanent removal.
  • Add automated tests confirming that removal cannot proceed without acknowledgment and that ambiguous titles are rejected.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (47)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY_AUDIT_云鼎_2026-08-26.md (reported line 45)May include surrounding context.

md
### 命令执行与权限检查
- **发现次数**: 0 次(危险命令)
- 详细说明: `curl`/`wget`/`eval`/`exec`/`system`/`subprocess`/`os.system`/`os.popen`/`Popen`/`sudo`/`rm -rf`/`chmod 777` **全部零命中**
- `base64` 命中均为标准密码学编解码(`b64encode(nonce+ct)` / 公钥签名展示),非隐蔽载荷

### 文件操作与敏感路径检查

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · SECURITY_AUDIT_云鼎_2026-08-26.md (reported line 45)May include surrounding context.

md
### 命令执行与权限检查
- **发现次数**: 0 次(危险命令)
- 详细说明: `curl`/`wget`/`eval`/`exec`/`system`/`subprocess`/`os.system`/`os.popen`/`Popen`/`sudo`/`rm -rf`/`chmod 777` **全部零命中**
- `base64` 命中均为标准密码学编解码(`b64encode(nonce+ct)` / 公钥签名展示),非隐蔽载荷

### 文件操作与敏感路径检查

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · SECURITY_AUDIT_云鼎_2026-08-26.md (reported line 62)May include surrounding context.

md
- **Base64 编码检测**: 仅发现密码学编解码用途,无可疑编码载荷

### 远程脚本深度分析
- **不适用**: 未发现"自动下载+执行"模式(`curl | bash` / 下载后 eval 零命中),无远程脚本需深度分析

### 依赖安装风险检查
- **全局安装检测**: 文档含 `pip install cryptography`/`pip install pykeepass`(安装指令为**用户手动执行**,非 skill 自动执行)→ 已补虚拟环境提示

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Claiming to be a production-capable credential vault while only demonstrating cryptographic primitives is a security-relevant documentation flaw. In this context, the mismatch is more dangerous because the subject matter is secret storage and access control: users could assume protections like proxy access, recovery, and authorization exist when they do not, causing credential leakage, lockout, or insecure workaround adoption.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Claiming to be a production-capable credential vault while only demonstrating cryptographic primitives is a security-relevant documentation flaw. In this context, the mismatch is more dangerous because the subject matter is secret storage and access control: users could assume protections like proxy access, recovery, and authorization exist when they do not, causing credential leakage, lockout, or insecure workaround adoption.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Claiming to be a production-capable credential vault while only demonstrating cryptographic primitives is a security-relevant documentation flaw. In this context, the mismatch is more dangerous because the subject matter is secret storage and access control: users could assume protections like proxy access, recovery, and authorization exist when they do not, causing credential leakage, lockout, or insecure workaround adoption.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Claiming to be a production-capable credential vault while only demonstrating cryptographic primitives is a security-relevant documentation flaw. In this context, the mismatch is more dangerous because the subject matter is secret storage and access control: users could assume protections like proxy access, recovery, and authorization exist when they do not, causing credential leakage, lockout, or insecure workaround adoption.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
| 文档与理论文本 | 本 `SKILL.md`、`README.md`、其中「理论依据」段与一切理论表述 | **不在 MIT 覆盖范围内**:保留所有权利(All rights reserved) |

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 107)May include surrounding context.

md
| 文档与理论文本 | 本 `SKILL.md`、`README.md`、其中「理论依据」段与一切理论表述 | **不在 MIT 覆盖范围内**:保留所有权利(All rights reserved) |

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/panorama-aibest.svg (reported line 41)May include surrounding context.

text
<circle cx="50" cy="386" r="13" fill="#E5484D"/>
  <text x="50" y="391" text-anchor="middle" font-size="14" font-weight="700" fill="#FFFFFF">3</text>
  <text x="72" y="391" font-size="15" font-weight="700" fill="#1F2933">硬件密钥换机即死</text>
  <text x="44" y="418" font-size="12" fill="#5B6B7B">DPAPI/Keychain/HUKS 绑定设备</text>
  <text x="44" y="438" font-size="12" fill="#5B6B7B">换机/重装 = 整库锁死</text>

  <!-- Card 4 -->

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/panorama.svg (reported line 39)May include surrounding context.

text
<circle cx="50" cy="386" r="13" fill="#E5484D"/>
  <text x="50" y="391" text-anchor="middle" font-size="14" font-weight="700" fill="#FFFFFF">3</text>
  <text x="72" y="391" font-size="15" font-weight="700" fill="#1F2933">硬件密钥换机即死</text>
  <text x="44" y="418" font-size="12" fill="#5B6B7B">DPAPI/Keychain/HUKS 绑定设备</text>
  <text x="44" y="438" font-size="12" fill="#5B6B7B">换机/重装 = 整库锁死</text>

  <!-- Card 4 -->

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SECURITY_AUDIT_云鼎_2026-08-26.md (reported line 45)May include surrounding context.

md
### 命令执行与权限检查
- **发现次数**: 0 次(危险命令)
- 详细说明: `curl`/`wget`/`eval`/`exec`/`system`/`subprocess`/`os.system`/`os.popen`/`Popen`/`sudo`/`rm -rf`/`chmod 777` **全部零命中**
- `base64` 命中均为标准密码学编解码(`b64encode(nonce+ct)` / 公钥签名展示),非隐蔽载荷

### 文件操作与敏感路径检查

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description contains a very broad set of trigger phrases such as credential management, password management, key management, break-glass, and secret management, but does not define clear activation boundaries, allowed use cases, or exclusions. In an agent ecosystem, this can cause the skill to be invoked in overly broad contexts involving highly sensitive secrets, increasing the chance of inappropriate routing, overexposure of privileged functionality, or accidental handling of credentials outside the intended workflow.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The SVG makes two claims that are hard to reconcile: experts 'never touch plaintext' while also asserting they can restore access when passwords are forgotten. In a credential-vault design, that ambiguity can conceal a recovery path that effectively grants privileged access to secrets, which may mislead users about the true trust boundary and recovery model.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states the script's purpose entirely in Chinese, and later generated content is also hard-coded in Chinese, indicating the skill is designed to produce Chinese-language artifacts by default. There is no user opt-in, language selection, or documented region-specific justification, which conflicts with the policy against forcing a specific language or locale.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill description presents a local credential vault for consolidating secrets and enabling AI use without exposing plaintext. This script instead performs package-wide file inventory and integrity attestation by recursively reading every file under a supplied root and recording hashes, which is a software packaging/provenance function rather than credential-vault behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest claims a runnable local credential vault focused on managing and shielding credentials. Here the code generates and writes a new manifest.json containing package metadata and fingerprints, which is behavior for release engineering or supply-chain attestation rather than operating a credential vault.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Generating a copyright/licensing attestation document for distribution artifacts does not align with the stated end-user purpose of centralizing credentials and preventing plaintext exposure to AI. This is a documentation/provenance publishing feature, not a vault operation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script emits the entire ATTESTATION.md template in Chinese, enforcing a single language for generated user-facing documentation. Because there is no opt-in, fallback, or documented regional constraint, this is a natural-language policy violation under the language/locale rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JSON contains natural-language fields such as "principle", "metric", "detail", and "summary" exclusively in Chinese. Under the language/locale policy, forcing a specific language without user opt-in or documented justification is a policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

L188 的 detail 明确声称不存在文件时,CLI 中会提示“保险库不存在”。但对应实现仅在 L183 用 os.path.exists 检查一个构造出的路径不存在,并没有调用任何 CLI 路径、捕获错误消息或断言该提示文本实际出现,因此文档描述与代码行为不一致。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The tool accepts the master password from a command-line flag and from environment variables. Secrets provided this way may be exposed through process listings, shell history, crash reports, orchestration metadata, or inherited environments, which undermines the vault's goal of limiting plaintext exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The recovery key can be supplied through command-line arguments or environment variables, exposing a highly sensitive break-glass secret through the same leakage channels as other process-level secrets. Because the recovery key can unlock and reset the vault, its disclosure has greater consequence than leakage of a single entry.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

cmd_get prints the decrypted secret value directly to stdout. In real use, stdout is often captured by shell history helpers, terminal scrollback, logs, CI runners, or calling agents, so this can unintentionally disclose credentials beyond the intended user or process.

Content

No source excerpt is available for this finding.