T09 · Insecure Skill Coding Practices
- Location
scripts/rotate.js:25- Finding
OS Command Injection in Image Rotation Wrapper
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This image-processing skill has a coherent purpose, but its executable wrappers build shell commands from unvalidated user input, creating a real arbitrary-command-execution risk.
Install only after the wrappers are hardened to avoid shell execution, validate numeric options, restrict input and output paths, and define non-overwrite behavior. Until then, do not process untrusted filenames or parameters; use a disposable workspace, explicit output directories, backups, and pinned installer versions.
scripts/rotate.js:25OS Command Injection in Image Rotation Wrapper
scripts/resize.js:24OS Command Injection in Image Resize Wrapper
scripts/translate.js:24OS Command Injection in Image Translation Wrapper
scripts/skeleton.js:24OS Command Injection in Image Skeletonization Wrapper
Most instructional content, examples, and the "对 AI 这样说" section are presented only in Chinese, with no indication that other languages are supported or that Chinese is a justified locale constraint. This can violate a language/locale policy when a skill effectively requires one language without user opt-in.
The README advertises bulk image processing and output generation but does not clearly warn that files may be created, overwritten, or modified at scale. In a skill context, missing disclosure around write behavior can lead to destructive or unexpected filesystem changes, especially during batch operations on large photo sets.
The README instructs users to run npx skills add without pinning a specific version or commit, which can cause installation of whatever package/version is current at execution time. This creates a supply-chain risk because a compromised or changed upstream package could alter behavior or execute unintended code during installation.
The local installation example still uses npx skills add without pinning the skills tool version, so the same supply-chain exposure remains even if the skill path is local. An unpinned installer can change over time or be replaced upstream, leading to unexpected code execution in the user's environment.
The example trigger phrases are broad natural-language requests such as 'batch process these images' and 'rotate all product images 90 degrees,' which can overlap with ordinary user instructions. In an agent environment, this increases the chance of accidental skill invocation and unintended file operations without the user explicitly selecting the skill.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
The batch workflow examples create directories, write output files, and explicitly delete temporary files (Remove-Item $temp) without a prominent warning about overwrite and deletion behavior. In an agent-driven context, users may authorize broad file operations without realizing the examples can clobber existing outputs or remove files matching unexpected names, leading to data loss or destructive actions in the wrong directory.
The natural-language instructions, examples, and invocation phrases are entirely in Chinese, including the suggested user prompts, which can impose a language-specific usage pattern without opt-in. Under SQP-3, forcing a specific language or locale without user choice is a policy concern unless the constraint is explicitly documented and justified.
Detected: suspicious.dangerous_exec