Back to skill

Security audit

Paper review pro

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its paper-review purpose, but it needs Review because it can automatically read an OpenClaw gateway token and send it with paper content to a configurable LLM endpoint.

Install only if you are comfortable with a paper-review tool that makes outbound calls to arXiv, Semantic Scholar, OpenClaw Gateway, and possibly Dashscope, and that writes results under ~/.openclaw/paper-review-pro. Before using LLM features, avoid setting OPENCLAW_GATEWAY_URL to an untrusted host, prefer a local or trusted HTTPS endpoint, use a dedicated limited token, and use --no-llm for confidential, unpublished, or proprietary paper content.

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

Warning
Location
scripts/core/expansion.py:22
Finding

Gateway bearer token and research data can be transmitted to an untrusted configurable endpoint in query expansion

Content
View full analysis
str: try: url = f"{GATEWAY_URL.rstrip('/')}/v1/chat/completions" payload = { "model": "dashscope/qwen3.5-plus", "messages": [ { "role": "system", "content": "你是一个专业的学术搜索助手。你的任务是根据用户提供的原始查询和相关论文,生成 3-5 个语义相关的扩展搜索词。扩展词应该是:\n1. 与原查询相关但角度不同\n2. 具体、可搜索的学术术语\n3. 能够发现更多相关文献\n\n只返回扩展词列表,每行一个,格式:扩展词 | 置信度 (0.5-1.0)" }, { "role": "user", "content": prompt } ], "temperature": 0.5, "max_tokens": 300 } data = json.dumps(payload).encode("utf-8") headers = {"Content-Type": "application/json"} if GATEWAY_TOKEN: headers["Authorization"] = f"Bearer {GATEWAY_TOKEN}" req = urllib.request.Request(url, data=data, headers=headers, method="POST") with urllib.request.urlopen(req, timeout=30) as response: result = json.loads(response.read().decode("utf-8")) ``` ### Technical Analysis The gateway URL is taken from the `OPENCLAW_GATEWAY_URL` environment variable without validating its scheme, hostnam ...[truncated 2452 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/core/summarizer.py:18
Finding

Gateway bearer token and complete paper metadata can be transmitted to an untrusted configurable endpoint in summarization

Content
View full analysis
str: try: url = f"{GATEWAY_URL.rstrip('/')}/v1/chat/completions" payload = { "model": "dashscope/qwen3.5-plus", "messages": [ { "role": "system", "content": "你是一个专业的学术论文分析助手。请根据用户提供的论文信息,生成简洁、准确的中文摘要。" }, { "role": "user", "content": prompt } ], "temperature": 0.3, "max_tokens": 500 } data = json.dumps(payload).encode("utf-8") headers = {"Content-Type": "application/json"} if GATEWAY_TOKEN: headers["Authorization"] = f"Bearer {GATEWAY_TOKEN}" req = urllib.request.Request(url, data=data, headers=headers, method="POST") with urllib.request.urlopen(req, timeout=30) as response: result = json.loads(response.read().decode("utf-8")) ``` The transmitted prompt is constructed as follows in `scripts/core/summarizer.py:260-278`: ```python prompt = f"""请分析以下学术论文并生成结构化中文摘要: **论文标题**: {title} **作者**: {authors} **原文摘要**: {abstract} 请按照以下格式输出(每部分 1-2 句话): 研究问题:[这篇论文要解决什么问题?] 方法:[使用了什 ...[truncated 2454 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (44)

Tainted flow: 'req' from os.environ.get (line 120, credential/environment) → urllib.request.urlopen (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/core/expansion.py (reported line 75)May include surrounding context.

python
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
        
        with urllib.request.urlopen(req, timeout=30) as response:
            result = json.loads(response.read().decode("utf-8"))
            return result.get("choices", [{}])[0].get("message", {}).get("content", "")

Tainted flow: 'req' from os.environ.get (line 120, credential/environment) → urllib.request.urlopen (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/core/expansion.py (reported line 130)May include surrounding context.

python
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
        
        with urllib.request.urlopen(req, timeout=30) as response:
            result = json.loads(response.read().decode("utf-8"))
            return result.get("choices", [{}])[0].get("message", {}).get("content", "")

Tainted flow: 'req' from os.environ.get (line 118, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The Gateway request target is derived from the OPENCLAW_GATEWAY_URL environment variable and is used directly in urllib.request.urlopen. If an attacker can influence the runtime environment, they can redirect paper titles, authors, abstracts, and the optional bearer token to an attacker-controlled endpoint, causing SSRF-style outbound access and sensitive data exfiltration. The default use of plain HTTP for localhost also increases the risk of token or content exposure if the endpoint is not strictly local or traffic is intercepted.

Content

Scanner excerpt · scripts/core/summarizer.py (reported line 71)May include surrounding context.

python
req = urllib.request.Request(url, data=data, headers=headers, method="POST")
        
        with urllib.request.urlopen(req, timeout=30) as response:
            result = json.loads(response.read().decode("utf-8"))
            return result.get("choices", [{}])[0].get("message", {}).get("content", "")

Tainted flow: 'req' from os.environ.get (line 118, credential/environment) → urllib.request.urlopen (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/core/summarizer.py (reported line 128)May include surrounding context.

python
method="POST"
        )
        
        with urllib.request.urlopen(req, timeout=30) as response:
            result = json.loads(response.read().decode("utf-8"))
            return result.get("output", {}).get("text", "")

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented arXiv webpage scraping fallback introduces additional undeclared behavior and attack surface beyond simple API usage, including scraping remote content and handling large responses. Hidden or underemphasized scraping/network behaviors matter because they can create compliance, reliability, and data-handling risks that users did not clearly authorize.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented arXiv webpage scraping fallback introduces additional undeclared behavior and attack surface beyond simple API usage, including scraping remote content and handling large responses. Hidden or underemphasized scraping/network behaviors matter because they can create compliance, reliability, and data-handling risks that users did not clearly authorize.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documented arXiv webpage scraping fallback introduces additional undeclared behavior and attack surface beyond simple API usage, including scraping remote content and handling large responses. Hidden or underemphasized scraping/network behaviors matter because they can create compliance, reliability, and data-handling risks that users did not clearly authorize.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The documented arXiv webpage scraping fallback introduces additional undeclared behavior and attack surface beyond simple API usage, including scraping remote content and handling large responses. Hidden or underemphasized scraping/network behaviors matter because they can create compliance, reliability, and data-handling risks that users did not clearly authorize.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

The documented arXiv webpage scraping fallback introduces additional undeclared behavior and attack surface beyond simple API usage, including scraping remote content and handling large responses. Hidden or underemphasized scraping/network behaviors matter because they can create compliance, reliability, and data-handling risks that users did not clearly authorize.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
85% confidence
Finding

The skill metadata does not declare any tool scope or permissions, yet the documentation clearly describes capabilities involving network access, local file reads/writes, and likely access to local configuration/token material. Undeclared capabilities reduce transparency and informed consent, making it easier for a user or platform to enable a skill without understanding that it can access network and filesystem resources.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest description and top-level documentation are written in Chinese, and the skill presents itself as a general paper-review tool rather than a China-only or Chinese-only regional skill. That creates a language/locale constraint without user opt-in or a documented justification, which matches the policy-violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The note says the author format assumes English names with surname first, and that Chinese names may require manual adjustment. This is a language/locale-related constraint presented as a default behavior, but the document does not offer an opt-in choice or a more inclusive handling path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file presents all operational guidance and warnings solely in Chinese, beginning with the title and continuing throughout the document. Under the policy rule, forcing a specific language without offering a user language/locale choice or documenting a justified locale restriction is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation describes LLM-based summarization and query expansion using an external cloud API and a local gateway, but it does not clearly warn users that paper titles, abstracts, and user queries are transmitted to those services. This creates a real data disclosure risk because users may unknowingly send unpublished research topics, sensitive search interests, or proprietary corpus metadata to third-party infrastructure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all user-facing instructions and operational details only in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not stated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language docstrings and CLI help text exclusively in Chinese, which effectively forces a single language for users interacting with the skill. The policy forbids language or locale constraints unless the skill offers a choice or clearly documents a justified region-specific limitation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill is described as a paper retrieval/review system with query expansion and summarization features, but this module additionally probes the user's home directory for a local OpenClaw configuration file and extracts an authentication token from it. Reading local credential material is a separate capability from expanding academic queries and is not declared in the manifest description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The embedded natural-language instructions to the LLM are written entirely in Chinese, and the CLI prints user-facing status messages in Chinese as well. This imposes a specific language/locale without any opt-in mechanism or documented regional justification, which matches the language policy violation criteria.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module sends user queries and up to 600 characters of paper abstracts to external LLM services for query expansion, but there is no explicit notice or consent mechanism. This creates a real data-governance and privacy risk because research topics, unpublished abstracts, or proprietary corpus content may be transmitted to third-party providers without the user's awareness.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This code constructs a request to the Semantic Scholar API using user- or dataset-supplied DOI values, causing external transmission of paper metadata to a third party. In a paper-review skill, such lookups can expose what papers a user is investigating, including potentially confidential or pre-publication material, making this a real privacy/data-governance issue rather than a code-execution flaw.

Content

Scanner excerpt · scripts/core/publication_status.py (reported line 679)May include surrounding context.

python
# 构建查询 URL(优先级:DOI > arXiv ID)
    api_url = None
    if doi:
        api_url = f"https://api.semanticscholar.org/graph/v1/paper/DOI:{doi}"
    elif arxiv_id:
        api_url = f"https://api.semanticscholar.org/graph/v1/paper/ARXIV:{arxiv_id}"

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This branch similarly sends arXiv-derived identifiers to the Semantic Scholar API, creating an external data flow based on user-provided paper URLs. Although the destination is a legitimate academic service, the transmission still reveals user research activity and may be inappropriate in environments handling confidential reviews or internal literature analysis.

Content

Scanner excerpt · scripts/core/publication_status.py (reported line 681)May include surrounding context.

python
if doi:
        api_url = f"https://api.semanticscholar.org/graph/v1/paper/DOI:{doi}"
    elif arxiv_id:
        api_url = f"https://api.semanticscholar.org/graph/v1/paper/ARXIV:{arxiv_id}"
    
    if not api_url:
        return None

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

When use_api=True, the module may send paper identifiers such as DOI or arXiv ID to Semantic Scholar without any built-in notice, consent flow, or privacy control. Even though the transmitted data is research metadata rather than credentials, it can still disclose user interests, unpublished work under review, or institution-sensitive topics to a third party.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstrings and all generated report section headings are hardcoded in Chinese, which implies the skill produces output in a single language regardless of user preference. The file does not indicate that Chinese is optional, configurable, or restricted to a justified locale-specific use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Natural-language strings in the module, including the module description and generated markdown section headers, are fixed to Chinese. This can violate language/locale policy when no opt-in, fallback, or justification is provided for forcing a specific language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The system prompt explicitly instructs the model to generate a Chinese summary, and the public summarize() docstring also states it generates Chinese summaries. This is a natural-language locale constraint with no user opt-in, alternative language option, or documented region-specific justification.

Content

No source excerpt is available for this finding.