Back to skill

Security audit

技术路线分析 · PatentMax

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent PatentMax report client, but it sends potentially confidential patent strategy material and an API key to a network endpoint that can be redirected by environment variable, with incomplete user-facing data-handling disclosure.

Review before installing if your materials include trade secrets, unpublished inventions, customer names, filing plans, or competitive strategy. Use only the official PatentMax endpoint, keep PATENTMAX_API_KEY secret, avoid setting PATENTMAX_BASE_URL unless you trust the destination, and clear local PatentMax cache/report files if they contain confidential information.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (22)

Tainted flow: 'req' from os.environ.get (line 210, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 134)May include surrounding context.

python
req.add_header("Content-Type", "application/json")
    req.add_header("Accept", "application/json")
    try:
        with urllib.request.urlopen(req, timeout=30) as response:
            payload = json.loads(response.read().decode("utf-8"))
    except urllib.error.HTTPError as exc:
        _, message = _server_error(exc.read().decode("utf-8", "replace"))

Tainted flow: 'req' from os.environ.get (line 210, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

The script sends user-provided materials, business context, competitors, and other potentially sensitive patent-strategy data to a remote API, and the destination can be overridden through PATENTMAX_BASE_URL from the environment. In an agent setting, environment-controlled network egress can redirect sensitive IP and strategy data to an attacker-controlled host, making this more dangerous than ordinary API usage.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 217)May include surrounding context.

python
req.add_header("Content-Type", "application/json")
    for key, value in (headers or {}).items():
        req.add_header(key, value)
    return urllib.request.urlopen(req, timeout=TIMEOUT)


def request(path, method="GET", body=None, headers=None, raw=False):

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill metadata and body describe a patent-analysis workflow, but omit materially relevant behaviors noted by the finding: task lifecycle management, local caching/persistence, and use of a built-in trial-key acquisition flow. Those undisclosed behaviors matter because they affect billing, credential handling, local data retention, and user expectations around what the skill will do on their machine. In a paid, asynchronous workflow that may write files and manage long-running jobs, incomplete disclosure increases the risk of unintended data persistence or unauthorized use of credentials/resources.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
96% confidence
Finding

Undeclared network capability is especially sensitive here because the skill's purpose is to send proprietary R&D and patent-planning content to an external service. If the platform does not surface this egress clearly, users may unknowingly disclose confidential materials, design-around strategies, or filing plans.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
96% confidence
Finding

Undeclared network capability is especially sensitive here because the skill's purpose is to send proprietary R&D and patent-planning content to an external service. If the platform does not surface this egress clearly, users may unknowingly disclose confidential materials, design-around strategies, or filing plans.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill encourages users to submit technical themes, business constraints, filing plans, secrecy boundaries, and design-around considerations to an external API, but it does not disclose that this strategic and potentially confidential information leaves the user's environment. Because the skill is specifically for patent strategy and R&D planning, these inputs may include trade secrets, pre-filing invention details, launch timing, and market plans whose exposure could materially harm IP position or competitiveness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README tells users to create and export a live API key but does not warn them to keep the credential secret, avoid committing it to source control, or rotate it if exposed. In practice, users often copy commands into shell history, screenshots, shared notes, or example files, which can lead to credential leakage and unauthorized use of the PatentMax account.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

This duplicated finding points to the same underlying issue: the combination of Write access and instructions to persist reports/task state creates a real local data-retention risk. Because the skill handles commercially sensitive patent and roadmap information, unintended persistence can expose confidential strategy documents and identifiers beyond the immediate interaction.

Content

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

md
author: PatentMax
user-invocable: true
argument-hint: "[技术方向 / 决策问题]"
allowed-tools: Bash, Read, Write
---

# PatentMax 技术路线分析

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

This duplicated finding points to the same underlying issue: the combination of Write access and instructions to persist reports/task state creates a real local data-retention risk. Because the skill handles commercially sensitive patent and roadmap information, unintended persistence can expose confidential strategy documents and identifiers beyond the immediate interaction.

Content

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

md
author: PatentMax
user-invocable: true
argument-hint: "[技术方向 / 决策问题]"
allowed-tools: Bash, Read, Write
---

