Back to skill

Security audit

cite-check

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims, but it automatically contacts arbitrary citation URLs and may send draft text to a configurable Ollama endpoint without enough safety controls or disclosure.

Install only if you are comfortable with the tool making outbound requests to every URL in a draft and with Phase 2 sending draft excerpts to the configured Ollama server. Avoid running it on untrusted drafts or confidential unpublished material in environments with access to internal services unless network egress is sandboxed or allowlisted.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
cite_check.py:37
Finding

Unrestricted Citation Fetching Enables Server-Side Request Forgery

Content
View full analysis
\"')\]]+", re.IGNORECASE) ``` `cite_check.py:91-110` requests the supplied URL and follows redirects without validating the destination: ```python def check_url(client: httpx.Client, url: str) -> Result: """Resolve a URL. HEAD first; fall back to GET when HEAD is unsupported. We distinguish 'resolved' (the URL is real, status < 400) from a login or paywall soft-200 only at a coarse level here; phase 2 handles content. """ try: r = client.head(url, follow_redirects=True, timeout=12) if r.status_code in (403, 405, 501) or r.status_code >= 500: # Many servers refuse HEAD; retry with a streamed GET (no full body). with client.stream("GET", url, follow_redirects=True, timeout=15) as g: code = g.status_code else: code = r.status_code except httpx.HTTPError as e: return Result("url", url, False, "DEAD", f"{type(e).__name__}: {e}") if code < 400: return Result("url", url, True, "OK", f"HTTP {code}") return Result("url", url, False, "DEAD", f"HTTP {code}") ``` `claim_check.py:161-185` performs a full GET and processes the response body: ```python url = claim.ref try: r = client.get(url, follow_redirects=True, timeout=25, headers={"User-Agent": cc.UA}) except httpx.HTTPError as e: return None, f"fetch failed: {type(e).__name__}" if r.status_code >= 400: return None, f"HTTP {r.status_code}" ctype = r.headers.get("content-type", "") if "pdf" in ctype or url.lower().endswith(".pdf"): try: import fitz # p ...[truncated 3519 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
claim_check.py:37
Finding

Potential Disclosure of Draft Content to an Unrestricted Ollama Endpoint

Content
View full analysis
str: r = httpx.post(f"{OLLAMA}/api/generate", json={"model": model, "prompt": prompt, "stream": False, "options": {"temperature": 0}}, timeout=timeout) r.raise_for_status() return r.json().get("response", "") ``` `claim_check.py:95` includes up to 8,000 characters of the draft in the transmitted prompt: ```python raw = _ollama_generate(EXTRACT_MODEL, EXTRACT_PROMPT.format(draft=text[:8000])) ``` ### Technical Analysis The default endpoint is loopback, which is consistent with use of a local Ollama service. However, the implementation does not enforce locality. `OLLAMA_HOST` may contain a remote HTTP or HTTPS origin, and the code sends up to 8,000 characters from the draft to that origin. Drafts are explicitly described as potentially containing notes, posts, emails, or unpublished research. They may therefore contain confidential business information, personal information, embargoed material, or other sensitive content. The endpoint accepts plain HTTP, so draft content may also be transmitted without transport encryption when a non-loopback HTTP address is configured. There is no warning, consent prompt, remote-host opt-in, hostname restriction, or redaction step. This is particularly significant because `claim_check.py` states that everything runs locally and that there is no external API. That is true only under the default endpoint con ...[truncated 1773 chars]
Remediation
View remediation
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 (10)

Tainted flow: 'OLLAMA' from os.environ.get (line 37, credential/environment) → httpx.post (network output)

Critical
Category
Data Flow
Confidence
93% confidence
Finding

The code sends the full draft-derived prompt to an Ollama endpoint whose base URL is fully controlled by the OLLAMA_HOST environment variable. If that variable is pointed at a remote or attacker-controlled service instead of a trusted local daemon, confidential draft content is exfiltrated off-host and the tool's 'everything runs locally' safety expectation is violated.

Content

Scanner excerpt · claim_check.py (reported line 82)May include surrounding context.

python
def _ollama_generate(model: str, prompt: str, timeout: int = 120) -> str:
    r = httpx.post(f"{OLLAMA}/api/generate",
                   json={"model": model, "prompt": prompt, "stream": False,
                         "options": {"temperature": 0}},
                   timeout=timeout)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior promises a comprehensive citation-verification gate, but the analysis indicates the implementation may skip some citations and only evaluate citation-bearing claims in phase 2. This mismatch is security-relevant because users may rely on the skill as a blocking control and publish content under a false assurance that all citations were checked.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README instructs users to run a tool that extracts URLs and arXiv IDs from drafts and performs live network requests, but it does not clearly warn that untrusted or confidential draft content can trigger outbound connections to third-party hosts. This creates a privacy and SSRF-style risk surface: internal-only URLs, tracking links, or sensitive references embedded in drafts may be contacted automatically from CI or agent environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The Phase 2 description says the tool decomposes draft text into claim/citation pairs and fetches remote source text, but it does not warn that draft claims may be processed alongside content retrieved from third parties. In agent or pipeline contexts, this can expose unpublished assertions and cause automated access to arbitrary external content, increasing confidentiality, compliance, and network exposure risks.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill explicitly instructs execution of Python scripts that perform network access and shell-invoked commands, but it does not declare any tool scope or permissions. In an agent environment, missing scope declarations can cause the skill to run with broader-than-expected capabilities, reducing containment and making network/file interactions less auditable.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation gives conflicting guidance on whether PARTLY and UNVERIFIABLE are hard failures, creating ambiguity in how operators integrate the skill into publish-blocking pipelines. That can lead to incorrect trust decisions, either letting unverified claims pass or unexpectedly blocking releases, depending on which statement users follow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Claim extraction transmits up to 8000 characters of the input draft to the model server, but the tool presents this as 'runs locally' without warning users that the destination is configurable and may be remote. In security terms this is a data-disclosure flaw: sensitive unpublished manuscript text may leave the machine unexpectedly, especially in CI or shared environments where environment variables are inherited.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The tool fetches arbitrary cited URLs over the network and follows redirects, which can leak user IP, CI runner identity, access patterns, and the existence/content timing of unpublished drafts to third-party sites. In this skill context that behavior is part of the feature, but without explicit disclosure and controls it still creates privacy and SSRF-style exposure when processing untrusted documents containing attacker-chosen URLs.

Content

No source excerpt is available for this finding.

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 · test_cite_check.py (reported line 54)May include surrounding context.

python
# --- CLI behaviour (offline) ---------------------------------------------

def test_cli_no_citations_exit_zero():
    r = subprocess.run([sys.executable, str(HERE / "cite_check.py")],
                       input="plain prose, nothing to check",
                       capture_output=True, text=True)
    assert r.returncode == 0

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 · test_cite_check.py (reported line 61)May include surrounding context.

python
def test_cli_strict_no_citations_exit_one():
    r = subprocess.run([sys.executable, str(HERE / "cite_check.py"), "--strict"],
                       input="plain prose", capture_output=True, text=True)
    assert r.returncode == 1