Back to skill

Security audit

disease-investigation-zhcn

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for Chinese-language PatSnap disease research, but its setup asks users to place an API key directly in a URL, which deserves review before installation.

Install only if you are comfortable connecting Claude Code to PatSnap’s external MCP service and storing a PatSnap API key in the MCP configuration. Use a least-privileged, revocable key, avoid sharing command logs or screenshots, and rotate the key if it was pasted into shell history or exposed in diagnostics.

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

API Credential Exposed Through URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 40–42 and 77–81
Vulnerability Type: API credential exposure through URL-based authentication
Risk Level: Medium

Vulnerable Code

Lines 40–42:

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

Lines 77–81:

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

Technical Analysis

The setup instructions require users to place a PatSnap API key directly in the query string of an MCP endpoint URL. Although the endpoint uses HTTPS, transport encryption does not protect the credential from disclosure through local command history, MCP configuration files, process diagnostics, copied commands, screenshots, telemetry, proxy logs, or server access logs that retain complete URLs.

The example does not contain an active hardcoded credential, but it instructs users to substitute a real credential into an insecure location. Query parameters are generally unsuitable for secrets because infrastructure and diagnostic systems commonly record request URLs.

Connecting to PatSnap is consistent with the Skill's declared life-science research functionality. However, exposing the credential through the URL exceeds the minimum credential-disclosure scope necessary to authenticate if a protected authorization header, secret store, environment reference, or secure prompt is available.

Attack Path

  1. A user creates a valid PatSnap API key.
  2. The user substitutes that key into the documented MCP endpoint and executes the command.
  3. The complete URL is retained in shell history, MCP configuration, diagnostic output, telemetry, or network infrastructure logs.
  4. An attacker or unauthorized local user gains read access to one of those records.
  5. The attacker extracts the apiKey query parame ...[truncated 949 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace query-string authentication with an Authorization header or another header-based mechanism supported by the PatSnap MCP service.
  2. If the MCP client supports secret references, load the credential from an operating-system keychain, managed secret store, or protected environment variable rather than embedding its value in the command or endpoint.
  3. Avoid examples that instruct users to paste real secrets into shell commands. Provide a secure interactive setup flow where possible.
  4. Ensure MCP configuration files containing credentials have restrictive file permissions and are excluded from source control, backups with broad access, and diagnostic bundles.
  5. Configure clients, proxies, telemetry systems, and server logs to redact apiKey and other authentication parameters.
  6. Warn users that previously configured URL-based keys may remain in shell history and logs. Recommend deleting exposed records where feasible and rotating affected keys.
  7. Assign each key only the permissions and quotas required for disease-research queries, and provide straightforward revocation and expiration controls.
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
91% confidence
Finding

The skill name includes 'zhcn' and the description is written entirely in Simplified Chinese, indicating a Chinese-only locale expectation. The file does not offer users an explicit language choice or opt-in, which can violate the language/locale policy for skills unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.