T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:32- Finding
Unpinned Remote Python Payload Downloaded for Local Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The bundled CLI is simple and mostly offline, but its install instructions tell users to download and run mutable remote Python code without pinning or verification.
Install from the reviewed bundled file instead of using the curl command, or require an immutable commit URL plus checksum/signature verification before running it. Avoid running the included verification harness on untrusted directories outside a sandbox.
SKILL.md:32Unpinned Remote Python Payload Downloaded for Local Execution
ci/ci_check.py:14Deployment Verification Silently Passes After Checking the Wrong Directory
This helper executes arbitrary Python files from the target product directory as part of verification (python <file> self-test). In a CI or reviewer context, an untrusted product author can place malicious code in any discovered .py file and have it executed automatically, leading to arbitrary code execution, data exfiltration, or CI compromise.
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
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
all_ok &= axis(False, "frontmatter (no SKILL.md)")
all_ok &= axis(False, "docs (no SKILL.md)")
# 3 compiles
comp_ok = all(subprocess.run([sys.executable, "-m", "py_compile", fp],
capture_output=True).returncode == 0 for fp in files)
all_ok &= axis(comp_ok, "compiles (py_compile all .py)")
# 4 self-test (any of 3 valid forms)
This logic executes any test_*.py or *_test.py file found in the target folder. In the context of a product verifier for potentially adversarial submissions, that means attacker-supplied test files run automatically in the verifier/CI environment, enabling arbitrary code execution and possible theft of tokens, workspace tampering, or lateral movement.
tests = [os.path.join(folder, f) for f in os.listdir(folder)
if (f.startswith("test_") or f.endswith("_test.py")) and f.endswith(".py")]
if tests:
st_ok = all(subprocess.run([sys.executable, t], capture_output=True, text=True,
timeout=30).returncode == 0 for t in tests)
st_note = f"{len(tests)} test_*.py"
elif re.search(r"(?im)^test\s*:", skill_txt):
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 7 deploy-ready
ci = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ci_check.py")
if os.path.isfile(ci) and os.path.isfile(skill):
r = subprocess.run([sys.executable, ci], cwd=folder, capture_output=True, text=True)
all_ok &= axis(r.returncode == 0, "deploy-ready (ci/ci_check.py PASS)")
else:
all_ok &= axis(True, "deploy-ready (skipped)")