Back to skill

Security audit

Target Intelligence

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent PatSnap target-intelligence workflow, but its setup places an API key in a URL and it can make an automatic MCP probe on broad triggers like a bare target name.

Install only if you are comfortable connecting Claude Code to PatSnap life-science MCP services. Use a narrowly scoped, revocable PatSnap API key, rotate it if you previously pasted it into a URL, and review shell history and MCP configuration for stored keys. Be aware that broad target-name prompts may activate the skill and trigger a connectivity lookup.

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

API Credential Exposed Through URL Query Parameter

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 34–36 and 74–76
Vulnerability Type: API credential exposure through an insecure URL query parameter
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 pattern is repeated in the connectivity-error guidance:

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

Technical Analysis

The setup instructions require users to substitute a real PatSnap API key directly into a URL query parameter. Although the endpoint uses HTTPS and belongs to the service declared by the Skill, embedding authentication secrets in URLs is unsafe.

The complete URL may be retained in shell history, MCP client configuration, command diagnostics, proxy or gateway logs, telemetry, crash reports, and support bundles. HTTPS protects the request while it is in transit, but it does not prevent credential disclosure through endpoint-side logging or local persistence of the command and configuration.

The external communication is necessary for the Skill's declared target-intelligence functionality. However, transmitting and storing the credential as part of the URL exceeds secure minimum-privilege practices because safer secret-delivery mechanisms can authenticate the same request without placing the key in commonly logged URL data.

Attack Path

  1. A user replaces the placeholder with a valid PatSnap API key.
  2. The user executes the documented claude mcp add command.
  3. The complete URL, including the key, is retained in shell history, MCP configuration, diagnostics, telemetry, or infrastructure logs.
  4. A local user, administrator, support-bundle recipient, log reader, or compromised monitoring component obtains access to that stored URL.
  5. The exposed ...[truncated 876 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place API credentials in URL query parameters.
  2. Prefer an Authorization header, such as a bearer-token header, where supported by the MCP client and service.
  3. Load the credential from a protected environment variable, operating-system credential store, or dedicated secrets manager.
  4. Ensure generated MCP configuration references the secret indirectly rather than persisting its plaintext value.
  5. Redact authentication headers, URLs, and configuration secrets from logs, telemetry, errors, crash reports, and support bundles.
  6. Use narrowly scoped, short-lived credentials with explicit expiration and minimum required API permissions.
  7. Document immediate key revocation and rotation procedures for users who previously followed the URL-based setup instructions.
  8. Review shell histories, MCP configuration files, and relevant service or proxy logs for previously exposed keys and rotate affected credentials.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill advertises invocation examples that are just bare entity names such as "EGFR" and "Drugs targeting P53", which makes triggering criteria ambiguous and easy to match during ordinary conversation. In an agent environment, overly broad triggers can cause unintended activation, leading the system to run external MCP connectivity checks and data-retrieval workflows when the user did not explicitly request this skill.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 305)May include surrounding context.

md
**When to use**: After completing Condition Search and Vector Search, assess whether the results are sufficient from
three dimensions:

| Dimension             | Description                                                                                |
|-----------------------|--------------------------------------------------------------------------------------------|
| Coverage completeness | Does it cover all key points of the user's query?                                          |
| Data depth            | Is there sufficient detail and data to support the answer?                                 |

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 358)May include surrounding context.

md
### PATH 1

- Fetch target information by target IDs to retrieve detailed target information
- Return the target's biological database IDs, including but not limited to KEGG, Uniprot, Refseq, etc.

### PATH 2