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
- This harness executes arbitrary Python files in the target product directory by running each candidate tool with a `self-test` argument. In a CI or verification context, that means untrusted repository code is executed before trust is established, enabling arbitrary code execution on the verifier host and potential CI compromise.
