Skill Trust Decision

polish

代码审查技能存在 Phase 1 命令注入风险和文档-权限声明不符:声称移除 allowed-tools 但仍可执行任意 shell 命令,review mode 下 agent 可能越权访问文件系统。

Install decision first Source: ClawHub Scanned: 1 day ago
Files 10
Artifacts 5
Violations 4
Findings 4
Most direct threat evidence
High RCE
Phase 1 命令执行未受限

技能执行 CLAUDE.md 中声明的验证命令(lint/typecheck),攻击者可通过 PR 修改 CLAUDE.md 注入恶意命令(如 curl|bash 管道),在 CI 环境中可造成 RCE。

SKILL.md:42

Why this conclusion was reached

2/4 dimensions flagged
Block
Declared vs actual capability

4 undeclared or violating capabilities were inferred.

Review
Hidden execution and egress

5 lower-risk artifacts were extracted and still need context.

Block
Attack chain and severe findings

The report includes 0 attack-chain steps and 1 severe findings.

Review
Dependencies and supply chain hygiene

Dependency information is incomplete, so supply-chain confidence stays limited.

What drove the risk score up

Phase 1 命令注入风险 +20

执行 CLAUDE.md 中的验证命令无法限制恶意代码执行(如 'curl|bash' 链)

文档-权限声明不符 +15

CHANGELOG 声称移除 allowed-tools 但 skill 实际仍拥有 shell:WRITE 全权

Agent 隔离不足 +10

并行 agent 可读取代码库中的敏感信息(密钥、token)

Most important evidence

High RCE

Phase 1 命令执行未受限

技能执行 CLAUDE.md 中声明的验证命令(lint/typecheck),攻击者可通过 PR 修改 CLAUDE.md 注入恶意命令(如 curl|bash 管道),在 CI 环境中可造成 RCE。

SKILL.md:42
添加 Phase 1 命令白名单,限制可执行的命令模式(如 pnpm check, npm run lint),禁止管道和多命令执行
Medium Doc Mismatch

CHANGELOG 声称移除 allowed-tools 但实际无限制

CHANGELOG 2.6.2 记录移除了 allowed-tools 字段,声称 'It existed only to keep that block from prompting',但 SKILL.md 全文未声明任何 allowed-tools 限制,模型可执行任意 shell 命令。

CHANGELOG.md:62
在 SKILL.md 明确声明技能所需的权限范围和禁止的操作
Medium Credential Theft

Agent 可读取代码库中的敏感信息

Phase 3 并行启动的 4 个 agent 需要读取 diff 和代码文件,若代码库包含 .env、AWS 凭证、API keys 等敏感信息,agent 可能无意中处理这些数据。

SKILL.md:85
在 agent 提示词中添加明确的敏感信息处理规则,禁止在 findings 中暴露凭证值
Low Priv Escalation

Fix mode 可修改用户代码库

Fix mode 在 Phase 6 执行代码修复,若误用于外部 PR 可能造成未授权代码修改。虽然 review mode 设计了保护,但用户可能混淆模式选择。

SKILL.md:10
增强模式选择的明确性,外部 PR 默认 review mode 并禁止覆盖

Declared capability vs actual capability

Filesystem Block
Declared NONE
Inferred WRITE
SKILL.md:0 - 无 allowed-tools 声明但 Phase 6 执行文件写入
Shell Block
Declared NONE
Inferred WRITE
SKILL.md:Phase 1 - 执行 CLAUDE.md 中的任意命令
Network Block
Declared NONE
Inferred READ
SKILL.md:Setup - 使用 gh 与 GitHub API 交互
Skill Invoke Block
Declared NONE
Inferred ADMIN
SKILL.md:Phase 3 - 并行启动 4 个子 agent

Suspicious artifacts and egress

Medium External URL
https://keepachangelog.com/en/2.0.0/

CHANGELOG.md:5

Medium External URL
https://semver.org/spec/v2.0.0.html

CHANGELOG.md:6

Medium External URL
https://www.apache.org/licenses/

LICENSE.txt:3

Medium External URL
https://clawhub.ai/user/tenequm

skill-card.md:9

Medium External URL
https://clawhub.ai/tenequm/skills/code-polish

skill-card.md:35

Dependencies and supply chain

There are no structured dependency warnings.

File composition

10 files · 1195 lines
Shell 5 files · 487 linesMarkdown 3 files · 474 linesText 1 files · 162 linesJSON 1 files · 72 lines
Files of concern · 4
SKILL.md Markdown · 283 lines
Phase 1 命令执行未受限 · Agent 可读取代码库中的敏感信息 · Fix mode 可修改用户代码库
LICENSE.txt Text · 162 lines
https://www.apache.org/licenses/
CHANGELOG.md Markdown · 136 lines
CHANGELOG 声称移除 allowed-tools 但实际无限制 · https://keepachangelog.com/en/2.0.0/ · https://semver.org/spec/v2.0.0.html
skill-card.md Markdown · 55 lines
https://clawhub.ai/user/tenequm · https://clawhub.ai/tenequm/skills/code-polish
Other files · evals.json · setup.sh · setup.sh · setup.sh · setup.sh · setup.sh

Security positives

设计了 review mode 保护机制(外部 PR 不可编辑)
Phase 4 验证 findings 防止误报
Phase 5 需要用户批准才执行修复
diff 被标记为 untrusted data,agent 不会直接执行其中指令
包含丰富的安全相关 CHANGELOG 记录
evals 覆盖多种攻击场景