Back to skill

Security audit

Clawhub Mirror Config And Search Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill openly helps use a ClawHub mirror, but it also pushes agents toward broad package updates, persistent cross-workspace configuration, and Git publication without clear user confirmation.

Review this before installing if you do not explicitly want ClawHub traffic routed through cn.clawhub-mirror.com. Require confirmation before any registry change, update --all operation, environment-variable persistence, .learnings or TOOLS.md edits, cross-workspace sync, Git commit, or Git push. Prefer pinned, verified packages from an authoritative registry when possible.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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)

T08 · Insecure Dependencies

Error
Location
SKILL.md:95
Finding

Unverified Third-Party Registry Used for Skill Installation and Updates

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 95-101
Vulnerability Type: Supply-chain exposure through an unverified package registry
Risk Level: High

Vulnerable Code

bash
# Install a skill
clawhub install <skill-slug> --registry https://cn.clawhub-mirror.com

# Update all skills
clawhub update --all --registry https://cn.clawhub-mirror.com

# Search for skills
clawhub search "query" --registry https://cn.clawhub-mirror.com

The same registry is prescribed for installing multi-search-engine at line 47 and is presented as the registry that should always be used at line 83.

Technical Analysis

The Skill redirects package discovery, installation, and updates from the standard ClawHub source to https://cn.clawhub-mirror.com. The reviewed instructions provide no mechanism for authenticating mirror ownership, checking artifact signatures or hashes, pinning an expected package version, or comparing packages against an authoritative source.

TLS protects traffic in transit but does not establish that packages supplied by the mirror are equivalent to trusted upstream artifacts. If the mirror, its account, its infrastructure, or its upstream synchronization process is compromised, it could distribute substituted Skill packages. The update --all command increases the affected scope because it applies the unverified source to all installed Skills rather than only the requested package.

Attack Path

  1. An attacker compromises or controls the configured mirror, its distribution infrastructure, or an artifact published through it.
  2. The attacker replaces a requested Skill package with a modified package under the expected slug or version.
  3. An Agent follows SKILL.md and installs multi-search-engine, another requested Skill, or runs update --all against the mirror.
  4. No signature, checksum, pinned version, or upstream comparison is required by the documented workflow.

...[truncated 929 chars]

Remediation
View remediation

Remediation Suggestions

  1. Use the official ClawHub registry as the default source.
  2. Before permitting a mirror, verify and document its ownership, trust relationship, synchronization model, and incident-response process.
  3. Require cryptographic artifact signatures and verify them against trusted publisher keys before installation.
  4. Pin Skills to reviewed versions and validate expected cryptographic checksums.
  5. Compare mirror metadata and package digests with an authoritative upstream source.
  6. Replace update --all with individually reviewed and version-pinned updates.
  7. Present mirror use as an explicit, user-approved fallback rather than an unconditional rule.
  8. Perform installation in a restricted environment with least-privilege filesystem, network, credential, and tool access.

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:63
Finding

Persistent Cross-Agent Propagation of Operational Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 63-71
Vulnerability Type: Persistent memory modification and cross-workspace propagation
Risk Level: High

Vulnerable Code

text
### 5. Permanently archive to the knowledge base

Record the configuration method in the `.learnings/` directory and update the index file.

1. Create a learning record: `.learnings/YYYY-MM-DD-clawhub-mirror-config.md`
2. Update the index: add a new record number to `LEARNINGS.md`
3. Update the quick reference: add usage instructions to `TOOLS.md`
4. Evolution synchronization: synchronize to all Agent workspaces (main, echo, code, research)
5. Git commit: push the changes to the remote repository

This English rendering preserves the meaning of the original instructions. Related lines 83-87 direct future use of the specified mirror and require synchronization to all four Agent workspaces.

Technical Analysis

The Skill directs the Agent to convert its operational guidance into persistent knowledge files, propagate those files across four separate Agent workspaces, and push the changes to a remote Git repository. This is broader than the temporary state needed to resolve an installation failure.

Files such as .learnings/..., LEARNINGS.md, and TOOLS.md may be consumed by future Agent sessions as trusted local guidance. Persisting a rule that directs installations to a particular external registry can cause future sessions to reuse that registry even when the original Skill is no longer active. Synchronization multiplies the trust impact across otherwise separate workspaces, while a Git push can distribute the guidance to additional checkouts or collaborators.

The risk arises from the persistence and propagation pattern itself. The supplied project does not include scripts that implement the writes automatically, and successful modification or push remains dependent on the Agent having the relevant filesystem an ...[truncated 1415 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make knowledge archival optional and obtain explicit user approval before writing persistent files.
  2. Keep records scoped to the current workspace unless the user separately authorizes each destination.
  3. Never synchronize instructions into unrelated Agent workspaces by default.
  4. Require a preview and confirmation of the exact diff before modifying .learnings, LEARNINGS.md, or TOOLS.md.
  5. Require separate, explicit confirmation before committing or pushing to a remote repository.
  6. Store contextual troubleshooting notes rather than unconditional rules such as always using one registry.
  7. Include provenance, review date, trust assumptions, and expiration guidance in any archived registry configuration.
  8. Apply repository protections such as reviewed pull requests, protected branches, signed commits, and restricted push credentials.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (5)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description defines a very broad activation condition that triggers on generic installation failures or slowness, even when the user did not ask to reconfigure registries or use a mirror. This can cause the agent to steer users toward a third-party registry by default, increasing the chance of unreviewed configuration changes and supply-chain exposure in situations where a simpler or safer fix would be more appropriate.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs the agent to create files, update indexes, sync changes across multiple agent work directories, and push commits to a remote repository, but it does not require user confirmation or warn that these actions modify local state and propagate changes widely. In an automated agent context, this can lead to unintended persistence of configuration, cross-repository contamination, and accidental exfiltration of operational details through Git pushes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The prompt at line 26 uses broad, generic phrasing such as '初始化一下搜索环境' with high-level requirements that can match many unrelated user requests. This creates an over-broad activation boundary, increasing the chance the skill is invoked in contexts where repository changes, installation steps, or archival actions were not explicitly intended.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The activation scenario at line 36 relies on common conversational language like '太卡了' and '以后查资料方便', which is ambiguous and likely to match normal discussion rather than a clearly scoped request for this specific skill. In practice, such loose phrasing can cause unintended execution of installation, file modification, or Git operations without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

All user-facing prompts and expectations in this file are presented in Chinese, with no indication that the skill is region-specific or that users can opt into another language. This can constitute a language/locale policy issue when a skill appears to force a specific language without documented justification.

Content

No source excerpt is available for this finding.