Back to skill

Security audit

Project Sharing System

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real project-sharing tool, but unsafe script and dashboard handling could let crafted workspace paths or project data run code or browser script.

Review before installing. Use only in an isolated, trusted workspace, do not let untrusted users control CLAWHUB_WORKDIR or project data, and avoid serving the dashboard from an authenticated or privileged origin until the Python path handling and innerHTML rendering are fixed.

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

T09 · Insecure Skill Coding Practices

Warning
Location
assets/dashboard.html:75
Finding

Stored DOM-Based Cross-Site Scripting in the Project Dashboard

Content
View full analysis
{ const statusIcon = p.status === 'completed' ? '✅' : p.status === 'in_progress' ? '🔄' : '⏸️'; const priorityClass = p.priority === 'high' ? 'priority-high' : p.priority === 'medium' ? 'priority-medium' : 'priority-low'; const priorityLabel = p.priority === 'high' ? '高' : p.priority === 'medium' ? '中' : '低'; const historyHtml = (p.history || []).slice(-5).map(h => `
${new Date(h.timestamp).toLocaleTimeString('zh-CN')} ${h.action} ${h.description}
`).join(''); const errorsHtml = (p.errors || []).map(e => `
❌ ${e.error} → ${e.resolution}
`).join(''); return `
${statusIcon} ${p.name} ${priorityLabel}
${p.description}
📌 ${p.current_task}
📁 ${p.id} 📅 ${new Date(p.created_at).toLocaleDateString('zh-CN')} 👤 ${(p.agents_involved || []).join(', ')}
${historyHtml ? `
📝 最近记录
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/discover_projects.sh:5
Finding

Python Code Injection Through CLAWHUB_WORKDIR in Project Discovery

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/project_snapshot.sh:5
Finding

Python Code Injection Through CLAWHUB_WORKDIR in Snapshot Generation

Content
View full analysis
Remediation
View remediation
> "$OUTPUT_FILE" <<'PY' import json import sys json_path = sys.argv[1] with open(json_path, encoding="utf-8") as f: data = json.load(f) projects = data.get("projects", []) active = [p for p in projects if p.get("status") == "in_progress"] completed = [p for p in projects if p.get("status") == "completed"] # Generate the snapshot using data values. PY ``` For status metadata, either calculate the counts in the same Python invocation or use a separate safe argument-based invocation: ```bash python3 - "$JSON_PATH" <<'PY' import json import sys with open(sys.argv[1], encoding="utf-8") as f: data = json.load(f) projects = data.get("projects", []) print(f"active_projects: {sum(p.get('status') == 'in_progress' for p in projects)}") print(f"total_projects: {len(projects)}") PY ``` Further hardening should include: 1. Removing every instance where shell-derived values are embedded in Python source. 2. Canonicalizing and validating the workspace path against an approved root. 3. Using quoted heredocs to prevent shell expansion inside program text. 4. Applying restrictive permissions to generated snapshots. 5. Adding regression tests for workspace paths containing quotes, newlines, and language metacharacters. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The skill is presented primarily as a project-sharing and discovery system, but the documented behavior also includes automatic backup retention, snapshot generation, and external script execution. This mismatch can cause users or platforms to grant trust under an incomplete understanding of what the skill changes or runs, increasing the risk of unintended filesystem activity or execution of auxiliary scripts.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `scripts/project.js` | CLI 管理工具 |

Chaining Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

Using ls ... | tail ... | xargs rm -f for deletion is unsafe because it is not robust against filenames containing whitespace, newlines, or leading dashes, and it can behave unpredictably when globbing or listing fails. In a shared or attacker-influenced workspace, a crafted backup filename could cause unintended deletions or make retention cleanup unreliable.

Content

Scanner excerpt · scripts/auto_backup.sh (reported line 21)May include surrounding context.

sh
bash "$WORKSPACE/scripts/project_snapshot.sh" "$BACKUP_DIR/snapshot_$TIMESTAMP.md" > /dev/null 2>&1

# 保留最近 30 个备份
ls -t "$BACKUP_DIR"/projects_status_*.json | tail -n +31 | xargs rm -f 2>/dev/null
ls -t "$BACKUP_DIR"/PROJECT_STATUS_*.md | tail -n +31 | xargs rm -f 2>/dev/null

echo "✅ 备份完成: $BACKUP_DIR (保留最近30个版本)"

Chaining Abuse

High
Category
Tool Misuse
Confidence
91% confidence
Finding

This deletion pipeline has the same unsafe pattern as the previous line: ls output is fed into xargs rm -f without null-delimiting or defensive handling. If backup filenames become attacker-controlled or malformed, the cleanup step can delete the wrong files or fail in unexpected ways.

Content

Scanner excerpt · scripts/auto_backup.sh (reported line 22)May include surrounding context.

sh
# 保留最近 30 个备份
ls -t "$BACKUP_DIR"/projects_status_*.json | tail -n +31 | xargs rm -f 2>/dev/null
ls -t "$BACKUP_DIR"/PROJECT_STATUS_*.md | tail -n +31 | xargs rm -f 2>/dev/null

echo "✅ 备份完成: $BACKUP_DIR (保留最近30个版本)"
echo "   JSON: projects_status_$TIMESTAMP.json"

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The sync command automatically executes an external shell script, auto_backup.sh, as a side effect of routine project synchronization. Because this launches arbitrary shell code from the workspace without confirmation or integrity checks, anyone who can modify that script can gain code execution when a user runs an otherwise benign sync operation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown states that installation automatically creates files and configures backups, but gives no warning, consent flow, or path restrictions for those filesystem changes. Silent file creation and backup behavior can overwrite user expectations, leak project data into backup artifacts, or persist data in locations the user did not knowingly approve.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The page declares lang="zh-CN", and the script later formats dates and times explicitly with the zh-CN locale, making the skill effectively Chinese-only by default. This is a natural-language policy concern because the file imposes a specific language/locale without any user opt-in or explanation that the tool is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The visible interface strings such as the title, subtitle, and footer are all presented only in Chinese. Because the file does not provide an alternate language path or indicate that this is a region-specific skill, it violates the requirement to avoid forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill manifest frames the capability as a project-sharing system for multi-agent collaboration and auto-discovery, which suggests synchronization or shared state management. This script instead creates local file backups, invokes a snapshot script, and deletes older backups, which is a materially different operational purpose from sharing/collaboration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes a 项目共享系统 for multi-agent project state collaboration and discovery, which directly supports reading and updating project status data. However, the implementation imports child_process and later executes both a Node script and a shell backup script, adding command-execution capability that is not clearly justified by the stated purpose of sharing project state.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The writeJSON function overwrites projects_status.json and then triggers additional persistence actions, including regenerating markdown and logging to the memory directory. Although these are core behaviors, the code does not disclose in the command help or at the point of invocation that add/update operations will also modify multiple files beyond the main JSON.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Users invoking sync are not clearly warned that an external shell script will be executed afterward. This creates a trust-boundary violation: a data synchronization command silently becomes a code-execution primitive, increasing the chance of accidental execution of malicious or tampered backup logic.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shell script’s natural-language comments and visible error/output text are written exclusively in Chinese, and the file does not indicate that the skill is region-specific or that users can opt into a preferred language. That creates a language/locale policy concern under the rule for natural-language policy violations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code forces generated status output to use UTC+8 and explicitly labels timestamps as 北京时间, while all user-facing help and content strings are also fixed in Chinese. This imposes a specific language/locale on all users without any opt-in, selection mechanism, or documented regional scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. The visible user-facing description, headings, and command annotations are entirely in Chinese, with no indication that users may choose another language or that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This JSON file stores user-facing project names, actions, descriptions, and error details predominantly in Chinese, with no indication that the skill is region-specific or that users can opt into another language. Under the policy rule for language/locale, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

This shell script includes comments and user-visible status messages entirely in Chinese, and it does not offer any language choice or document a justified locale restriction. Under the policy for natural-language violations, forcing a specific language without opt-in is reportable across all file types.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The header documentation presents the available commands as list/show/add/update/sync/template, but the code also implements snapshot and summary commands later in the dispatcher. This creates a documentation-to-code mismatch about the tool's exposed functionality, even though it is not a direct security issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The snapshot command hardcodes zh-CN and Asia/Shanghai in toLocaleString, and the tool's user-facing strings are entirely in Chinese. This creates a fixed language/locale behavior without opt-in or explanation, which matches the policy category for forced language or locale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file's natural-language comments and usage text are written only in Chinese, which can constitute a language/locale policy issue if the skill is expected to support users without forcing a specific language. There is no indication that the user can choose a language or that the locale restriction is intentional and documented.

Content

No source excerpt is available for this finding.