Back to skill

Security audit

Test-Driven Revolution

Security checks for vulnerabilities and agentic risk

Overview

This skill is an automated coding workflow, but it can run model- or review-provided shell commands on a recurring schedule without real sandboxing or strong user control.

Review carefully before installing. Do not enable the cron jobs or run the heartbeat on a workspace containing secrets or valuable files unless the executor is replaced with a real sandbox, task IDs and paths are strictly validated, review inputs are authenticated and schema-checked, and every generated command is approved or constrained to a safe allowlist.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (8)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/iron-heartbeat.js:202
Finding
Reviewer-Controlled Instructions Are Executed as Unrestricted Shell Code<![CDATA[ ## Vulnerability Details **File Location**: `scripts/iron-heartbeat.js:202-223` **Vulnerability Type**: Arbitrary command execution without an effective sandbox **Risk Level**: Critical ### Vulnerable Code ```javascript function executeInSandbox(instructions, task) { console.log('🏃 执行指令...'); const outputDir = path.join(OUTPUTS_DIR, task.task_id); if (!fs.existsSync(outputDir)) { fs.mkdirSync(outputDir, { recursive: true }); } logEvent('execution_started', { task_id: task.task_id, instructions_length: instructions.length }); try { // 方法 1: 直接执行(开发环境) // 生产环境应该使用 Docker 或 nsjail 沙箱 const output = execSync(instructions, { cwd: outputDir, encoding: 'utf8', stdio: 'pipe', timeout: 300000 // 5 分钟超时 }); ``` ### Technical Analysis `task.review.next_instructions` is passed directly to `child_process.execSync`. Node.js therefore invokes a system shell and interprets shell operators, substitutions, pipelines, redirections, and additional commands. Despite the function name `executeInSandbox`, the implementation has no process, filesystem, network, credential, or privilege isolation. Setting `cwd` only changes the initial working directory. Commands can still access absolute paths, traverse outside the output directory, read environment variables, contact external hosts, and modify any resource available to the heartbeat process. A timeout limits execution duration but does not reduce privileges or prevent destructive actions. ### Attack Path 1. An attacker supplies or influences a review object containing: ```json { "verdict": "approve", "next_instructions": "attacker-controlled shell commands" } ``` 2. `apply-review.js` stores the review and changes the task state to `reviewed`. 3. A scheduled or manually invoked `iron-heartbeat.js` identifies the reviewed task. 4. `executeTask()` passes `review.next_instructions` to `executeInSandbox()`. 5. `execSync()` ex ...[truncated 699 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove execution of free-form model-generated shell text. 2. Replace `next_instructions` with a typed action schema containing explicitly supported operations, commands, and arguments. 3. Invoke commands using `spawnSync(executable, args, { shell: false })`. 4. Enforce a deny-by-default executable and argument allowlist. 5. Require explicit human approval before network access, package installation, or operations outside the task output directory. 6. Execute tasks in an ephemeral container or namespace with: - A non-root UID. - No inherited secrets. - A read-only base filesystem. - A task-specific writable mount. - Disabled or tightly restricted networking. - CPU, memory, process, and time limits. 7. Canonicalize and validate every mounted or writable path. 8. Fail closed if isolation cannot be established. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/apply-review.js:81
Finding
Unauthenticated Review JSON Is Promoted Into Executable Task State<![CDATA[ ## Vulnerability Details **File Location**: `scripts/apply-review.js:81-159` **Vulnerability Type**: Missing provenance, authorization, and schema validation at a code-execution boundary **Risk Level**: Critical ### Vulnerable Code ```javascript if (args.includes('--file')) { const fileIndex = args.indexOf('--file'); const reviewFile = args[fileIndex + 1]; if (!reviewFile) { console.error('❌ 缺少文件名'); process.exit(1); } if (!fs.existsSync(reviewFile)) { console.error(`❌ 文件不存在:${reviewFile}`); process.exit(1); } try { review = JSON.parse(fs.readFileSync(reviewFile, 'utf8')); } catch (error) { console.error('❌ JSON 解析失败:', error.message); process.exit(1); } } else if (args.includes('--stdin')) { const input = fs.readFileSync(0, 'utf8'); try { review = JSON.parse(input); } catch (error) { console.error('❌ JSON 解析失败:', error.message); process.exit(1); } } else { const reviewJson = args.slice(1).join(' '); try { review = JSON.parse(reviewJson); } catch (error) { console.error('❌ JSON 解析失败:', error.message); process.exit(1); } } if (!review.verdict) { console.error('❌ 缺少 verdict 字段'); process.exit(1); } if (!['approve', 'revise', 'reject', 'complete'].includes(review.verdict)) { console.error(`❌ 无效的 verdict: ${review.verdict}`); process.exit(1); } const oldStatus = task.status; task.review = review; task.updated_at = new Date().toISOString(); if (review.verdict === 'complete') { task.status = 'completed'; task.completed_at = task.updated_at; } else if (review.verdict === 'reject') { task.current_iteration = (task.current_iteration || 0) + 1; if (task.current_iteration >= task.max_iterations) { task.status = 'failed'; } else { task.status = 'pending'; } } else { task.status = 'reviewed'; } ``` ### Technical Analysis Review content is accepted from an arbitrary file, standard input, or command-line text. The only substantive ...[truncated 1144 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Define and enforce a strict JSON Schema with bounds, required fields, and `additionalProperties: false`. - Do not permit a review response to contain shell code. - Store structured actions that are separately authorized and validated. - Bind each review to a task ID, task-content digest, nonce, reviewer identity, and expiration time. - Authenticate or cryptographically sign review results. - Require the task to be in the expected `reviewing` state. - Restrict review-file permissions and reject symlinks. - Add a human approval boundary before any operation with filesystem, network, or package-management effects. ]]>

T01 · Skill Instruction Hijacking

Error
Location
scripts/trigger-review.js:84
Finding
Untrusted Task Content Can Hijack the Reviewer Prompt<![CDATA[ ## Vulnerability Details **File Location**: `scripts/trigger-review.js:84-119` **Vulnerability Type**: Prompt injection and unrestricted reference-file request **Risk Level**: High ### Vulnerable Code ```javascript const prompt = `你是 Revolution 系统审阅员。请审阅以下任务的执行结果。 ## 任务信息 \`\`\`json ${JSON.stringify(task, null, 2)} \`\`\` ## 审阅要求 ### 1. 读取所有 reference_files,理解上下文 ### 2. 评估执行结果 - 是否达到 subtask 目标? - 代码质量如何? - 测试是否通过? ### 3. 判断 verdict - **approve**: 执行成功,继续下一个 subtask - **revise**: 需要修改,但不是致命错误 - **reject**: 执行完全错误,需要重新理解任务 - **complete**: 所有 subtasks 完成,任务可以结束 ### 4. 输出格式(严格 JSON,不要 markdown 包裹) { "verdict": "approve|revise|reject|complete", "confidence": 0.0-1.0, "feedback": "审阅意见", "next_instructions": "详细的下一步执行指令(如果 verdict=approve/revise)", "acceptance_criteria": ["验收标准 1", "验收标准 2"], "risk_flags": [], "technical_review": "技术选型审查说明" } 如果 verdict 是 revise/reject,请在 feedback 中说明需要修改什么。`; ``` ### Technical Analysis The complete task object is embedded verbatim in the model prompt. Fields such as the title, description, subtasks, history, and references can contain attacker-controlled natural-language instructions. There is no robust trust separation telling the model that task content is data and must never override system constraints. The prompt also directs the reviewer to read every path in `reference_files` without imposing a canonical workspace boundary. Because the requested model output contains `next_instructions`, and that field later becomes shell code, successful prompt injection can cross from untrusted text into local command execution. ### Attack Path 1. Put adversarial instructions in a task description, subtask, history field, or referenced file. 2. Set `reference_files` to sensitive or out-of-scope paths where the Agent environment permits file access. 3. Generate the reviewer prompt with `trigger-review.js`. 4. The reviewer follows injected task instructions and returns malicious or unsafe `next_instructio ...[truncated 407 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Treat every task property and referenced file as untrusted data. - Use structured model inputs rather than concatenating task data into instructions. - Explicitly prohibit task content from changing reviewer policy or tool permissions. - Validate `reference_files` against a canonical allowlisted workspace root. - Reject absolute paths, traversal components, device files, and symlinks escaping the workspace. - Give the reviewer read-only access to a minimal task snapshot rather than the host filesystem. - Never execute model output directly; require structured validation and approval after review. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/security-scan.js:10
Finding
Regex Blacklist Does Not Prevent Dangerous Shell Execution<![CDATA[ ## Vulnerability Details **File Location**: `scripts/security-scan.js:10-31` **Vulnerability Type**: Bypassable blacklist used as a command-execution security gate **Risk Level**: High ### Vulnerable Code ```javascript const DANGEROUS_PATTERNS = [ { pattern: /rm\s+-rf\s+\/\s*$/, reason: '删除根目录' }, { pattern: /rm\s+-rf\s+~\s*$/, reason: '删除用户主目录' }, { pattern: /rm\s+-rf\s+\/\*/, reason: '删除所有根目录文件' }, { pattern: /curl\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(curl | sh)' }, { pattern: /wget\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(wget | sh)' }, { pattern: /chmod\s+777/, reason: '设置全权限(chmod 777)' }, { pattern: /\bsudo\b/, reason: '提权操作(sudo)' }, { pattern: /dd\s+if=\/dev\/zero/, reason: '磁盘写入操作' }, { pattern: /:\(\)\s*\{\s*:\|:&\s*\}\s*;/, reason: 'Fork Bomb' }, { pattern: /\bmkfs\b/, reason: '格式化文件系统' }, { pattern: /\bfdisk\b/, reason: '磁盘分区操作' }, { pattern: /echo\s+[^>]+>\s+(\/etc|\/proc|\/sys)/, reason: '写入系统目录' }, { pattern: /rm\s+-rf\s+\*\s*$/, reason: '删除当前目录所有文件' }, { pattern: />\s*\/dev\/sd[a-z]/, reason: '直接写入磁盘设备' }, { pattern: /nc\s+-e\s+(ba)?sh/, reason: '反向 Shell' }, { pattern: /python\s+-c\s+['"].*socket/, reason: 'Python Socket 操作(可能为反向 Shell)' }, { pattern: /base64\s+-d\s*\|\s*(ba)?sh/, reason: 'Base64 解码执行' }, { pattern: /eval\s+\$/, reason: '动态执行变量内容' }, { pattern: /`\$[^`]+`/, reason: '命令替换执行变量' }, ]; ``` The declared allowlist is not enforced: ```javascript const ALLOWED_COMMANDS = [ 'node', 'npm', 'npx', 'python', 'python3', 'pip', 'pip3', 'bash', 'sh', 'zsh', 'echo', 'cat', 'ls', 'pwd', 'mkdir', 'cp', 'mv', 'grep', 'sed', 'awk', 'head', 'tail', 'wc', 'git', 'diff', 'patch', 'jq', 'node -e', ]; ``` ### Technical Analysis A finite regex blacklist cannot safely validate arbitrary shell programs. The scanner only recognizes specific textual forms. Equivalent behavior can be expressed through other interpreters, package lifecycle scripts, separate download and execution steps, alternat ...[truncated 1020 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Eliminate arbitrary shell-text execution rather than expanding the blacklist. - Define a structured, deny-by-default operation format. - Enforce an actual executable and argument allowlist. - Invoke approved programs without a shell. - Apply canonical path checks to all filesystem arguments. - Block network access by sandbox policy unless separately approved. - Run approved commands in an isolated, unprivileged environment with no host credentials. - Treat scanner failures and parser ambiguity as blocking conditions. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/heartbeat-coordinator.js:48
Finding
Task Identifiers Are Interpolated Into Shell Commands<![CDATA[ ## Vulnerability Details **File Location**: `scripts/heartbeat-coordinator.js:48-60, 194-197`; `scripts/iron-heartbeat.js:124-136, 271-275` **Vulnerability Type**: Shell command injection through unvalidated task identifiers **Risk Level**: High ### Vulnerable Code From `scripts/heartbeat-coordinator.js`: ```javascript function acquireLock(taskId) { try { execSync(`bash ${SCRIPTS_DIR}/atomic-lock.sh acquire ${taskId}`, { stdio: 'pipe' }); return true; } catch (error) { return false; } } function releaseLock(taskId) { try { execSync(`bash ${SCRIPTS_DIR}/atomic-lock.sh release ${taskId}`, { stdio: 'pipe' }); } catch (error) { console.error(`⚠️ 释放锁失败:${taskId}`, error.message); } } ``` ```javascript const output = execSync( `node ${SCRIPTS_DIR}/trigger-review.js ${task.task_id}`, { encoding: 'utf8' } ); ``` From `scripts/iron-heartbeat.js`: ```javascript function acquireLock(taskId) { try { execSync(`bash ${SCRIPTS_DIR}/atomic-lock.sh acquire ${taskId}`, { stdio: 'pipe' }); return true; } catch (error) { return false; } } function releaseLock(taskId) { try { execSync(`bash ${SCRIPTS_DIR}/atomic-lock.sh release ${taskId}`, { stdio: 'pipe' }); } catch (error) { console.error(`⚠️ 释放锁失败:${taskId}`, error.message); } } ``` ```javascript const securityCheck = execSync( `node ${SCRIPTS_DIR}/security-scan.js ${TASKS_DIR}/${task.task_id}.json`, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] } ); ``` ### Technical Analysis Task IDs are concatenated into command strings passed to `execSync`. No identifier format validation or shell escaping is performed. Task IDs originate from task filenames and JSON properties. If an attacker can create or alter a task file, shell metacharacters can be interpreted as additional commands when the recurring heartbeat processes the task. ### Attack Path 1. Place a crafted JSON task or filename in the task directory with shell syntax in its iden ...[truncated 492 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Enforce a strict task-ID format such as `^task-[0-9]{3,}$`. - Ensure the JSON `task_id` exactly matches the validated filename identifier. - Replace shell command strings with: ```javascript spawnSync('bash', [lockScript, 'acquire', taskId], { shell: false }); ``` - Resolve script and task paths canonically. - Reject identifiers containing separators, whitespace, control characters, or shell metacharacters. - Apply the same validation consistently in every script. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/force-unlock.sh:83
Finding
Recovery Script Arguments Are Injected Into Inline JavaScript<![CDATA[ ## Vulnerability Details **File Location**: `scripts/force-unlock.sh:83-116`; `scripts/unblock-task.sh:80, 106-141` **Vulnerability Type**: JavaScript source injection through task IDs and notes **Risk Level**: High ### Vulnerable Code From `scripts/force-unlock.sh`: ```bash note_escaped=$(echo "$note" | sed 's/"/\\"/g') node -e " const fs = require('fs'); const task = JSON.parse(fs.readFileSync('$task_file', 'utf8')); // 记录解锁前的状态 const oldStatus = task.status; // 状态回写到 pending(如果是 blocked 或 reviewing) if (['blocked', 'reviewing', 'executing'].includes(task.status)) { task.status = 'pending'; } // 增加迭代次数 task.current_iteration = (task.current_iteration || 0) + 1; // 记录到 history task.history = task.history || []; task.history.push({ timestamp: new Date().toISOString(), action: 'force_unlocked', previous_status: '$oldStatus', note: '$note_escaped', resolved_by: 'manual-force-unlock' }); task.resolved_at = new Date().toISOString(); task.resolved_note = '$note_escaped'; fs.writeFileSync('$task_file', JSON.stringify(task, null, 2)); console.log('✅ 任务状态已更新:' + oldStatus + ' → pending'); " ``` From `scripts/unblock-task.sh`: ```bash current_status=$(node -e "console.log(JSON.parse(require('fs').readFileSync('$task_file')).status)") ``` ```bash note_escaped=$(echo "$note" | sed 's/"/\\"/g') node -e " const fs = require('fs'); const task = JSON.parse(fs.readFileSync('$task_file', 'utf8')); const oldStatus = task.status; task.status = 'pending'; task.current_iteration = (task.current_iteration || 0) + 1; task.history = task.history || []; task.history.push({ timestamp: new Date().toISOString(), action: 'unblocked', previous_status: '$oldStatus', note: '$note_escaped', resolved_by: 'manual' }); task.resolved_at = new Date().toISOString(); task.resolved_note = '$note_escaped'; delete task.blocked_at; delete task.blocked_reason; fs.writeFileSync('$task_file', JSON.stringify(task, null, 2)); console.log('✅ 任务状态已更新:' + oldStatus ...[truncated 1218 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not construct source code using shell-variable interpolation. - Move recovery logic into a standalone JavaScript file. - Pass values as ordinary arguments and read them through `process.argv`. - Validate task IDs before constructing any path. - Serialize notes with `JSON.stringify` inside JavaScript. - Generate event-log records with a JSON serializer rather than shell string concatenation. - Implement real verification for `--verify`, and fail closed if verification cannot be completed. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/activate-queued-tasks.js:38
Finding
Unvalidated Task IDs Permit Path Traversal and Out-of-Scope JSON Mutation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/activate-queued-tasks.js:38-51` **Vulnerability Type**: Path traversal and unrestricted file write **Risk Level**: High ### Vulnerable Code ```javascript function readTask(taskId) { const taskFile = path.join(TASKS_DIR, `${taskId}.json`); if (!fs.existsSync(taskFile)) { return null; } return JSON.parse(fs.readFileSync(taskFile, 'utf8')); } /** * 写入任务文件 */ function writeTask(task) { const taskFile = path.join(TASKS_DIR, `${task.task_id}.json`); fs.writeFileSync(taskFile, JSON.stringify(task, null, 2)); } ``` Equivalent helpers appear in the coordinator, executor, review, and auditor scripts. ### Technical Analysis Neither `taskId` nor `task.task_id` is validated. `path.join()` normalizes traversal segments but does not ensure that the resulting path remains below `TASKS_DIR`. A value containing `../` can resolve outside the task directory. The write helper can consequently overwrite an accessible JSON file with serialized task data. Symlink handling is also not constrained. ### Attack Path 1. Introduce a task whose internal `task_id` or dependency identifier contains traversal components. 2. Cause a workflow component to call `readTask()` or `writeTask()`. 3. `path.join()` resolves the traversal-bearing path outside `TASKS_DIR`. 4. The process reads or overwrites the resulting JSON path. ### Impact Assessment The issue can expose or corrupt JSON data outside the intended task store. Scope is limited by operating-system permissions and the forced `.json` suffix, but may include configuration, state, or other project files accessible to the Agent account. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Validate identifiers against a strict, separator-free pattern. - Resolve the candidate path and verify it is a direct child of the canonical task directory. - Require the internal task ID to match the validated filename. - Use `lstat` and reject symlinks. - Open files with restrictive permissions. - Use atomic write-and-rename operations. - Centralize task-path construction in one validated helper used by every script. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/iron-heartbeat.js:175
Finding
Acceptance Verification and Post-Execution Audit Automatically Trust Successful Commands<![CDATA[ ## Vulnerability Details **File Location**: `scripts/iron-heartbeat.js:175-194`; `scripts/auditor-review.js:188-243` **Vulnerability Type**: Fail-open security and quality verification **Risk Level**: High ### Vulnerable Code From `scripts/iron-heartbeat.js`: ```javascript function verifyAcceptanceCriteria(criteria, task) { console.log('🔍 验证验收标准...'); const results = criteria.map(criterion => { // 简化的验证逻辑 - 实际应该根据具体标准执行检查 // 例如:检查文件是否存在、测试是否通过等 const passed = true; // 占位符 return { criterion, passed }; }); const allPassed = results.every(r => r.passed); console.log(`验收结果:${allPassed ? '✅ 通过' : '❌ 失败'}`); return { allPassed, results }; } ``` From `scripts/auditor-review.js`: ```javascript function simpleAudit(task) { const issues = []; if (!task.review || !task.review.next_instructions) { issues.push('缺少 review.next_instructions'); } const lastHistory = task.history && task.history[task.history.length - 1]; if (!lastHistory || lastHistory.action !== 'execution_completed') { issues.push('缺少执行记录'); } if (lastHistory && lastHistory.status === 'failed') { issues.push(`执行失败:${lastHistory.error}`); } if (task.review && task.review.acceptance_criteria) { // 简化:假设执行成功=验收通过 // 完整版本:应该实际运行测试验证 if (lastHistory && lastHistory.status === 'failed') { issues.push('验收标准未通过(执行失败)'); } } if (issues.length > 0) { return { verdict: 'fail', confidence: 0.9, feedback: `发现 ${issues.length} 个问题`, issues, next_action: issues.some(i => i.includes('执行失败')) ? 'return_to_reviewer' : 'block_for_human' }; } else { return { verdict: 'pass', confidence: 0.8, feedback: '审核通过,执行结果符合预期', issues: [], next_action: 'proceed_to_next' }; } } ``` ### Technical Analysis Every acceptance criterion is marked as passed unconditionally. The auditor then equates a successfu ...[truncated 1011 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Remove unconditional acceptance. - Convert each criterion into an independently executable, deterministic check. - Run project tests in a separate restricted environment. - Capture immutable evidence including command, exit status, output digest, changed files, and test report. - Compare filesystem changes against an approved manifest. - Scan generated code and dependencies before promotion. - Separate the executor identity from the verifier identity. - Fail closed when a criterion cannot be verified. - Require human review for security-sensitive tasks and any unexpected filesystem or network behavior. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (47)

Ae1

High
Category
analysis-evasion
Content
node scripts/auto-plan.js "更新 references 文档"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/auto-plan.js "更新 references 文档"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/auto-plan.js "更新 references 文档"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/auto-plan.js "更新 references 文档"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/auto-plan.js "更新 references 文档"
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Intent-Code Divergence

High
Confidence
99% confidence
Finding
The code explicitly claims to run task instructions "in a sandbox," but actually passes reviewer-controlled `next_instructions` directly to `execSync(...)` on the host. Any attacker who can influence task content can achieve arbitrary command execution with the privileges of this process, leading to full host compromise, data theft, or lateral movement.

Missing User Warnings

High
Confidence
99% confidence
Finding
`execSync(instructions, ...)` executes task/review-provided instructions as a shell command without warning, sanitization, or allowlisting. Because the instruction source is workflow data rather than trusted code, this is a direct command-injection/arbitrary-code-execution sink on the host environment.

External Script Fetching

High
Category
Supply Chain
Content
{ pattern: /rm\s+-rf\s+\/\s*$/, reason: '删除根目录' },
  { pattern: /rm\s+-rf\s+~\s*$/, reason: '删除用户主目录' },
  { pattern: /rm\s+-rf\s+\/\*/, reason: '删除所有根目录文件' },
  { pattern: /curl\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(curl | sh)' },
  { pattern: /wget\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(wget | sh)' },
  { pattern: /chmod\s+777/, reason: '设置全权限(chmod 777)' },
  { pattern: /\bsudo\b/, reason: '提权操作(sudo)' },
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
{ pattern: /rm\s+-rf\s+~\s*$/, reason: '删除用户主目录' },
  { pattern: /rm\s+-rf\s+\/\*/, reason: '删除所有根目录文件' },
  { pattern: /curl\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(curl | sh)' },
  { pattern: /wget\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(wget | sh)' },
  { pattern: /chmod\s+777/, reason: '设置全权限(chmod 777)' },
  { pattern: /\bsudo\b/, reason: '提权操作(sudo)' },
  { pattern: /dd\s+if=\/dev\/zero/, reason: '磁盘写入操作' },
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
{ pattern: /rm\s+-rf\s+\/\*/, reason: '删除所有根目录文件' },
  { pattern: /curl\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(curl | sh)' },
  { pattern: /wget\s+[^|]+\|\s*(ba)?sh/, reason: '远程代码执行(wget | sh)' },
  { pattern: /chmod\s+777/, reason: '设置全权限(chmod 777)' },
  { pattern: /\bsudo\b/, reason: '提权操作(sudo)' },
  { pattern: /dd\s+if=\/dev\/zero/, reason: '磁盘写入操作' },
  { pattern: /:\(\)\s*\{\s*:\|:&\s*\}\s*;/, reason: 'Fork Bomb' },
Confidence
90% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
console.log('用法:');
  console.log('  node security-scan.js <task-file.json>   # 扫描任务文件');
  console.log('  node security-scan.js --stdin            # 从 stdin 读取指令');
  console.log('  echo "rm -rf /" | node security-scan.js --stdin');
  console.log('');
  console.log('退出码:');
  console.log('  0 - 安全,无危险命令');
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
console.log('用法:');
  console.log('  node security-scan.js <task-file.json>   # 扫描任务文件');
  console.log('  node security-scan.js --stdin            # 从 stdin 读取指令');
  console.log('  echo "rm -rf /" | node security-scan.js --stdin');
  console.log('');
  console.log('退出码:');
  console.log('  0 - 安全,无危险命令');
Confidence
100% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
console.log('用法:');
  console.log('  node security-scan.js <task-file.json>   # 扫描任务文件');
  console.log('  node security-scan.js --stdin            # 从 stdin 读取指令');
  console.log('  echo "rm -rf /" | node security-scan.js --stdin');
  console.log('');
  console.log('退出码:');
  console.log('  0 - 安全,无危险命令');
Confidence
95% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
console.log('用法:');
  console.log('  node security-scan.js <task-file.json>   # 扫描任务文件');
  console.log('  node security-scan.js --stdin            # 从 stdin 读取指令');
  console.log('  echo "rm -rf /" | node security-scan.js --stdin');
  console.log('');
  console.log('退出码:');
  console.log('  0 - 安全,无危险命令');
Confidence
95% 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).

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The entire skill documentation, examples, warnings, and operational instructions are presented only in Chinese, with no indication that another language is supported or that the user can opt into this locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly justified, which is not present here.

Intent-Code Divergence

Medium
Confidence
82% confidence
Finding
At L021, the documentation states a clear intent boundary: TDR is not default behavior and should only trigger when the user says 'use TDR'. However, L049-L064 and L065-L080 describe recommended automatic planning and scheduled heartbeat execution, which operationalize autonomous workflow advancement beyond that stated trigger condition. This is an intent/documentation contradiction rather than mere incompleteness.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The file switches into Chinese at the main description header and continues in Chinese throughout the skill instructions. This imposes a specific language on users without any stated opt-in, alternative language option, or explanation that the skill is intended only for a Chinese-speaking or region-specific context.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
```bash
# 自动执行(按任务配置的 flow 字段)
node scripts/auto-execute.js task-001

# 手动指定流程
node scripts/auto-execute.js task-001 --flow full
Confidence
86% confidence
Finding
The skill documents an automatic execution path that runs tasks based on task configuration without an explicit per-run user approval gate. In the context of a code-writing and file-operating agent workflow, this can enable autonomous modification of files and execution of multi-step actions that the user may not have directly reviewed, increasing the risk of unsafe or unintended changes.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
node scripts/auto-execute.js task-001

# 手动指定流程
node scripts/auto-execute.js task-001 --flow full
```

---
Confidence
85% confidence
Finding
The manual `--flow full` invocation still describes a direct execution command for a task in a system designed to generate code, run tests, and perform file operations. Even though this is a CLI example, it normalizes autonomous task execution and could be used to bypass interactive review expectations, especially because the broader skill promotes iterative self-directed execution.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This JSON config uses Chinese-only role/model descriptions and behavior notes throughout, with no indication that users can opt into another language or that the skill is intentionally region-specific. That creates a natural-language locale policy concern because the configuration appears to impose a specific language by default.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The file-level description and usage text are written only in Chinese, and later user-facing status/error messages continue this enforced locale. For a general-purpose script, this is a natural-language locale policy issue because users are not given an English or configurable alternative, and the file does not state that the tool is intentionally limited to a Chinese-speaking environment.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script deletes a path derived directly from the user-supplied task_id using `rm -rf "$lock_dir"` without validating that the identifier is constrained to a safe format or that the resolved path remains under the intended tasks directory. An attacker who can supply crafted values such as path traversal segments could potentially cause deletion of arbitrary directories with a `.lock.d` suffix outside the expected scope, making this a real filesystem safety issue.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The code advertises a substantive audit of instruction adherence, code quality, test validity, and security, but the actual implementation only checks for the presence of task metadata and whether the last execution status was failed. Because it treats successful execution as a proxy for acceptance and performs no real validation of outputs, tests, or generated files, unsafe or incorrect results can be incorrectly approved and moved forward in the workflow.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The header comment describes this script as a 'fully automated' version that automatically calls Sonnet, creates tasks, and starts execution with no human intervention. In reality, planWithSonnet returns a manual handoff object and the main flow instructs the user to copy a prompt into another session and rerun the script, which directly contradicts the documented intent.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The planning prompt explicitly instructs the model to '使用中文描述', which forces a specific language choice. This is a natural-language locale policy issue because the script does not provide opt-in, fallback, or any documented justification that the skill is intended only for a Chinese-language environment.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.insecure_tls_verification

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/heartbeat-coordinator.js:50

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/iron-heartbeat.js:126

HTTPS certificate verification is disabled.

Warn
Code
suspicious.insecure_tls_verification
Location
scripts/unblock-task.sh:40