subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
print("-" * 50) try: result = subprocess.run( cmd, shell=True, cwd=str(luban_cli_path.parent) if luban_cli_path.exists() else ".",- Confidence
- 99% confidence
- Finding
- The gen() method builds a shell command string using the user-controllable luban_cmd and output_dir values, then executes it with subprocess.run(..., shell=True). In an agent skill context, this enables command injection or arbitrary command execution if an attacker can influence arguments, which is especially dangerous because the skill is explicitly designed to be invoked automatically for configuration-editing requests.
