Back to skill

Security audit

arXiv XHS Daily

Security checks for vulnerabilities and agentic risk

Overview

This skill is not covertly malicious, but it can publish unattended social posts from untrusted arXiv data using a logged-in Xiaohongshu MCP setup.

Install only if you are comfortable with a skill that can post to Xiaohongshu through your local mcporter configuration. Use dry-run and inspect drafts before publishing, avoid the provided cron --publish pattern unless you add review and HTTPS/content-validation safeguards, and ensure MCPORTER_CONFIG_PATH points only to the intended account configuration.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/arxiv_client.py:9
Finding

Plaintext arXiv API Request Allows Metadata Tampering Before Publication

Content
View full analysis
list[dict[str, Any]]: params = urllib.parse.urlencode( { "search_query": f"cat:{category}", "start": start, "max_results": max_results, "sortBy": "submittedDate", "sortOrder": "descending", } ) url = f"{ARXIV_API}?{params}" with urllib.request.urlopen(url, timeout=60) as response: payload = response.read() root = ET.fromstring(payload) ``` ### Technical Analysis The arXiv API endpoint is configured with an `http://` URL. Consequently, the initial request is not protected by TLS. Even if the server normally redirects clients to HTTPS, an attacker positioned on the network can intercept the original HTTP request and return an arbitrary response or malicious redirect before a secure connection is established. The returned Atom document is parsed without validating its origin, transport security, content type, or maximum response size. Paper titles, abstracts, identifiers, authors, and categories from this response subsequently influence keyword matching and are incorporated into generated notes and Xiaohongshu post content. The retrieved material is treated as data rather than executable code, so this does not provide direct local code execution. Nevertheless, it creates a content-integrity vulnerability in a workflow capable of publishing externally supplied information. ### Attack Path 1. A user runs `scripts/run_daily.py` on a network controlled or observable by an attacker. 2. The Skill sends a plaintext HTTP request to `export.arxiv.org`. 3. The attacker intercepts th ...[truncated 1220 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documentation instructs users to run a publishing workflow involving mcporter, local configuration, environment variables, and prior login state, yet the skill manifest does not clearly declare or constrain those sensitive execution paths. In context, the dangerous part is not the description mismatch itself but the undeclared subprocess/external-service interaction, which can lead to unexpected command execution or misuse of authenticated local publishing context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The documentation instructs users to run a publishing workflow involving mcporter, local configuration, environment variables, and prior login state, yet the skill manifest does not clearly declare or constrain those sensitive execution paths. In context, the dangerous part is not the description mismatch itself but the undeclared subprocess/external-service interaction, which can lead to unexpected command execution or misuse of authenticated local publishing context.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The documentation instructs users to run a publishing workflow involving mcporter, local configuration, environment variables, and prior login state, yet the skill manifest does not clearly declare or constrain those sensitive execution paths. In context, the dangerous part is not the description mismatch itself but the undeclared subprocess/external-service interaction, which can lead to unexpected command execution or misuse of authenticated local publishing context.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises a workflow that reads, writes, uses network access, shell execution, and environment-based configuration, but it does not declare any explicit tool scope or allowed-tools boundary in the skill manifest. That creates an over-privileged and under-specified execution model where downstream agents may grant broader access than necessary, increasing the risk of unintended file modification, external calls, or subprocess abuse.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The value arXiv日报 hard-codes Chinese output in the generated post title prefix. For a general topic configuration, this appears to impose a specific language/locale choice without offering user opt-in or documenting a region-specific justification, which matches the locale-policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The footer text explicitly states "Designed for Xiaohongshu · Daily Research Notes," which signals a platform/locale-specific output style in a user-facing string without offering any user choice or documenting that the skill is region-specific. This can violate language/locale policy requirements when the skill is otherwise presented as a general cover-image generator.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code performs several file writes and, when publish=True, sends generated content through publish_content, but there is no confirmation prompt, print/log disclosure, or explanatory docstring/comment in this file describing those actions. These are user-impacting operations that can modify local data and trigger external publication without visible disclosure here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The helper methods return Chinese-language narrative strings directly, which forces a specific language in generated content. There is no opt-in, configuration, or documented justification for this locale restriction, so it appears to violate the language-choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Multiple generated strings are hardcoded in Chinese, including note content and social post text, with no indication that the language is configurable or intentionally limited to a Chinese-only context. This can violate language/locale policy when users are not offered an opt-in or alternative language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The argument parser description says the pipeline runs from arXiv to Xiaohongshu, which signals a fixed language/locale/platform target in user-facing natural language. The file does not offer any user choice or document a justified region-specific constraint, which may violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The method directly performs a publishing action to Xiaohongshu through mcporter with no confirmation, dry-run mode, or explicit user acknowledgment at the point of execution. In the context of an automation skill that reads papers and optionally posts social content, this increases the chance of unintended publication, reputational harm, accidental disclosure, or spam if upstream inputs are wrong or manipulated.

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 · scripts/xhs_client.py (reported line 26)May include surrounding context.

python
def _run(self, expr: str, timeout_ms: int = 180000) -> str:
        command = ["mcporter", "call", "--config", self.config_path, "--timeout", str(timeout_ms), expr]
        completed = subprocess.run(command, capture_output=True, text=True)
        if completed.returncode != 0:
            raise RuntimeError(
                f"mcporter call failed: expr={expr}\nstdout={completed.stdout.strip()}\nstderr={completed.stderr.strip()}"

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

This code file makes a network call to an external service using urllib.request.urlopen, which transmits query data derived from the category parameter. There is no confirmation prompt, logging, print statement, or explanatory comment/docstring in this file disclosing that external network access occurs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The helper functions create directories and write JSON/text content to arbitrary paths via path.write_text, which can modify user files. In this file there is no confirmation prompt, logging, print statement, docstring, or comment disclosing that these operations write to disk.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.