os.system() or os exec-family call
High
- Category
- Dangerous Code Execution
- Content
interactive_path = skill_dir / "interactive.py" if interactive_path.exists(): os.system(f"python {interactive_path}") else: print("❌ 交互式模块不存在") return- Confidence
- 97% confidence
- Finding
- The code launches a separate script through a shell using os.system(f"python {interactive_path}"). Although interactive_path is derived from the local skill directory, invoking a shell is unnecessary and unsafe because shell execution inherits environment/path ambiguity and can execute an attacker-controlled python binary if PATH is manipulated. In an agent/skill context, spawning an uncontrolled subprocess increases the attack surface beyond the stated document-generation purpose.
