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 every discovered product Python file with a `self-test` argument, which runs arbitrary untrusted code from the target folder during verification. In a CI context, a malicious skill author can place harmful code in module top-level or in the self-test path to achieve code execution on the runner and access secrets, workspace contents, or network resources.
