Back to skill

Security audit

company-profiling-zhcn

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent for PatSnap pharmaceutical company research, but its setup asks users to place an API key in a command-line URL and it performs an automatic authenticated connectivity check.

Install only if you trust the PatSnap MCP endpoint and understand that the documented setup may store your API key in command history or MCP configuration. Prefer a safer secret mechanism if the provider supports one, rotate any key previously pasted into a command URL, and be aware the skill performs a small authenticated PatSnap check when loaded.

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 Exposure Through URL Query Parameters

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 37–40; repeated at lines 76–79
Vulnerability Type: Credential exposure through command-line URL and query string
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 connection-failure guidance:

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

Technical Analysis

The Skill instructs users to substitute a live PatSnap API key directly into a URL query parameter passed on the command line. Although the endpoint uses HTTPS, transport encryption does not protect the credential from exposure at either endpoint or from local handling.

The resulting URL may be retained in:

  • Shell history
  • MCP client configuration
  • Process command-line inspection
  • Debugging and diagnostic output
  • Proxy or server access logs
  • Crash reports and support bundles
  • Screenshots or copied setup commands

Query parameters are commonly logged as part of complete request URLs. This makes them unsuitable for long-lived authentication secrets. The network destination is the declared PatSnap service and is relevant to the Skill's pharmaceutical-data functionality; the reviewed material does not demonstrate deliberate credential theft. Nevertheless, the credential-handling design creates an avoidable disclosure path.

Attack Path

  1. A user follows the setup instructions and replaces the placeholder with a valid PatSnap API key.
  2. The shell records the complete command, including the key, in command history, or the MCP client persists the full endpoint URL.
  3. A local user, compromised process, diagnostic collector, logging service, or person receiving a support bundle obtains the stored URL.
  4. The party extracts the value of the apiKey query parameter.
  5. The exposed ...[truncated 649 chars]
Remediation
View remediation

Remediation Suggestions

  1. Do not place API keys in URL query parameters.
  2. Prefer an Authorization header or another provider-supported authentication header.
  3. Integrate with protected OS or agent secret storage and configure the MCP client using a secret reference rather than a literal credential.
  4. If environment variables are supported, pass an unexpanded variable reference through a mechanism that does not record the resolved value in shell history or process arguments.
  5. Ensure the MCP client, proxies, server, telemetry systems, crash reports, and support tools redact authentication material.
  6. Store credentials with restrictive filesystem permissions and prevent them from being committed to version control.
  7. Update both setup examples so users are not encouraged to paste live keys into commands.
  8. Rotate any API keys previously configured using this documented pattern and review relevant logs or support artifacts for accidental disclosure.
  9. Where supported, issue narrowly scoped, short-lived credentials with quota controls and rapid revocation.
  10. Perform connectivity validation lazily on the first relevant pharmaceutical-data request instead of issuing the mandatory EGFR probe on every Skill load, thereby reducing unnecessary authenticated network activity.
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 (3)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

技能描述中的触发语句覆盖“介绍一下某公司情况”“公司概况”等宽泛表述,容易与通用信息查询重叠,导致代理在不需要时调用该技能。对接外部 MCP 数据源和投资/合作建议场景时,误触发会带来不必要的数据访问、错误路由以及不恰当的高权重商业分析输出。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

路径 1–4 的“触发条件”关键词如“能力”“进展”“核心产品”“合作记录”等边界模糊,缺少排除条件,可能使技能对普通商业问答、新闻摘要甚至非制药语境的问题发生误匹配。由于该技能会进一步驱动多步检索、外部服务访问和结构化分析,误激活的后果比普通本地回答更大。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

L239 明确要求“在查询中保持用户的语言偏好”,而该技能整体为 zh-CN 定位,可能在未显式征得用户同意时将语言选择固化为既定偏好。虽然这不是高风险问题,但属于语言/locale 行为约束,文档中没有说明用户可切换或选择输出语言。

Content

No source excerpt is available for this finding.