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 harness executes every discovered Python file with a `self-test` argument to determine whether a self-test exists. Because the target folder is untrusted skill content, invoking those files directly causes arbitrary code execution during verification, which is dangerous in CI or local review environments.
