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
- 97% confidence
- Finding
- The harness executes an arbitrary Python file discovered in the target folder via `python <file> self-test`. Because the folder being verified is untrusted input, a malicious product can place code in any `.py` file and gain code execution during CI or local verification, which can leak secrets or tamper with the runner. The fact that this skill is supposed to be JSON tooling makes this behavior less justified and more suspicious.
