Back to skill

Security audit

ClawMate

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its file-management purpose, but its configurable service URL and unsafe shell command templates could expose project data or run unintended commands.

Review before installing. Use this only with a trusted local ClawMate service, keep CLAWMATE_URL on localhost unless you intentionally want to send project paths, notes, and selected file content elsewhere, and require careful confirmation before init or do operations. A safer version should enforce loopback or disclose remote transmission and construct requests with proper JSON and URL serialization instead of shell templates.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:39
Finding

Shell and Request Injection Through Unvalidated Template Substitution

Content
View full analysis
/dev/null ``` Project conversion request: ```bash curl -s -X POST "{CLAWMATE_URL}/api/clawmate/project/convert" \ -H 'Content-Type: application/json' \ -d '{"root":"{root}","path":"{project_name}"}' 2>/dev/null ``` Feedback-processing request: ```bash curl -s -X POST "{CLAWMATE_URL}/api/clawmate/task/run" -H 'Content-Type: application/json' -d '{"root":"","file":"","selections":[{"task_id":"review_modify","content":"","note":""}]}' 2>/dev/null ``` Configuration retrieval and parsing: ```bash curl -s "{CLAWMATE_URL}/api/clawmate/config" 2>/dev/null | python3 -c " import json, sys cfg = json.load(sys.stdin) for root in cfg['roots']: print(f\"{root['id']}|{root['dir']}\") " ``` Project-list retrieval and parsing: ```bash curl -s "{CLAWMATE_URL}/api/clawmate/list?root=&marker_filter=true" 2>/dev/null | python3 -c " import json, sys data = json.load(sys.stdin) for e in data.get('entries', []): if e.get('is_dir') and not e['name'].startswith('.'): print(e['name']) " ``` ### Technical Analysis The Skill instructs the agent to construct shell commands by directly substituting values such as `CLAWMATE_URL`, search keywords, root identifiers, project names, file paths, selected content, and feedback notes into shell, URL, and JSON contexts. No mandatory validation, shell-safe argument handling, URL encoding, or JSON serialization is specified. These values cross several parsing boundaries: 1. The shell parses the generated c ...[truncated 2551 chars]
Remediation
View remediation
/dev/null`; return sanitized failures so malformed or redirected requests are visible. 9. Add tests covering quotation marks, apostrophes, command substitutions, semicolons, newlines, Unicode delimiters, traversal sequences, and malformed URLs. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:9
Finding

Configurable Remote Endpoint Contradicts Local-Only Data-Scope Guarantees

Content
View full analysis
/dev/null ``` ```bash curl -s -X POST "{CLAWMATE_URL}/api/clawmate/task/run" -H 'Content-Type: application/json' -d '{"root":"","file":"","selections":[{"task_id":"review_modify","content":"","note":""}]}' 2>/dev/null ``` The package metadata makes unconditional local-only claims: ```json "security": { "data_scope": "local_only", "third_party_transmission": false, "filesystem_modification": true, "user_confirmation_required": [ "init", "do" ] } ``` ### Technical Analysis The documented default endpoint is a localhost service, but `CLAWMATE_URL` is configurable through persistent conversation memory or `MEMORY.md`. The Skill warns users not to select an untrusted host, yet it does not technically enforce loopback-only communication or require explicit confirmation when the destination is remote. Normal requests may expose: - Configured root identifiers and root directory paths. - Project names and file paths. - Search terms. - Feedback notes. - Selected document content. - Project-management and task metadata. The `task/run` operation also asks the selected service to perform file-changing work. Consequently, changing the endpoint can affect both confidentiality and integrity. This behavior exceeds the stated `local_only` and `third_party_transmission: false` guarantees whenever a non-loopback endpoint is configured. This is not classified as remote payload retrieval and execution because the audited instructions do not evaluate downloaded respon ...[truncated 1444 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

处理步骤(全部处理):

  1. 查询所有 pending feedback:
    bash
    curl -s "{CLAWMATE_URL}/api/clawmate/feedback/list?status=pending" 2>/dev/null
    
  2. 列出待处理项(ID / 文件 / 用户备注)
  3. 等待用户确认是否继续处理

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

处理步骤(全部处理):

  1. 查询所有 pending feedback:
    bash
    curl -s "{CLAWMATE_URL}/api/clawmate/feedback/list?status=pending" 2>/dev/null
    
  2. 列出待处理项(ID / 文件 / 用户备注)
  3. 等待用户确认是否继续处理

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

对每个 root 列出项目(带 .clawmate/ marker 的目录):

bash
curl -s "{CLAWMATE_URL}/api/clawmate/list?root=<root_id>&marker_filter=true" 2>/dev/null | python3 -c "
import json, sys
data = json.load(sys.stdin)
for e in data.get('entries', []):

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

步骤 1:获取 config 中的 roots 列表

bash
curl -s "{CLAWMATE_URL}/api/clawmate/config" 2>/dev/null | python3 -c "
import json, sys
cfg = json.load(sys.stdin)
for root in cfg['roots']:

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

步骤 3:通过 API 列出带 .clawmate/ marker 的项目

bash
curl -s "{CLAWMATE_URL}/api/clawmate/list?root={root_id}&dir=&marker_filter=true" 2>/dev/null | python3 -c "
import json, sys
data = json.load(sys.stdin)
for e in data.get('entries', []):

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description and the full operational instructions are written to require Chinese-language usage, including prescribed user replies such as 回复「确认」. There is no indication that users may choose another language or locale, which constitutes a language-policy issue under the natural-language policy rules.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The command list enumerates available invocations like clawmate init, clawmate plan, and clawmate project, but the document does not define when the skill should or should not activate beyond showing command syntax. For a markdown skill description, this leaves trigger scope underspecified and may cause unintended invocation in contexts where these phrases are mentioned descriptively rather than as commands.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
94% confidence
Finding

The skill instructs the agent to POST project metadata and filesystem-derived values to a configurable CLAWMATE_URL. Although the document warns not to use an untrusted host, the endpoint is still externally configurable and could exfiltrate project names, paths, and operational metadata to an attacker-controlled service if misconfigured.

Content

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

| project-harness/ 骨架 + .clawmate/ 运行子目录 | 从 project.harness_template_dir 复制,已存在则不覆盖 |

bash
curl -s -X POST "{CLAWMATE_URL}/api/clawmate/project/convert" \
  -H 'Content-Type: application/json' \
  -d '{"root":"{root}","path":"{项目名}"}' 2>/dev/null

External Transmission

Medium
Category
Data Exfiltration
Confidence
96% confidence
Finding

This workflow fetches pending feedback and then sends file paths, selected content, and user notes to /api/clawmate/task/run. Because CLAWMATE_URL is configurable and the payload includes potentially sensitive document content and user comments, a malicious or compromised service could collect private data or drive unsafe downstream processing.

Content

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

处理步骤(全部处理):

  1. 查询所有 pending feedback:
    bash
    curl -s "{CLAWMATE_URL}/api/clawmate/feedback/list?status=pending" 2>/dev/null
    
  2. 列出待处理项(ID / 文件 / 用户备注)
  3. 等待用户确认是否继续处理