Back to skill

Security audit

Disease Investigation Zhcn

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent PatSnap disease-research skill, but users should review it because setup places an API key in a persistent URL and the skill makes an automatic MCP connectivity call when loaded.

Install only if you are comfortable connecting Claude Code to PatSnap's remote MCP service. Prefer a safer authentication method if PatSnap and your client support it, use a narrowly scoped API key, avoid sharing MCP diagnostics or command history, and rotate any key that may have been copied into logs or configuration output.

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:29
Finding

API Key Exposed Through URL Query-String Configuration

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 29-38; the unsafe configuration pattern is repeated at lines 66-75
Vulnerability Type: API credential exposure through URL query parameters
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 credential-passing pattern appears again in the mandatory connectivity-check instructions:

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 place a PatSnap API key directly in the MCP endpoint's URL query string. HTTPS protects the URL while it is transmitted, but it does not prevent the complete URL from being exposed at either endpoint or through local configuration.

Query-string credentials can be retained in:

  • Shell command history
  • MCP client configuration files
  • Process arguments or diagnostic information
  • HTTP proxy and server access logs
  • Application telemetry and error reports
  • Screenshots, copied commands, or shared configuration output

Access to the PatSnap service is necessary for the Skill's declared pharmaceutical research functionality. However, placing the credential in the endpoint URL exceeds minimum safe credential exposure because a secret-specific mechanism, such as an authorization header or protected secret store, would provide better isolation.

The supplied value is only a placeholder and is not itself an active hardcoded credential. The vulnerability occurs when a user follows the documented procedure and substitutes a real API key.

Attack Path

  1. A user creates a valid PatSnap API key.
  2. The user substitutes the real key into the documented MCP command.
  3. The complete command and credential-bearing URL are retained in she ...[truncated 1257 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place API keys in endpoint URLs or query parameters.
  2. Configure authentication through an Authorization header or another credential header supported by both the MCP client and PatSnap, for example:
    text
    Authorization: Bearer ${PATSNAP_API_KEY}
    
  3. Load the key from a protected environment variable, operating-system credential manager, or MCP secret-management facility rather than embedding it directly in a command or configuration URL.
  4. Ensure configuration files containing credential references have restrictive filesystem permissions and are excluded from source control.
  5. Redact query parameters, authorization headers, and environment-variable values from application logs, proxy logs, telemetry, diagnostics, and error messages.
  6. Issue narrowly scoped keys with only the permissions required for pharmaceutical research operations. Apply expiration dates and usage limits where supported.
  7. Document key rotation and immediate revocation procedures for users who may have followed the existing instructions.
  8. Review shell histories, MCP configuration files, and relevant logs for previously exposed credentials. Rotate any key that may have been recorded.
  9. Run the fixed EGFR connectivity probe once during initial setup, once per session, or after a connection error rather than before every query, thereby minimizing unnecessary outbound requests.
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill is explicitly labeled 'zhcn' and the entire description/instructions are written to operate in Chinese, while no opt-in or alternative language behavior is provided. This creates a natural-language locale policy concern because the skill appears to force a specific language without documenting user choice or justified regional restriction.

Content

No source excerpt is available for this finding.