T03 · Remote Payload Retrieval and Execution
- Location
SKILL.md:674- Finding
Remote NodeSource Setup Script Is Executed Directly by a Shell
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This patent drafting skill is mostly purpose-aligned, but it asks agents to install newly discovered skills, persist learned behavior globally, and run risky conversion setup/execution steps without enough user control.
Review before installing. Use this only in an isolated, non-root environment; do not run the curl-to-bash setup as written; pin and verify dependencies; disable or tightly review continuous learning and global instincts; require approval before installing any additional ClawHub skills; and confirm every confidential patent file/path before search, conversion, or external API use.
SKILL.md:674Remote NodeSource Setup Script Is Executed Directly by a Shell
agents/prior-art-researcher/SOUL.md:113Automatically Discovered ClawHub Skills May Be Installed and Invoked Without Security Review
skills/continuous-learning/SKILL.md:9Session-Controlled Observations Can Be Persisted as Automatically Applied Global Rules
agents/patent-converter/convert_patents.py:91Mermaid Rendering Disables the Chromium Sandbox When Run as Root
The skill declares capabilities and installation/usage flows that rely on reading local files and invoking shell commands, but it does not define any explicit tool scope restrictions such as allowed tools or permissions. In an agent environment, this increases the chance of overbroad tool access, unintended file exposure, or arbitrary command execution if the skill is invoked on untrusted inputs or paths.
The trigger phrases for Scenario 1 are broad enough to match common conversational requests about patents, which can cause the skill to activate unexpectedly. In a skill with search, file, and shell-adjacent workflows, accidental invocation can lead to unnecessary data handling, network access, or document generation beyond user intent.
Scenario 2 uses ambiguous review/optimization phrases that can overlap with ordinary discussion or requests for feedback on patent text. Because this scenario may parse provided paths and drive downstream search and document workflows, loose activation criteria increase the risk of processing sensitive files unintentionally.
Scenario 3 trigger phrases are conversationally broad and can match routine discussion about patent risk or agency feedback. Given the skill's decision-support and file-oriented behavior, accidental activation may expose sensitive reports to external tools or initiate unwanted processing on confidential application materials.
Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.
The file specifies the output format in English as the required report template, and the rest of the instructions consistently enforce English-language headings and content. This creates a language-policy issue because the skill does not offer the user a language choice or explain why English is required for this workflow.
The skill authorizes the agent to proceed automatically to drafting for 'Low Risk' cases without explicit user confirmation. In a professional patent workflow, this can cause the system to take consequential action based on its own legal/technical judgment, potentially advancing a filing strategy the user did not approve.
| Risk Level | User Confirmation |
|------------|-------------------|
| 🟢 Low Risk | No confirmation needed, proceed to drafting |
| 🟡 Medium Risk | Prompt user, can choose to continue or optimize |
| 🟠 Medium-High Risk | **Must confirm**, user decides whether to continue |
| 🔴 High Risk | **Must confirm**, recommend user consider abandoning |
The input/output specification requires a 'Complete patent Markdown document' and defines a fixed English report template, but the file does not offer any language choice or explain that the skill is intentionally limited to a specific locale. This creates a natural-language policy concern because the skill appears to impose a language convention by default rather than allowing user preference.
The skill specifies automatic conversion that writes a .docx file into the same directory as the source markdown without requiring an explicit user confirmation or warning. In an agentic workflow, automatic file creation/modification in user-controlled directories can cause unintended side effects, overwrite adjacent outputs, or violate user expectations about when filesystem changes occur.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
# Install pandoc
sudo apt install pandoc
# Install mermaid-cli
npm install -g @mermaid-js/mermaid-cli
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def md_to_html(md_content: str) -> str:
"""使用 Pandoc 将 Markdown 转换为 HTML"""
try:
result = subprocess.run(
['pandoc', '-f', 'markdown', '-t', 'html', '--wrap=none'],
input=md_content,
capture_output=True,
This subprocess call executes Mermaid CLI on attacker-controlled Mermaid content, and when running as root it intentionally disables Chromium sandboxing via --no-sandbox/--disable-setuid-sandbox. That creates a real risk because untrusted diagram input is rendered by a browser-based tool, increasing exposure to CLI/browser/parser vulnerabilities and making compromise more severe in privileged environments.
config_path = f.name
cmd.extend(['-p', config_path])
result = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
# 清理临时文件
os.unlink(mmd_path)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
print(f"搜索目录: {search_dir}")
# 检查工具
pandoc_ok = subprocess.run(['which', 'pandoc'], capture_output=True).returncode == 0
mmdc_ok = subprocess.run(['which', 'mmdc'], capture_output=True).returncode == 0
if not pandoc_ok or not mmdc_ok:
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 检查工具
pandoc_ok = subprocess.run(['which', 'pandoc'], capture_output=True).returncode == 0
mmdc_ok = subprocess.run(['which', 'mmdc'], capture_output=True).returncode == 0
if not pandoc_ok or not mmdc_ok:
print("\n错误: 缺少必要工具")
The skill instructs the agent to search ClawHub, install whatever patent-related skill is found, and then use it. That expands execution beyond the declared patent-search role into dynamic capability acquisition from untrusted sources, creating a supply-chain and prompt-injection risk because newly installed skills may contain unsafe instructions, exfiltration behavior, or broader tool access. In this context, the requirement to do this 'always' makes the issue more dangerous because the agent is pushed to perform the unsafe action by default rather than only under explicit user approval.
The skill specifies communication style and output structure entirely in English and gives no indication that the user may choose another language. Under the stated policy, a skill that imposes a specific language without opt-in can be a natural-language policy violation.
The file-level description promises automatic extraction of reusable patterns without clearly constraining when it runs or what data sources are eligible. Because the skill stores observations and evolves them into global knowledge artifacts, this ambiguity increases the risk of silently persisting sensitive user content, overgeneralizing from one project, or incorporating untrusted external inputs into future behavior.
The trigger conditions are broad enough to activate learning on loosely defined events such as effective strategies, user corrections, API access, or discovering external skills. In a continuous-learning skill, this can cause unbounded collection and persistence of session-derived information, including sensitive project details or external tool suggestions, without clear gating, approval, or scope limits.
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
The documentation instructs users to fetch and immediately execute a remote script via 'curl ... | bash', which is a classic unsafe installation pattern. If the remote source is compromised, intercepted, or replaced, users may execute arbitrary code during setup, and this skill already expects shell access in its operational context.
apt install pandoc
# 2. Install Node.js and mermaid-cli (Mermaid diagram rendering)
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
apt install nodejs
npm install -g @mermaid-js/mermaid-cli
No suspicious patterns detected.