Back to skill

Security audit

Precision Oncology Zhcn

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent oncology research assistant, but its setup pattern exposes a PatSnap API key in command/configuration text and its broad triggers may send general cancer-related queries to a third-party MCP service.

Install only if you intend to use PatSnap's life-science MCP service for oncology research. Prefer a safer authentication method if PatSnap or your MCP client supports one, avoid pasting long-lived keys into shell commands, rotate any key already configured this way, and be aware that broad cancer-related prompts may be handled through the PatSnap service.

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
SKILL.md:35
Finding

API Key Exposed Through URL Query Parameter and Command-Line Argument

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 35–38
Vulnerability Type: API credential exposure through insecure configuration
Risk Level: Medium

Vulnerable Code

bash
claude mcp add --transport http pharma_intelligence \
  "https://connect.patsnap.com/096456/logic-mcp?apiKey=sk-xxxxxxxxxxxx"

The same insecure configuration pattern is repeated in the connection-failure guidance at lines 73–77:

bash
claude mcp add --transport http pharma_intelligence \
  "https://connect.patsnap.com/096456/logic-mcp?apiKey=你的API_KEY"

Technical Analysis

The setup instructions require the user to replace the placeholder with a real PatSnap API key and embed that key in a URL query parameter passed as a command-line argument.

Although the endpoint uses HTTPS, transport encryption does not prevent the credential from being exposed through:

  • Shell history containing the complete command.
  • Process inspection while the command is running.
  • MCP client configuration that may persist the complete endpoint.
  • Application, proxy, monitoring, or server logs that record complete URLs.
  • Diagnostic output, screenshots, terminal transcripts, or configuration backups.

URL query parameters are particularly unsuitable for secrets because URLs are routinely retained and logged by infrastructure. The behavior is necessary only insofar as the Skill requires authenticated access to PatSnap; placing the credential directly in the URL and command line exceeds the minimum exposure necessary for authentication.

No evidence indicates that the placeholder itself is a live secret or that the Skill intentionally sends credentials to an unrelated party. The risk arises when users follow the instructions with their real API keys.

Attack Path

  1. A user creates a valid PatSnap API key.
  2. The user substitutes the key into the documented URL.
  3. The user executes the claude mcp add command.
  4. The complete URL and API key are retained in shell histo ...[truncated 1089 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place API keys in URL query parameters.
  2. Configure the service to accept credentials through an Authorization header or another dedicated secret-bearing header.
  3. Provide the key through a protected environment variable, operating-system credential store, secret manager, or interactive secret prompt that does not echo or retain it.
  4. If the MCP client must persist authentication, store the credential separately from the endpoint in a permission-restricted secret store.
  5. Ensure clients, proxies, monitoring systems, and servers redact authorization material from logs and diagnostics.
  6. Document least-privilege key scopes, expiration, revocation, and rotation procedures.
  7. Warn users who followed the existing instructions to remove affected shell-history and configuration entries and rotate the exposed key.
  8. Replace both documented command examples with a secure configuration pattern so the failure-recovery instructions do not reintroduce the vulnerability.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill’s activation criteria are broad enough to match many general cancer, tumor, or treatment-related queries, which increases the chance of unintended invocation. Because this skill can steer the agent into a rigid workflow that prioritizes external MCP services and pre-query connectivity checks, accidental activation could expose user queries to third-party systems or alter handling of sensitive medical requests without clear user intent.

Content

No source excerpt is available for this finding.