Back to skill

Security audit

md-to-twitter

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report unsafe rendering and side effects during dry runs, alongside network-posting and tool-scope concerns.

Treat this as a review-required skill and weigh the unsafe rendering and dry-run side effects before installing. The scanners inspected both listed components, but analysis was marked partial because several referenced paths were missing; the clean AIG result and the ok statuses do not make the evidence complete.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (7)

Tainted flow: 'headers' from os.environ.get (line 429, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/md2twitter.py (reported line 432)May include surrounding context.

python
headers = {"Authorization": oauth_header("POST", url, creds)}
    mime = MIME.get(path.suffix.lower()) or mimetypes.guess_type(path.name)[0] or "image/png"
    with path.open("rb") as fh:
        resp = requests.post(
            url, headers=headers, timeout=120,
            files={"media": (path.name, fh, mime)},
            data={"media_category": "tweet_image"},

Tainted flow: 'headers' from os.environ.get (line 457, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/md2twitter.py (reported line 461)May include surrounding context.

python
"Authorization": oauth_header("POST", url, creds),
        "Content-Type": "application/json",
    }
    resp = requests.post(url, headers=headers, json=payload, timeout=60)
    if resp.status_code >= 300:
        raise RuntimeError(f"post failed ({resp.status_code}): {resp.text[:300]}")
    body = resp.json()

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
98% confidence
Finding

The renderer embeds unsanitized Markdown-derived HTML into a local page and opens it in Chromium with its sandbox explicitly disabled. A malicious table can contain active content or remote resources, causing unauthorized network access during conversion; disabling the sandbox also increases the consequences of a browser exploit.

Content

Scanner excerpt · scripts/md2twitter.py (reported line 221)May include surrounding context.

python
src = out.with_name(f".{out.stem}.src.html")
    shot = out.with_name(f".{out.stem}.shot.png")
    src.write_text(_block_page(str(tag), kind), encoding="utf-8")
    subprocess.run(
        ["chromium", "--headless", "--no-sandbox", "--disable-gpu",
         "--hide-scrollbars", "--force-device-scale-factor=2",
         f"--window-size={width},4000", f"--screenshot={shot}",

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/md2twitter.py (reported line 229)May include surrounding context.

python
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
        timeout=120, check=True,
    )
    subprocess.run(
        ["magick", str(shot), "-trim", "+repage",
         "-bordercolor", "white", "-border", "12", str(out)],
        stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/md2twitter.py (reported line 461)May include surrounding context.

python
"Authorization": oauth_header("POST", url, creds),
        "Content-Type": "application/json",
    }
    resp = requests.post(url, headers=headers, json=payload, timeout=60)
    if resp.status_code >= 300:
        raise RuntimeError(f"post failed ({resp.status_code}): {resp.text[:300]}")
    body = resp.json()

The dry-run mode promises to touch nothing but creates and overwrites files before checking the flag.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The dry-run check occurs after directory creation, conversion, optional browser rendering, and thread-file writing, despite promising to touch nothing. A preview can therefore overwrite existing files or execute the HTML renderer, including its potential network side effects, before returning without posting.

Content

No source excerpt is available for this finding.