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 function executes an arbitrary Python file from the target product folder to probe for a `self-test` mode. Because the tool is intended to scan untrusted skills before installation, running the candidate skill code during verification defeats the security boundary and can trigger arbitrary code execution on the CI runner or analyst machine.
