T09 · Insecure Skill Coding Practices
- Location
ostrom_energy.py:293- Finding
Arbitrary Shell Command Execution Through Price-Control Actions
- Content
View full analysis
ON command", args.on_command, execute) action_taken = True if args.price_above is not None and price >= args.price_above: if args.off_command: run_cmd("Price is above threshold -> OFF command", args.off_command, execute) action_taken = True ``` ### Technical Analysis The values supplied through `--on-command` and `--off-command` are passed directly to `subprocess.run()` with `shell=True`. The shell consequently interprets metacharacters, command substitutions, pipelines, redirections, and chained commands contained in these arguments. Although execution requires the explicit `--execute` option and the Skill documents that command strings must be trusted, there is no technical restriction limiting ...[truncated 1577 chars]- Remediation
View remediation
