Back to skill

Security audit

target-intelligence-zhcn

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for Chinese biomedical target research, but its setup asks users to put an API key directly in a URL where it can be exposed.

Review this before installing if the PatSnap key has meaningful account access or billing impact. Prefer a setup method that keeps the API key in a secret store, environment variable, or authorization header rather than a URL; rotate the key if it has already been pasted into shell history, shared config, logs, or transcripts.

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

API Credential Exposed Through URL Query Parameter and Command-Line Arguments

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 38–40; the same insecure pattern is repeated at lines 77–79
Vulnerability Type: API credential exposure through URL query parameters
Risk Level: Medium

Vulnerable Code Snippet:

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

The displayed value is a placeholder rather than a confirmed live credential. However, the instructions require users to replace it with their real PatSnap API key, preserving the insecure authentication pattern.

Technical Analysis

The Skill directs users to embed an API key in a URL query parameter supplied as a command-line argument. Query-string credentials are liable to be retained or exposed through:

  • Shell command history
  • Process argument inspection while the command is running
  • MCP client configuration files
  • Reverse-proxy and application access logs
  • Network monitoring and observability systems
  • Diagnostic output, crash reports, and support bundles
  • Copied terminal transcripts or shared configuration

TLS can protect the request in transit, but it does not prevent the complete URL from being recorded at either endpoint or by local tooling. The behavior is not necessary for the Skill’s biomedical intelligence functionality because authentication can instead be supplied through a protected secret mechanism or authorization header.

The audited file does not instruct the Agent to read local credential files, environment variables, SSH keys, or unrelated sensitive data. No evidence of intentional credential exfiltration was identified. The vulnerability is the insecure handling of a user-supplied secret.

Attack Path

  1. A user creates a valid PatSnap API key.
  2. The user replaces sk-xxxxxxxxxxxx with the real key and executes the documented command.
  3. The complete secret-bearing UR ...[truncated 924 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the API key from the URL query string.
  2. Configure the MCP service to transmit authentication through an HTTP Authorization header or another provider-supported authentication field.
  3. Load the credential from a protected secret store or environment variable rather than placing its literal value in the command.
  4. Ensure the MCP client stores credentials separately from ordinary endpoint configuration and applies restrictive filesystem permissions.
  5. Redact authorization data from application logs, proxy logs, telemetry, diagnostics, and error messages.
  6. Avoid examples that encourage users to paste real credentials into interactive shell commands.
  7. Document immediate revocation and rotation procedures for keys that have appeared in shell history, logs, shared configuration, or support bundles.
  8. Update both occurrences of the insecure setup command at lines 38–40 and 77–79.

A hardened conceptual configuration should separate the endpoint from the secret:

text
Endpoint: https://connect.patsnap.com/096456/Logic-mcp
Authorization: Bearer ${PATSNAP_API_KEY}

The exact syntax should follow the MCP client and PatSnap authentication mechanisms, without placing the resolved secret in the URL or persistent command history.

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
89% confidence
Finding

L324 明确要求“在查询中保持用户的语言偏好”,而该技能整体内容与名称均指向中文环境,未说明可由用户选择其他语言或 locale。根据规则,涉及语言/locale 约束且未提供用户选择或明确正当化时,应视为自然语言策略违规。

Content

No source excerpt is available for this finding.