Back to skill

Security audit

Company Profiling Zhcn

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for pharmaceutical company research, but its setup exposes a PatSnap API key in a URL and persistent MCP configuration.

Install only if you trust the PatSnap MCP service and are comfortable with your API key being stored in the MCP configuration URL. Prefer a header, secret store, or environment-variable based authentication method if supported, and rotate any real key that has already been pasted into shell history, logs, screenshots, or shared 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
SKILL.md:37
Finding

API Key Exposed Through an MCP Endpoint Query String

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 37–38
Vulnerability Type: API credential exposure through command-line arguments and 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"

Technical Analysis

The setup instructions require the user to substitute a real API key directly into an MCP endpoint URL. Although HTTPS protects the request while it is transmitted to the declared PatSnap service, it does not prevent local or downstream disclosure of the complete URL.

The credential can be retained or exposed through:

  • Shell history files
  • MCP client configuration
  • Process command-line inspection
  • Debug and diagnostic logs
  • Proxy, gateway, or monitoring logs that record full URLs
  • Crash reports and support bundles
  • Accidental copying or sharing of the configured endpoint

Authentication secrets should not be placed in URL query strings. Protected environment variables, operating-system secret stores, or authorization headers provide better separation between endpoint configuration and credentials.

The network destination and authentication behavior are consistent with the Skill's declared pharmaceutical-intelligence functionality. There is no evidence that the Skill intentionally sends the key to an unrelated party. Nevertheless, the chosen credential-handling mechanism creates an avoidable disclosure risk and does not follow least-exposure principles.

Attack Path

  1. A user follows the documented command and replaces the placeholder with a valid PatSnap API key.
  2. The shell records the full command in its history, or the MCP client stores the complete URL in configuration.
  3. A local user, extension, diagnostic utility, log collector, support bundle recipient, or other party with access to the retained data reads the URL.

...[truncated 1035 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the API key from the endpoint query string.
  2. Configure authentication using a protected authorization header or an MCP-supported secret field.
  3. If direct secret fields are unavailable, reference a protected environment variable without expanding it into documentation, logs, or persistent endpoint configuration.
  4. Store credentials in an operating-system credential manager or dedicated secret-management service with restrictive access controls.
  5. Ensure the MCP client, proxies, and diagnostic systems redact authorization values and URL query parameters.
  6. Grant the API key only the minimum scopes required for pharmaceutical data retrieval and apply appropriate usage limits.
  7. Document key expiration, rotation, and revocation procedures.
  8. Warn existing users that commands containing real keys may remain in shell history and should be securely removed.
  9. Rotate any key that has already appeared in logs, command history, screenshots, support bundles, or shared configuration.
  10. Consider making the mandatory connectivity probe lazy or user-initiated so that the Skill does not contact the external service before a task actually requires it.
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
90% confidence
Finding

The skill description and example triggers are broad enough that a router may invoke this skill for generic company-related questions without strong confirmation that the user wants pharmaceutical intelligence analysis. That can cause unintended tool use against external MCP services, unnecessary data retrieval, and incorrect delegation, especially because the skill is configured to run connectivity checks before servicing any query.

Content

No source excerpt is available for this finding.