subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
env = os.environ.copy() if "NODE_PATH" not in env: try: npm_global = subprocess.run( "npm root -g", capture_output=True, text=True, timeout=10, shell=True,- Confidence
- 84% confidence
- Finding
- This call uses shell=True to execute "npm root -g", which introduces avoidable command-execution risk and makes behavior depend on the calling environment's shell and PATH. In a skill intended for automation, inheriting a hostile or manipulated environment can cause execution of an attacker-controlled npm binary or shell behavior.
