Back to skill

Security audit

Patent Assistant

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent patent drafting and search helper, but its search workflow can send sensitive invention keywords to several external services, including one plaintext HTTP endpoint, without a clear consent step.

Review carefully before installing if you may use it with unpublished inventions or trade secrets. Avoid putting full confidential disclosures into search queries, do not use the Innojoy provider unless plaintext HTTP exposure is acceptable, and prefer explicit, narrow keyword searches with trusted providers only.

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
scripts/patent_search.py:104
Finding
Unencrypted Transmission of Potentially Confidential Patent Search Data## Vulnerability Details **File Location**: `scripts/patent_search.py`, lines 104–115 **Vulnerability Type**: Plaintext transmission of sensitive data **Risk Level**: Medium ### Vulnerable Code ```python encoded_query = urllib.parse.quote(query) # Innojoy simple search endpoint url = f"http://www.innojoy.com/search/index.html?kw={encoded_query}" headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36", "Accept": "text/html,application/xhtml+xml", } try: req = urllib.request.Request(url, headers=headers) with urllib.request.urlopen(req, timeout=30) as response: html = response.read().decode("utf-8") ``` The insecure HTTP URL is also included in generated output at lines 124 and 133: ```python "url": f"http://www.innojoy.com/search/index.html?kw={encoded_query}", ``` ### Technical Analysis The Innojoy search provider is accessed over plaintext HTTP. User-provided search terms are URL-encoded and placed in the query string, but URL encoding provides no confidentiality or integrity protection. Patent searches may include keywords derived from unpublished inventions or complete technical disclosures. Any network intermediary able to observe the connection can read these terms. An active intermediary can also modify the HTTP response, redirect the connection, or alter links returned to the user. The Skill recommends multi-platform searches, including Innojoy, in `SKILL.md`. Therefore, invoking the documented `-s all` or explicit `-s innojoy` workflow reaches the affected path. ### Attack Path 1. A user supplies keywords or disclosure content concerning an unpublished invention. 2. The Skill runs `patent_search.py` with the Innojoy provider, directly or through the `all` provider selection. 3. `search_innojoy()` embeds the user input in an HTTP query parameter. 4. The application sends the request over the network without TLS. 5. A network-positioned attacker, proxy, ISP, or untrusted access-p ...[truncated 793 chars]
Remediation
## Remediation Suggestions 1. Replace every Innojoy `http://` endpoint at lines 106, 124, and 133 with a verified `https://` endpoint. 2. Confirm that TLS certificate validation remains enabled; do not introduce an unverified SSL context or suppress certificate errors. 3. If Innojoy does not provide a functional HTTPS endpoint, disable this provider rather than transmitting patent information over plaintext HTTP. 4. Obtain explicit user consent before submitting invention-related content to third-party services, particularly when the `all` provider option is selected. 5. Minimize transmitted data by sending narrowly scoped keywords instead of complete disclosure text. 6. Avoid placing sensitive input in URLs where it may be retained in browser history, proxy logs, or server access logs. Use a documented HTTPS POST API where the provider supports one. 7. Add automated tests or static checks that reject plaintext HTTP endpoints in network-enabled provider implementations. 8. Document which third parties receive search data and warn users not to submit confidential details unless disclosure is authorized.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
This mismatch is security-relevant because the skill description understates external network behavior while claiming assistant-like drafting functions. Users may provide sensitive unpublished patent material expecting local drafting help, not realizing the skill may query multiple third-party services or academic platforms, which can leak confidential information and jeopardize secrecy.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
This mismatch is security-relevant because the skill description understates external network behavior while claiming assistant-like drafting functions. Users may provide sensitive unpublished patent material expecting local drafting help, not realizing the skill may query multiple third-party services or academic platforms, which can leak confidential information and jeopardize secrecy.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill instructs use of a Python script that performs external patent searches across multiple sites, but the manifest does not declare any explicit tool scope or permissions. Undeclared file and network capabilities reduce transparency and make it harder to enforce least privilege, increasing the risk of unintended data exposure when users submit confidential invention details.

Vague Triggers

Medium
Confidence
95% confidence
Finding
Overly broad trigger phrases can cause the skill to activate in ordinary conversations about patents, writing, or prior-art searches without clear user intent. In this skill's context, accidental activation is more dangerous because users may paste sensitive technical disclosures that could then be processed or sent to external search services unexpectedly.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
L004 及全文均以中文描述技能行为,但未说明这是可选语言,也未提供用户语言选择或 opt-in。若该技能在多语言环境中通用,强制或默认单一语言输出可能违反语言/locale 选择政策。

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The function sends user-supplied patent search terms directly to external providers, and those queries may contain confidential invention details, trade secrets, or pre-filing concepts. In a patent-assistant context this is especially sensitive, because public disclosure or broad third-party sharing before filing can create legal, confidentiality, and competitive risks even if the transport is HTTPS.

Missing User Warnings

Medium
Confidence
98% confidence
Finding
The main workflow can fan out a single query to multiple third-party services, including in parallel, without an explicit disclosure that the user's invention keywords will be shared broadly. In this skill's context, that materially increases exposure because sensitive patentability searches often contain unpublished technical details and broadcasting them to several providers multiplies confidentiality and pre-filing leakage risk.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The skill documentation is entirely in Chinese, including usage guidance and cautions, with no indication that other languages are supported or that Chinese is a deliberate, justified regional constraint. Under the language/locale policy rule, this can be a natural-language policy issue because it effectively imposes a language choice without user opt-in.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The script's user-facing natural language is consistently Chinese, including the module description, CLI help text, template content, and runtime error messages. This imposes a specific language/locale on users without any opt-in or documented justification, which matches the language/locale policy violation category.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The Baidu Scholar request sets `Accept-Language` to `zh-CN,zh;q=0.9`, which enforces a specific locale behavior. Under the policy, forcing a language or locale without user opt-in is a natural-language policy concern unless clearly justified or made configurable.

Static analysis

No suspicious patterns detected.