skill-factory
The skill uses undeclared shell execution, hardcoded suspicious paths, and remote npx code fetching without version pinning or integrity checks, with a doc-to-code mismatch on permissions.
为什么得出这个结论
2/4 个维度触发发现 4 项声明之外的能力或越权行为。
当前没有明显的高危外联或执行信号。
报告包含 5 步攻击链,另有 3 项高危或严重发现。
发现 1 项需要关注的依赖或供应链线索。
攻击链
初始入口 · SKILL.md:1
权限提升 · scripts/factory.js:161
supply_chain · scripts/factory.js:170
权限提升 · scripts/factory.js:163
权限提升 · scripts/factory.js:53
风险分是怎么被拉高的
SKILL.md does not declare subprocess/child_process usage
npx clawhub@latest fetches and executes unversioned remote code without integrity check
References /opt/homebrew/lib/node_modules/.../package_skill.py — a planted or platform-specific path not declared anywhere
Inferred filesystem:WRITE and network:READ not reflected in SKILL.md documentation
Skill writes to skills/public/<slug>/ with user-controlled slug from arbitrary description input
最关键的证据
Undeclared shell command execution via execSync
The script uses child_process.execSync to run arbitrary shell commands (python3 and npx) without declaring shell execution capability in SKILL.md. This is the highest-value doc-to-code mismatch signal.
scripts/factory.js:161 Suspicious hardcoded path referencing /opt/homebrew/
A hardcoded absolute path /opt/homebrew/lib/node_modules/openclaw/skills/skill-creator/scripts/package_skill.py is used. This path pattern (/opt/homebrew) suggests macOS Homebrew targeting and is not declared in SKILL.md. It could be a planted backdoor path or a platform-specific dependency that may not exist.
scripts/factory.js:163 Remote code execution via npx @latest without version pinning
The publish function runs 'npx clawhub@latest publish' which fetches and executes remote npm code without a pinned version or hash verification. This is equivalent to curl|bash for the npm ecosystem — a critical supply chain risk.
scripts/factory.js:170 SKILL.md does not declare any allowed-tools or capability permissions
The SKILL.md frontmatter is missing allowed-tools declarations. The code uses filesystem:WRITE, shell:WRITE, and network:READ+EXECUTE, but SKILL.md declares none of these. This is a clear doc-to-code mismatch.
SKILL.md:1 Arbitrary slug creation from user input could lead to path traversal
The slugify() function converts a user-provided description into a directory name without sanitization for path traversal. While slugify removes non-alphanumeric chars, a crafted input like '../../../etc/cron.d' could write outside the intended skills/public/ directory.
scripts/factory.js:53 No dependency pinning — zero stdlib-only constraint in package metadata
SKILL.md states the factory 'uses the LLM as the engine' but does not declare npm/node dependencies. The script uses only Node.js stdlib (fs, path, child_process), which is good, but no package.json or requirements.txt exists to lock the environment.
scripts/factory.js:1 声明能力 vs 实际能力
scripts/factory.js:122 fs.mkdirSync(...); scripts/factory.js:130 fs.writeFileSync(...) scripts/factory.js:170 execSync('npx clawhub@latest publish...'); scripts/factory.js:163 execSync('python3 /opt/homebrew/...') scripts/factory.js:161 execSync('python3 ...'); scripts/factory.js:170 execSync('npx clawhub@latest ...') scripts/factory.js:14 process.env.WORKSPACE; scripts/factory.js:15 process.env.CLAWHUB_TOKEN implied by npx login 可疑产物与外联
没有提取到明显 IOC。
依赖与供应链
| 包名 | 版本 | 来源 | 漏洞 | 备注 |
|---|---|---|---|---|
| npx (clawhub@latest) | * (unpinned) | npm remote | 否 | Remote code execution — no version pinning, no hash verification |
| python3 skill-creator | unpinned | /opt/homebrew/lib/node_modules/openclaw/... | 否 | Hardcoded path, not declared, platform-specific |
文件构成
scripts/factory.js SKILL.md