T09 · Insecure Skill Coding Practices
- Location
scripts/xargs.py:3- Finding
Documented Execution Safety Controls Are Not Implemented
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is an xargs-style command runner, but it advertises safety and control options that the included script does not implement.
Review this before installing. Treat it as a very small command-execution wrapper, not a full xargs replacement. Do not rely on --dry-run, -p, -0, -P, -n, or delimiter options unless the implementation is fixed, and avoid using it with destructive commands or untrusted pipeline input.
scripts/xargs.py:3Documented Execution Safety Controls Are Not Implemented
scripts/xargs.py:3Empty Standard Input Still Triggers Command Execution
The code does perform command execution based on standard input and supports simple '{}' argument substitution, which partially matches the description. However, the declared purpose claims broader xargs-style capabilities including batch processing, parallel execution, and delimiter control, none of which are present in the supplied code. The code only processes newline-delimited input sequentially, one invocation per line. This is a material description-to-behavior mismatch because several prominently declared capabilities are absent.
The skill clearly documents shell-command execution behavior, but it declares no explicit tool scope or permissions boundary. In an agent environment, that omission can cause the skill to be invoked without clear execution constraints, increasing the risk of arbitrary or overly broad shell access.
The skill is designed to construct and execute arbitrary commands from stdin, but the description does not warn that untrusted or malformed input can directly affect command execution and system state. That omission is dangerous because it normalizes using the tool in pipelines where attacker-controlled filenames, arguments, or command targets may be passed into sensitive operations.
The documentation includes destructive examples like piping filenames into rm -f without any warning about irreversible data loss or the danger of untrusted input. In an agent or automation context, users may copy these patterns directly, leading to accidental mass deletion if input expansion or upstream command output is broader than expected.
This script directly builds and executes subprocess arguments from untrusted sources: the command template comes from argv and each stdin line is substituted into command arguments without validation or restrictions. Although it does not invoke a shell, it still enables arbitrary command execution and dangerous argument injection if the skill is exposed to attacker-controlled input, which is especially risky because the stated purpose of the skill is to execute generated command lines.
lines = sys.stdin.read().strip().split('\n')
cmd = sys.argv[1:]
for line in lines:
subprocess.run([c.replace('{}', line) for c in cmd])
The code executes external commands with no warning, confirmation, logging, or explanatory guardrails, which increases the chance that users or higher-level agents will trigger destructive operations unintentionally. In this skill context, silent execution is more dangerous because the tool is specifically designed to batch-process untrusted stdin into repeated subprocess invocations, amplifying the effect of mistakes or abuse.