Back to skill

Security audit

SDD Start Human Verify

Security checks for vulnerabilities and agentic risk

Overview

This skill is an acceptance-test runner, but it lets checklist text drive Bash commands and automatic code/config changes with too little scoping or user approval.

Install only if you fully trust the workspace and every spec-human-verify.md file it may read. Before running it, review all backticked commands, avoid custom or external checklist paths, and do not allow it to modify .env, source code, or configuration unless you explicitly approve the exact changes.

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
SKILL.md:39
Finding
Arbitrary Shell Command Execution from Untrusted Acceptance Checklists<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 39-42, 92-104, and 153-164 **Vulnerability Type**: Command injection through untrusted checklist content **Risk Level**: High ### Vulnerable Code Snippets At lines 39-42, the Skill accepts a supplied checklist path without imposing a trusted-directory boundary: ```markdown ### If a path argument is provided - Directly use it as the checklist file path - Read the file and continue to Step 2 ``` At lines 92-104, commands embedded in preparation items are extracted and executed through Bash: ```markdown ### 3.1 `[AUTO]` Items — One-Time Command Execution 1. Extract the command from the backticks in the line 2. Execute it through Bash 3. Success → display `✓ [description]` and continue to the next item 4. Failure → analyze the output and attempt to fix simple problems: - Missing variables in `.env` → automatically append the variable - Compilation error → display the error, attempt a fix, and compile again - Version mismatch → report the actual version and use `AskUserQuestion`: “Continue” / “Abort” 5. Retry after remediation, for a maximum of **3 rounds** 6. If it still fails after 3 rounds → use `AskUserQuestion`: “Skip” / “Abort acceptance testing” ``` At lines 153-164, commands embedded in automated verification steps are likewise executed without validation: ```markdown #### `[A]` Steps — Automated Execution: 1. Extract the command from the backticks in the step 2. Execute it through Bash 3. Compare the actual output with the expected result after `→ Expected:` 4. **Match** → display `✓ [step description]` 5. **Mismatch** → analyze the cause and attempt remediation, such as restarting services or fixing configuration: - Retry the command, for a maximum of **3 rounds** - If remediation succeeds → display `✓ [step description] (passed after retry)` - If it still fails after 3 rounds → record the step as **failed**, display `✗ [step description]`, and include actual ...[truncated 3521 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Restrict checklist locations** - Resolve the supplied path to its canonical absolute path. - Require the resolved path to remain under the canonical `{workspace}/spec/` directory. - Reject `..` traversal, absolute external paths, and symlinks that escape the trusted directory. - Require the expected filename and file type where feasible. 2. **Do not interpret checklist text as arbitrary shell code** - Replace backtick command extraction with a structured action schema. - Define a small allowlist of supported executables and operations. - Represent commands as executable-and-argument arrays rather than shell strings. - Invoke programs without a shell where possible. 3. **Validate all requested operations** - Reject command substitution, redirection, pipes, command chaining, background execution, and shell metacharacters. - Validate paths, ports, environment variable names, and arguments against explicit schemas. - Reject executable paths outside approved tool directories. 4. **Require informed approval** - Display the exact executable, arguments, working directory, affected files, and expected network access before execution. - Require explicit user confirmation for commands not generated from a trusted built-in action. - Always require confirmation before editing `.env`, source code, or configuration. 5. **Apply least privilege and isolation** - Run acceptance commands in a sandbox or disposable container. - Mount only the required workspace paths and use read-only mounts where possible. - Disable network access by default and enable it only for documented test requirements. - Avoid exposing unrelated credentials or host environment variables to test processes. 6. **Constrain automatic remediation** - Permit only narrowly defined and reversible fixes. - Generate a proposed patch and request approval before applying it. - Record every changed file and provid ...[truncated 661 chars]
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Credential Access

High
Category
Privilege Escalation
Content
2. 通过 Bash 执行
3. 成功 → 显示 `✓ [description]`,继续下一个项目
4. 失败 → 分析输出并尝试修复简单问题:
   - .env 缺失变量 → 自动追加该变量
   - 编译错误 → 显示错误,尝试修复,重新编译
   - 版本不匹配 → 报告实际版本,`AskUserQuestion`:「继续」/「中止」
5. 修复后重试,最多 **3 轮**
Confidence
88% confidence
Finding
The explicit instruction to inspect failures and automatically append missing variables to .env creates a credential-handling risk around secret-bearing configuration files. Even without direct exfiltration logic, autonomous reads/writes to .env can expose, overwrite, fabricate, or mishandle sensitive values, and the danger is elevated because acceptance execution does not require secret-management privileges.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill is framed as an acceptance-execution workflow, but it authorizes the agent to modify environment files, repair build/configuration issues, and retry autonomously. That materially expands privilege from verification into unsupervised remediation, creating risk of unintended code/config changes and unsafe command-side effects during what users may expect to be a read-mostly validation task.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
Automatically appending missing variables to .env and attempting configuration/code fixes is not necessary for a pure acceptance-runner and violates least privilege. In practice, this can alter runtime behavior, corrupt local developer settings, or accidentally inject placeholder secrets/configuration into sensitive files without adequate validation.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
For human-verification steps, the skill directs the AI to take a free-form user defect report and then directly 'fix code' in a loop until the user says the issue is resolved. This turns a human-oracle verification phase into an open-ended code-editing workflow driven by ambiguous natural-language feedback, which can introduce unsafe, unreviewed changes and exceed the skill's stated purpose.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The rule `所有用户-facing 信息用中文` mandates a single language for user-visible interactions. This is a natural-language locale policy constraint with no opt-in, fallback, or justification that the skill is region-specific.

Static analysis

No suspicious patterns detected.