Back to skill

Security audit

SDD Plan Human Verify

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent checklist-generation purpose, but it can turn project specification text into commands meant for later autonomous execution without enough command-level safeguards.

Install only if you trust the spec documents that this skill will read and are prepared to review every generated [A], [AUTO], and [AUTO/SERVICE] command before running sdd-start-human-verify. Pay special attention to commands that install packages, contact the network, read .env files, start services, or modify databases.

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:81
Finding

Untrusted Specification Commands May Be Marked for Autonomous Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 81-145
Vulnerability Type: Command injection through generated verification instructions
Risk Level: High

Vulnerable Code

The following is an English translation of the relevant source directives:

markdown
- Automatable → mark as `[A]`, including an executable command and expected result.

When to use `[A]`:
1. HTTP requests — curl, wget, or any API call
2. Shell commands — grep, find, diff, cat, and file-existence checks
3. Build/compile — npm run build, tsc, cargo test
4. JSON/output comparison — inspect response structure and status codes
5. Process/port checks — ss, lsof, ps
markdown
Preparation items are used by sdd-start-human-verify for autonomous execution.

- `[AUTO]` — a one-time command that is executed directly and checked by exit code.
  Format: `- [ ] [AUTO] description: command`
- `[AUTO/SERVICE]` — a long-running service started in the background.

The default classification is `[AUTO]`.

The following categories are always `[AUTO]`:
- File and configuration checks
- Version and dependency checks
- Compilation and build commands
- Dependency installation — `npm install`, `pip install`, `apt-get install`
- Database migration and seed commands

Technical Analysis

The skill extracts commands and verification procedures from workspace-controlled spec-plan.md and spec-design.md files. It then places executable content into [A], [AUTO], or [AUTO/SERVICE] entries intended for autonomous execution by the downstream sdd-start-human-verify process.

The source specification documents therefore cross a trust boundary: content that should be treated as untrusted documentation can become executable shell instructions. The skill does not require an allowlist, shell-token validation, command argument validation, URL validation, package-source validation, privilege restrictions, or sandboxing. It ...[truncated 2236 chars]

Remediation
View remediation

Remediation Suggestions

  1. Treat every command extracted from specification documents as untrusted input.
  2. Do not automatically copy source-document commands into executable [AUTO] entries.
  3. Restrict autonomous checks to a narrowly defined allowlist of read-only commands and fixed argument patterns.
  4. Parse commands into argument arrays rather than passing strings to a shell.
  5. Reject shell metacharacters and execution features, including command substitution, pipes, redirection, background execution, chained commands, and environment-variable expansion.
  6. Prohibit autonomous use of download utilities, package installers, migration tools, privilege-changing commands, and arbitrary build hooks.
  7. Require separate, explicit approval for every command that writes files, modifies databases, installs software, starts a service, or accesses the network.
  8. Display the exact command, working directory, environment changes, destination host, and expected side effects before approval.
  9. Validate outbound URLs against an approved host and protocol list. Block redirects and private-network destinations unless explicitly required.
  10. Pin package names, versions, registries, and integrity hashes when dependency installation is unavoidable.
  11. Execute approved checks in an isolated sandbox with minimal filesystem access, no inherited secrets, restricted network access, resource limits, and a nonprivileged user.
  12. Add provenance metadata to each generated command and flag commands copied from specification files for manual security review.
  13. Make the safe default non-executable. Only commands generated from trusted, predefined verification templates should qualify for autonomous execution.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

The skill instructs generation of checklist steps that inspect .env for named variables, which encourages probing local secret-bearing configuration files during acceptance workflows. Even though the example uses grep -q and does not print values, directing an agent to access .env expands secret exposure surface and can normalize handling of sensitive configuration in less controlled future variants.

Content

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

md
- [ ] [AUTO] 编译后端: `cd key-portal/server && npx tsc`
- [ ] [AUTO/SERVICE] 启动后端服务: `cd key-portal/server && NODE_ENV=development node dist/index.js` (port: 3001)
- [ ] [AUTO/SERVICE] 启动前端开发服务器: `cd key-portal/web && npm run dev` (port: 5173)
- [ ] [AUTO] 检查 .env 包含必要变量: `grep -q 'NODE_ENV=development' .env && grep -q 'ADMIN_MIPS=' .env`
- [ ] [MANUAL] [手动准备项说明,无可执行命令]

### 测试数据准备

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

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

md
### 环境要求
- [ ] [AUTO] 检查 Node.js >= 18: `node -v`
- [ ] [AUTO] 编译后端: `cd key-portal/server && npx tsc`
- [ ] [AUTO/SERVICE] 启动后端服务: `cd key-portal/server && NODE_ENV=development node dist/index.js` (port: 3001)
- [ ] [AUTO/SERVICE] 启动前端开发服务器: `cd key-portal/web && npm run dev` (port: 5173)
- [ ] [AUTO] 检查 .env 包含必要变量: `grep -q 'NODE_ENV=development' .env && grep -q 'ADMIN_MIPS=' .env`
- [ ] [MANUAL] [手动准备项说明,无可执行命令]

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

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

md
- [ ] [AUTO] 编译后端: `cd key-portal/server && npx tsc`
- [ ] [AUTO/SERVICE] 启动后端服务: `cd key-portal/server && NODE_ENV=development node dist/index.js` (port: 3001)
- [ ] [AUTO/SERVICE] 启动前端开发服务器: `cd key-portal/web && npm run dev` (port: 5173)
- [ ] [AUTO] 检查 .env 包含必要变量: `grep -q 'NODE_ENV=development' .env && grep -q 'ADMIN_MIPS=' .env`
- [ ] [MANUAL] [手动准备项说明,无可执行命令]

### 测试数据准备

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

该规则明确要求“验收清单和所有用户-facing 信息用中文”,属于对输出语言的硬性限定。根据语言/区域策略,若未提供用户选择、opt-in 或明确的区域性正当理由,这类强制语言要求应视为自然语言策略违规。

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.