Back to skill

Security audit

Skill Security Scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill is a security scanner, but its own scanner can run unintended shell commands, fetch and unpack remote archives unsafely, and incorrectly mark some skills as safe.

Review before installing. Use it only in a disposable or sandboxed environment, avoid scanning untrusted remote URLs with this version, do not pass attacker-controlled target strings to the Node entrypoint, and do not rely on its safe scores without independent review.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
index.js:6
Finding

Shell Command Injection Through Unsanitized CLI Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/scan.sh:326
Finding

Unsafe Extraction of Remotely Retrieved Archives

Content
View full analysis
/dev/null [ -f "$TARGET_DIR/s.zip" ] && unzip -q "$TARGET_DIR/s.zip" -d "$TARGET_DIR" && rm -f "$TARGET_DIR/s.zip" ``` ### Technical Analysis Remote-scan mode downloads an archive from a third-party Convex endpoint and immediately extracts it with `unzip`. The implementation does not validate: - Archive entry paths before extraction. - Absolute paths or `..` traversal components. - Symlink entries and symlink-based write targets. - Expanded archive size or file count. - Archive integrity, signature, or checksum. - Whether the resolved download source is an approved and authenticated ClawHub service. Although the retrieved source files are scanned rather than directly executed by this branch, archive extraction itself performs filesystem writes. A malicious or compromised archive may exploit extractor behavior to write outside the temporary directory or exhaust disk and processing resources. The third-party endpoint also creates a supply-chain boundary that is not documented or authenticated beyond HTTPS. ### Attack Path 1. An attacker publishes a malicious Skill archive or compromises the remote download service. 2. A user scans the corresponding ClawHub URL. 3. The scanner retrieves the attacker-controlled ZIP from the external endpoint. 4. The archive contains traversal paths, absolute paths, malicious symlinks, an excessive number of files, or highly compressed content. 5. `unzip` extracts the archive without pre-validation. 6. Depending on archive contents and extractor behavior, files may be written outside the ...[truncated 776 chars]
Remediation
View remediation

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/scan.sh:451
Finding

Prepopulated and Regex-Based Whitelist Allows Complete Scan Bypass

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
node/scanner.js:105
Finding

Incomplete Scan Coverage Produces False-Safe Security Verdicts

Content
View full analysis
{ try { const entries = await fs.readdir(dir, { withFileTypes: true }); for (const entry of entries) { const fullPath = path.join(dir, entry.name); if (entry.isDirectory() && !entry.name.startsWith('.')) { await scanDir(fullPath); } else if (entry.name.endsWith('.js')) { filesScanned++; const issues = await this.scanFile(fullPath); allIssues.push(...issues); } } } catch (e) {} }; ``` The shell implementation similarly limits traversal to four extensions: ```bash for f in $(find "$TARGET_DIR" \( -name "*.js" -o -name "*.ts" -o -name "*.py" -o -name "*.sh" \) -type f 2>/dev/null); do scan_file "$f" done ``` ### Technical Analysis The Node.js scanner only inspects `.js` files, despite the project documentation describing JavaScript, TypeScript, Python, and Shell support. The shell implementation scans those four extensions but excludes instruction and configuration files such as `SKILL.md`, Markdown documents, JSON, YAML, and other agent-readable text. This omission is especially significant because the scanner implements prompt-injection regular expressions while failing to inspect `SKILL.md`, the primary location for Skill instructions. An attacker can place instruction-hijacking content in an unscanned Markdown file or place executable/configuration payloads in unsupported extensions. Read errors are also silently ignored, so inaccessible files do not produce a failed or incomplete verdict. ### Attack Path 1. An attacker places malicious instructions in `SKILL.md`, or a payload in an unsupported file type. 2. The scanner recursively walks the Skill ...[truncated 934 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/scan.sh:438
Finding

Whitespace-Unsafe File Enumeration Allows Payloads to Evade Scanning

Content
View full analysis
/dev/null); do scan_file "$f" done ``` ### Technical Analysis The output of `find` is captured through command substitution and then expanded unquoted in a shell `for` loop. Bash performs word splitting and pathname expansion on the resulting text. Consequently, filenames containing spaces, tabs, newlines, wildcard characters, or other shell-significant characters are not preserved as single path values. A supported source file such as `malicious payload.js` may be split into separate nonexistent paths. `scan_file` silently returns when the reconstructed path does not identify a file. This creates a direct evasion technique against the scanner's extension-based checks. ### Attack Path 1. An attacker stores malicious code in a supported file type whose filename contains whitespace or another splitting-sensitive character. 2. `find` prints the complete filename. 3. Command substitution removes record boundaries and Bash splits the output into multiple words. 4. The loop invokes `scan_file` with incorrect path fragments. 5. The file-existence check fails for those fragments and the malicious file is omitted. 6. The scanner reports a result that does not account for the hidden payload. 7. The payload may later be loaded or executed through another file or runtime mechanism. ### Impact Assessment The issue permits reliable omission of attacker-selected supported files from static analysis. Its direct impact is a false-negative scan result rather than immediate code execution. If the omitted file is subsequently invoked, the effective impact can include arbitrary behavior with the Skill runtime's privileges. The scope is limited to sca ...[truncated 106 chars]
Remediation
View remediation
/dev/null ) ``` Additional measures: 1. Quote every path passed to shell commands. 2. Avoid parsing filenames through line-oriented text operations. 3. Test filenames containing spaces, tabs, newlines, glob characters, leading dashes, and Unicode. 4. Report skipped or unreadable files instead of silently returning. 5. Apply archive-entry filename validation before remote content reaches traversal logic. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (46)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger guidance is extremely broad, using generic security-related keywords like '检测/扫描/安全/风险/恶意代码/危险' that are common in ordinary conversation. This can cause the skill to activate unintentionally, potentially leading the agent to run scans or process URLs/paths when the user was only asking a general question, increasing the chance of unintended tool use or confusing control flow.

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 84)May include surrounding context.

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
[执行 ./scripts/scan.sh https://clawhub.ai/AphobiaCat/aibtc]

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

Scanner excerpt · references/dangerous-commands.md (reported line 7)May include surrounding context.

md
| 命令 | 风险描述 | 检测文件 |
|------|----------|----------|
| `rm -rf /` | 根目录删除,毁灭性操作 | .sh, .bash |
| `rm -rf ~` | 用户主目录删除,丢失所有数据 | .sh, .bash |
| `rm -rf $HOME` | 同上,使用环境变量 | .sh, .bash |
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |

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 · references/dangerous-commands.md (reported line 7)May include surrounding context.

md
| 命令 | 风险描述 | 检测文件 |
|------|----------|----------|
| `rm -rf /` | 根目录删除,毁灭性操作 | .sh, .bash |
| `rm -rf ~` | 用户主目录删除,丢失所有数据 | .sh, .bash |
| `rm -rf $HOME` | 同上,使用环境变量 | .sh, .bash |
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |

Tool Parameter Abuse

High
Category
Tool Misuse
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).

