subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
cmd = [python_path] + script_args try: result = subprocess.run(cmd, check=False) return result.returncode except Exception as e: print(f"错误: 执行脚本失败: {e}")- Confidence
- 94% confidence
- Finding
- The script exposes a generic wrapper that will execute any Python script path and arguments provided on the command line via subprocess.run([sys.executable] + script_args). Although shell injection is not present because shell=True is not used, this still creates an arbitrary code-execution capability within the skill helper, which exceeds the stated APM-only purpose and could be abused if an agent or user can influence the arguments.
