Back to skill

Security audit

Find Skills - 查找技能

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly for finding ClawHub skills, but it also can install third-party skills and can send chosen local file contents to ClawHub as a search query.

Review before installing. Use this only when you are comfortable with ClawHub lookups and local installed-skill enumeration. Do not use search @file with secrets, keys, .env files, private documents, or source files, because the contents can become a remote search query. Treat install --execute as installing third-party code into your agent environment and inspect the target skill first.

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

T09 · Insecure Skill Coding Practices

Warning
Location
find_skills.py:871
Finding

Arbitrary Local File Contents Can Be Transmitted as a ClawHub Search Query

Content
View full analysis
Tuple[int, str, str, List[str], List[str]]: tried: List[str] = [] merged_out: List[str] = [] merged_err: List[str] = [] urls: List[str] = [] seen_urls: set[str] = set() final_code = -1 for q in _clawhub_query_variants(query, kws or []): tried.append(q) code, out, err = _run_clawhub(["search", q]) ``` ```python def _read_arg_query(argv: List[str]) -> str: if len(argv) < 3: return "" raw = argv[2].strip() if raw == "-": return sys.stdin.read().strip() if raw.startswith("@") and len(raw) > 1: return Path(raw[1:]).read_text(encoding="utf-8").strip() ``` ### Technical Analysis The `@file` query syntax accepts an arbitrary filesystem path and reads its complete contents without applying a directory allowlist, file-size limit, file-type validation, sensitivity check, redaction, or user confirmation. The resulting text becomes the search query. `_clawhub_search_cli()` passes that query directly to `clawhub search`. ClawHub search is the network-backed mechanism required by the declared search functionality, so the local file contents may be submitted to the ClawHub service by the external CLI. Supporting file-based queries is documented in `SKILL.md`, but unrestricted access to any file readable by the current process exceeds the minimum privileges needed for skill discovery. A normal short search string is sufficient for that purpose. The behavior is especially risky when an AI agent can be induced to use a path without understanding that the file's contents will become a remote query. This is not shell command injection: the subprocess uses an argument ...[truncated 2048 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (10)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The top-level description frames the skill as search/list functionality, but the documented behavior also includes installation, remote inspection/stats lookups, and local verification of installed skills and paths. This mismatch can mislead policy engines or users into approving a seemingly read-only skill that can perform mutating actions or broader local/remote enumeration.

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 47)May include surrounding context.

md
| `verify` | 检查本机 `SKILL.md` |

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest describes a discovery/listing skill, but the code also supports inspect, install, stats, and verify. This capability mismatch is dangerous because agents or users may authorize or invoke the skill under the assumption that it is read-only, while it actually includes state-changing behavior such as installation of third-party code.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The install command enables acquisition of third-party skills, which is materially more powerful than 'finding skills.' Even though --execute is required, bundling installation into a discovery skill increases the chance of accidental or policy-bypassing code installation through misleading capability scoping.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill advertises and documents shell execution, local file/path inspection, environment-variable use, and network access, but it declares no explicit tool scope or permission boundaries. In an agentic environment, that omission can let the skill be invoked with broader capabilities than a user expects, increasing the chance of unintended command execution, local enumeration, or remote queries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file includes invocation guidance that says to use the skill when the user asks specific examples 'or similar skill discovery questions'. That catch-all phrase is ambiguous and broad, making it unclear what nearby requests should or should not trigger the skill.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring advertises discovery and installation capabilities while the manifest presented to the user is narrower. This inconsistency is a security-relevant transparency problem because capability disclosures are part of the trust boundary for agent skills; mismatches make it easier for higher-risk functions to hide behind a benign-seeming description.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · find_skills.py (reported line 246)May include surrounding context.

python
if not exe:
        return -1, "", "clawhub CLI not found in PATH"
    try:
        p = subprocess.run(
            [exe] + args,
            capture_output=True,
            text=True,

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The code performs outbound HTTP requests to ClawHub APIs for detail and stats enrichment, which exceeds a narrow local discovery/listing expectation. This broadens the data-flow and trust surface: user queries and looked-up slugs are sent to a remote service, and returned metadata may influence downstream agent decisions despite not being locally verified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.