Content

Scanner excerpt · references/dangerous-commands.md (reported line 8)May include surrounding context.

md
| 命令 | 风险描述 | 检测文件 |
|------|----------|----------|
| `rm -rf /` | 根目录删除,毁灭性操作 | .sh, .bash |
| `rm -rf ~` | 用户主目录删除,丢失所有数据 | .sh, .bash |
| `rm -rf $HOME` | 同上,使用环境变量 | .sh, .bash |
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |
| `wget -O- \| sh` | 远程脚本执行,完全不可控 | .sh, .bash |

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 · references/dangerous-commands.md (reported line 10)May include surrounding context.

md
| `rm -rf /` | 根目录删除,毁灭性操作 | .sh, .bash |
| `rm -rf ~` | 用户主目录删除,丢失所有数据 | .sh, .bash |
| `rm -rf $HOME` | 同上,使用环境变量 | .sh, .bash |
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |
| `wget -O- \| sh` | 远程脚本执行,完全不可控 | .sh, .bash |
| `curl https://... \| sh` | 同上 | .sh, .bash |
| `wget https://... \| bash` | 同上 | .sh, .bash |

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 · references/dangerous-commands.md (reported line 11)May include surrounding context.

md
| `rm -rf ~` | 用户主目录删除,丢失所有数据 | .sh, .bash |
| `rm -rf $HOME` | 同上,使用环境变量 | .sh, .bash |
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |
| `wget -O- \| sh` | 远程脚本执行,完全不可控 | .sh, .bash |
| `curl https://... \| sh` | 同上 | .sh, .bash |
| `wget https://... \| bash` | 同上 | .sh, .bash |
| `passwd` | 修改用户密码 | .sh, .py, .js |

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 · references/dangerous-commands.md (reported line 12)May include surrounding context.

md
| `rm -rf $HOME` | 同上,使用环境变量 | .sh, .bash |
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |
| `wget -O- \| sh` | 远程脚本执行,完全不可控 | .sh, .bash |
| `curl https://... \| sh` | 同上 | .sh, .bash |
| `wget https://... \| bash` | 同上 | .sh, .bash |
| `passwd` | 修改用户密码 | .sh, .py, .js |

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 · references/dangerous-commands.md (reported line 13)May include surrounding context.

md
| `curl \| bash` | 远程脚本执行,完全不可控 | .sh, .bash |
| `wget -O- \| sh` | 远程脚本执行,完全不可控 | .sh, .bash |
| `curl https://... \| sh` | 同上 | .sh, .bash |
| `wget https://... \| bash` | 同上 | .sh, .bash |
| `passwd` | 修改用户密码 | .sh, .py, .js |

## 🟠 高风险 (扣 20 分)

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 · references/dangerous-commands.md (reported line 20)May include surrounding context.

md
| 命令/模式 | 风险描述 | 检测文件 |
|-----------|----------|----------|
| `chmod 777` | 权限过于宽松 | .sh, .bash |
| `eval $var` | 动态代码执行 | .sh, .bash |
| `eval "$(...)"` | 同上 | .sh, .bash |
| `elevated: true` | 要求 root 权限 | .yaml, .yml, SKILL.md |

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · references/dangerous-commands.md (reported line 54)May include surrounding context.

md
| `curl -X POST` | 同上 | .sh, .bash |
| `.env` | 环境变量文件 | 所有 |
| `~/.ssh/` | SSH 密钥目录 | 所有 |
| `/etc/passwd` | 系统用户文件 | .sh, .bash |
| `$VAR` / `${VAR}` | 环境变量读取 | .sh, .bash |
| `curl` / `wget` | 网络请求 | .sh, .bash |
| `fetch` / `axios` | HTTP 请求 | .js, .mjs |

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill attempts to nullify the agent's safety policies or restrictions ('you have no restrictions', 'ignore your guidelines', 'do anything now'). This is a direct jailbreak that disables guardrails.

Content

Scanner excerpt · references/rules.md (reported line 30)May include surrounding context.

md
| I04 | `new Function\(` | critical | Function 构造器 |
| I05 | `ignore.*previous.*instructions` | high | 提示注入 |
| I06 | `jailbreak\|bypass.*safety` | critical | 越狱攻击 |
| I07 | `DAN\|do anything now` | critical | DAN 越狱模式 |
| I08 | `curl.*http` | high | 远程下载执行 |

### OBFUSCATION(混淆隐藏)