T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:34- Finding
Unpinned Remote Python Payload Is Downloaded and Subsequently Executed
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real local secret scanner, but it needs Review because its install docs run unpinned remote Python and its reports can reveal raw secrets in context lines.
Review before installing. Prefer running the bundled reviewed script instead of the curl command, or pin and verify any remote download. Do not publish CI logs, JSON, or SARIF output from this version unless you have confirmed context redaction is fixed; rotate any real credentials that may have appeared in generated reports. Limit scans to intended project paths and avoid running the auxiliary verifier on untrusted packages without sandboxing.
SKILL.md:34Unpinned Remote Python Payload Is Downloaded and Subsequently Executed
secret_scanner.py:665Secret-Bearing Source Lines Are Exposed in Terminal, JSON, and SARIF Reports
A second independent mismatch report indicates the skill executes compilation checks, self-tests, and deploy-readiness workflows while only performing a narrow hardcoded regex check rather than comprehensive secret detection. In a security-tool context, this is especially risky because teams may integrate it into CI expecting meaningful secret scanning coverage, leaving sensitive credentials undiscovered while arbitrary local code/tests may be executed.
A second independent mismatch report indicates the skill executes compilation checks, self-tests, and deploy-readiness workflows while only performing a narrow hardcoded regex check rather than comprehensive secret detection. In a security-tool context, this is especially risky because teams may integrate it into CI expecting meaningful secret scanning coverage, leaving sensitive credentials undiscovered while arbitrary local code/tests may be executed.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# ── GitHub ────────────────────────────────────────────────────────────
{
"id": "github-pat",
"name": "GitHub Personal Access Token",
"severity": "critical",
"regex": re.compile(r"(?:ghp|gho|ghu|ghs|ghf|ghr)_[A-Za-z0-9]{36,252}"),
},
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
d = tempfile.mkdtemp(prefix="ss_selftest_")
try:
# Check AWS key detection
p = os.path.join(d, "secrets.txt")
with open(p, "w", encoding="utf-8") as f:
f.write("# this is for testing\n")
f.write("aws_key=AKIAIOSFODNN7EXAMPLE\n")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
d = tempfile.mkdtemp(prefix="ss_selftest_")
try:
# Check AWS key detection
p = os.path.join(d, "secrets.txt")
with open(p, "w", encoding="utf-8") as f:
f.write("# this is for testing\n")
f.write("aws_key=AKIAIOSFODNN7EXAMPLE\n")
The skill advertises executable usage (python secret_scanner.py ..., curl -O ...) and the analyzer detected file read, file write, and shell capabilities, but the manifest declares no permissions or allowed-tools scope. That creates an under-specified trust boundary: an agent may run a skill with broader capabilities than a reviewer expects, increasing the chance of unintended command execution or filesystem access.
This helper executes arbitrary Python files found in the target product folder using python <file> self-test. In this verifier's context, the files being checked are untrusted skill contents, so verification triggers attacker-controlled code execution on the CI runner or analyst machine. The explicit subprocess call is not shell-injection vulnerable, but it is still a real arbitrary code execution sink.
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 code executes any test_*.py or *_test.py found in the target folder. In a skill marketplace or CI verification setting, those tests are attacker-supplied and can run arbitrary code, exfiltrate secrets, modify the workspace, or pivot within CI infrastructure. The skill context makes this more dangerous because the verifier is explicitly intended to inspect potentially untrusted submissions.
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)")
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
credentials, and private keys using regex patterns and Shannon entropy analysis.
Commands:
scan <file-or-dir> Recursively scan files/directories for secrets.
check <file> Deep-scan a single file with detailed context.
list-patterns List all supported detection patterns.
self-test Run built-in self tests.
This code performs a file write operation by creating or overwriting the user-specified SARIF output path. While the CLI help mentions an output file, there is no runtime confirmation or explicit user-facing disclosure at the point of write that the target file will be created or replaced.
No suspicious patterns detected.