# PatentMax 技术路线分析

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instruction says that when the API key is missing, the script will return a Chinese prompt and the agent should relay it verbatim to the user. This imposes a specific language on user-facing output without offering a language choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The document is written entirely in Chinese and presents itself as general usage guidance, but it does not indicate that Chinese is optional, user-selected, or required for a region-specific workflow. Under the language/locale policy, forcing a specific language without opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/faq.md (reported line 117)May include surrounding context.

实在没有就直接发 HTTP 请求:

bash
curl -s -X POST "https://api.ip930.com/api/v1/reports" \
  -H "Authorization: Bearer $PATENTMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 自定义唯一串" \

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, and there is no indication that the skill supports multiple languages or that Chinese is a justified region-specific requirement. That can violate language/locale policy when users are not given an explicit opt-in or alternative.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 8)May include surrounding context.

python
**每条命令最多跑 30 秒就返回。** WorkBuddy 这类宿主前台跑命令时,要等命令结束才显示输出,
AI 中途也插不了话;一条命令阻塞几十分钟,用户就几十分钟什么都看不到,宿主还可能把命令掐掉。
所以 create 提交后只等 15 秒就先返回,之后用 wait 接着等,每次最多 30 秒:

    退出码 0   完成了(Word 报告已自动下载到提交时的目录)
    退出码 10  还在生成:把输出里的「[进度]」行告诉用户,再运行一次 wait

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 8)May include surrounding context.

python
**每条命令最多跑 30 秒就返回。** WorkBuddy 这类宿主前台跑命令时,要等命令结束才显示输出,
AI 中途也插不了话;一条命令阻塞几十分钟,用户就几十分钟什么都看不到,宿主还可能把命令掐掉。
所以 create 提交后只等 15 秒就先返回,之后用 wait 接着等,每次最多 30 秒:

    退出码 0   完成了(Word 报告已自动下载到提交时的目录)
    退出码 10  还在生成:把输出里的「[进度]」行告诉用户,再运行一次 wait

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 60)May include surrounding context.

md
# 密钥版(TRIAL_SOURCE 为空):必须设 PATENTMAX_API_KEY,不领试用。
TRIAL_SOURCE = ""
TRIAL_GROUP = "roadmap"
TRIAL_REGISTER_URL = "https://api.ip930.com/features/api-platform"
KEY_FROM_TRIAL = False

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/faq.md (reported line 17)May include surrounding context.

md
# 密钥版(TRIAL_SOURCE 为空):必须设 PATENTMAX_API_KEY,不领试用。
TRIAL_SOURCE = ""
TRIAL_GROUP = "roadmap"
TRIAL_REGISTER_URL = "https://api.ip930.com/features/api-platform"
KEY_FROM_TRIAL = False

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/faq.md (reported line 117)May include surrounding context.

md
# 密钥版(TRIAL_SOURCE 为空):必须设 PATENTMAX_API_KEY,不领试用。
TRIAL_SOURCE = ""
TRIAL_GROUP = "roadmap"
TRIAL_REGISTER_URL = "https://api.ip930.com/features/api-platform"
KEY_FROM_TRIAL = False

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 92)May include surrounding context.

python
# 密钥版(TRIAL_SOURCE 为空):必须设 PATENTMAX_API_KEY,不领试用。
TRIAL_SOURCE = ""
TRIAL_GROUP = "roadmap"
TRIAL_REGISTER_URL = "https://api.ip930.com/features/api-platform"
KEY_FROM_TRIAL = False

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 171)May include surrounding context.

python
# 密钥版(TRIAL_SOURCE 为空):必须设 PATENTMAX_API_KEY,不领试用。
TRIAL_SOURCE = ""
TRIAL_GROUP = "roadmap"
TRIAL_REGISTER_URL = "https://api.ip930.com/features/api-platform"
KEY_FROM_TRIAL = False

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The FAQ instructs users to print a prefix of the API key to the terminal, which exposes credential material on screen and potentially in terminal scrollback, recordings, shared shells, or support screenshots. Although only part of the key is shown, it still leaks sensitive secret material and normalizes unsafe secret-handling practices.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/patentmax_roadmap.py (reported line 388)May include surrounding context.

python
die(f"业务约束里有不认识的字段:{', '.join(unknown)}。可用字段见 fields 子命令。", EXIT_INPUT)
        context.update({k: str(v).strip() for k, v in loaded.items() if str(v).strip()})
    for key in CONTEXT_FIELDS:
        value = getattr(args, key, None)
        if value and value.strip():
            context[key] = value.strip()
    return context