T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:32- Finding
Unpinned Remote Python Payload Download and Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The log analyzer itself is local and purpose-aligned, but its documentation tells users to download executable Python from an unpinned GitHub branch and it ships an auxiliary verifier that can execute files from target folders.
Install only from the reviewed package copy or a pinned, verified release. Avoid the documented raw-GitHub main-branch curl command unless you independently trust the current upstream file. Do not run ci/verify_product.py on third-party or untrusted folders outside a disposable sandbox with no secrets or network access.
SKILL.md:32Unpinned Remote Python Payload Download and Execution
ci/verify_product.py:34Verification Harness Executes Untrusted Product Files Without Isolation
The verifier silently executes discovered Python files for self-test without warning the user. In a workflow meant to evaluate third-party or untrusted products, this lack of disclosure increases the chance that analysts or CI systems will unknowingly execute hostile code.
This function executes an arbitrary Python file from the target product directory as part of verification. In this repository context, the verifier is explicitly intended to inspect untrusted skills, so running their code during analysis can trigger arbitrary code execution on the CI runner or analyst workstation.
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)
Test files are executed automatically with no explicit user-facing notice that verification will run untrusted code. This is dangerous because users may assume the tool is performing passive analysis when it is actually executing attacker-controlled scripts from the scanned product.
This code executes discovered test_*.py files from the product directory as subprocesses. Because skills/products are potentially adversarial input, a malicious test file can run arbitrary commands, exfiltrate CI secrets, or alter the environment under the guise of verification.
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)")
The script invokes ci_check.py with cwd set to the product folder, which is subprocess execution affecting the local environment. While this is part of CI-oriented behavior, the file lacks a specific warning that verification will execute an additional helper script against the target folder.