subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
existing_pp = env.get("PYTHONPATH", "") env["PYTHONPATH"] = os.pathsep.join([skill_root, existing_pp]) if existing_pp else skill_root try: result = subprocess.run( [sys.executable, str(runner), "--help"], capture_output=True, text=True,- Confidence
- 89% confidence
- Finding
- The diagnostic executes a discovered sibling script (sn_agent_runner.py) with the current process environment copied through, which may include API keys and other sensitive variables. Because the path is derived from environment and filesystem layout rather than a trusted allowlist or integrity check, a malicious or trojanized sibling skill could run attacker-controlled code and exfiltrate secrets during a seemingly harmless health check.
