subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def has_self_test(fp): r = subprocess.run([sys.executable, fp, "self-test"], capture_output=True, text=True, timeout=30) return r.returncode == 0 and "PASS" in r.stdout- Confidence
- 98% confidence
- Finding
- The verifier executes an arbitrary product Python file (`fp`) with `self-test`, which runs untrusted code during verification. In a CI context this allows a malicious or compromised product under test to execute code on the runner, potentially stealing secrets, modifying workspace contents, or pivoting to other systems.
