Back to skill

Security audit

ClawHub Skill Guide — Scanner Compliance

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only ClawHub publishing guide; the main caution is that its copy-paste CLI examples use unpinned npx commands.

Reasonable to install as a guide. Before copying its commands, use a pinned or locally locked ClawHub CLI version, verify the package source, and manually review any generated skill config or scripts before publishing.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:177
Finding
Unpinned ClawHub CLI Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:177-188` **Additional Locations**: `SKILL.md:309-339`; `references/publish-workflow.md:51-77,87-93,117-122,156-193,204-221` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code Snippet ```bash # Verify auth npx clawhub whoami # Publish npx clawhub publish ./my-skill \ --slug my-skill \ --name "My Skill" \ --version 1.0.0 \ --changelog "Initial release" \ --tags latest # Check scanner results npx clawhub inspect my-skill ``` ### Technical Analysis The documentation repeatedly directs users to execute `clawhub` through `npx` without specifying a package version or requiring a previously installed and verified copy. When the package is unavailable locally, `npx` can retrieve and execute the package currently published under that name in the npm registry. Because no version or integrity value is pinned, the code executed by users may differ from the code reviewed when this skill was published. Executing the CLI is relevant to the skill's publishing functionality, but using a mutable package reference is not the minimum-risk mechanism. A compromised maintainer account, malicious package release, or upstream supply-chain compromise could turn these otherwise legitimate commands into a local code-execution vector. The separately flagged command in `references/script-safety.md:82`: ```bash curl -sL https://example.com/installer.sh | bash ``` is not an active vulnerability in this project. It appears only in a section explicitly labeled “Unsafe Patterns” and “BAD — downloads external code.” The project does not instruct users to execute that example. ### Attack Path 1. An attacker compromises the npm package, its maintainer account, or its publication pipeline. 2. The attacker publishes a malicious version under the `clawhub` package name. 3. A user follows this skill's instructions and runs an unversioned command such as `npx cl ...[truncated 1300 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the CLI to a reviewed version in every executable example: ```bash npx --yes clawhub@VERIFIED_VERSION whoami npx --yes clawhub@VERIFIED_VERSION publish ./my-skill \ --slug my-skill \ --name "My Skill" \ --version 1.0.0 \ --changelog "Initial release" \ --tags latest ``` 2. Replace `VERIFIED_VERSION` with a specific audited release rather than a floating tag such as `latest`. 3. Prefer a separately installed, version-locked CLI managed through a lockfile. Instruct users to verify the installed version before authentication or publication. 4. Document the expected npm package identity, official source repository, publisher, and release verification procedure. 5. Where supported, verify package provenance, signatures, and registry integrity metadata before execution. 6. Apply the same pinned-version change to every `npx clawhub` command in `SKILL.md` and `references/publish-workflow.md`, including inspection, discovery, authentication, and publishing examples. 7. Recommend running initial package verification in a restricted environment without production credentials. Authenticate only after the package version and provenance have been validated. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (49)

Credential Access

High
Category
Privilege Escalation
Content
required: false
    sensitive: true
  - name: EVE_TOKEN_MAIN
    description: "ESI OAuth2 access token for main character"
    required: false
    sensitive: true
```
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

External Script Fetching

High
Category
Supply Chain
Content
```bash
# BAD — downloads external code
curl -sL https://example.com/installer.sh | bash
wget https://example.com/tool.tar.gz
pip install some-package
npm install some-module
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Chaining Abuse

High
Category
Tool Misuse
Content
```bash
# BAD — downloads external code
curl -sL https://example.com/installer.sh | bash
wget https://example.com/tool.tar.gz
pip install some-package
npm install some-module
Confidence
70% confidence
Finding
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Content
PI_KEY in operations...
```

---

## Unsafe Patterns (Trigger Scanner Warnings)

### Network downloads

```bash
# BAD — downloads external code
curl -sL https://example.com/installer.sh | bash
wget https://example.com/tool.tar.gz
pip install some-package
npm install some-module
```

### Writing outside workspace

```bash
# BAD — writes to system locations
cp config.json /etc/myapp/config.json
echo "alias myskill='...'" >> ~/.bashrc
sudo mv binary /usr/local/bin/
```

### Obfuscated code

```bash
# BAD — base64 encoded execution
eval "$(echo 'c29tZSBjb2Rl' | base64 -d)"
```

### Hardcoded credentials

```python
# BAD — credentials in source
API_KEY = "sk-abc123def456"
```

---

## Documentation Template

Add this to SKILL.md for any skill with scripts:

```markdown
## Bundled Scripts

| Script | Purpose | Lines |
|--------|---------|-------|
| `scripts/setup.sh` | Creates workspace directory structure | 25 |
| `scripts/analyze.py` | Parses input data and generates report | 80 |
Confidence
75% confidence
Finding
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Vague Triggers

Medium
Confidence
86% confidence
Finding
The frontmatter guidance emphasizes trigger text and activation keywords but does not require narrow scope, disambiguation, or exclusion criteria. That can cause over-broad auto-activation of the skill in unrelated contexts, which increases unintended exposure of user context and execution of skill instructions beyond the intended task domain.

Session Persistence

Medium
Category
Rogue Agent
Content
Keep SKILL.md under 500 lines. Move detailed docs to references.

### Step 2: Write Frontmatter

This is where most scanner issues originate. Get frontmatter right first.
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The example description template tells authors to include trigger keywords and generic 'Use when' scenarios, but it does not instruct them to constrain activation boundaries. In agent ecosystems, overly broad triggers can lead to accidental invocation on sensitive or unrelated tasks, making skill behavior less predictable and potentially exposing more context than necessary.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The skill repeatedly instructs users to run `npx clawhub` without pinning an exact package version. `npx` resolves and executes the current package version from the registry, so a compromised or maliciously updated release could execute unexpected code during publish, inspect, search, or auth workflows. In a guide specifically about publishing and scanner compliance, this is more dangerous because users are encouraged to run these commands as part of normal trusted workflow.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This command invokes `npx clawhub` without a pinned version, allowing execution of whatever package version the registry serves at runtime. That creates supply-chain risk and makes builds non-reproducible, especially problematic in a security-focused publishing guide where readers may assume the command is safe by default.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
Using `npx clawhub publish` without version pinning can fetch and run a newly published package version automatically. If the package or its distribution channel is compromised, the publish step could run attacker-controlled code on the operator's machine, potentially exposing credentials or modifying local files.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
The `inspect` command is shown with an unpinned `npx` package invocation. Even though the action sounds read-only, the risk is in package retrieval and execution itself, not only in the CLI subcommand, so a malicious package version could still execute arbitrary code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
89% confidence
Finding
This guidance normalizes use of a floating `npx clawhub publish` command for direct publishing. Because the skill is intended to help users pass security scanning, omitting version pinning undermines secure operational practice and can expose users to registry/package compromise.

Vague Triggers

Medium
Confidence
88% confidence
Finding
The best-practices section identifies the description as the primary trigger mechanism and encourages keyword coverage, but omits guardrails against ambiguous or generic phrasing. In this context, the skill is teaching others how to author skills, so weak trigger-scope guidance can propagate unsafe activation patterns across many downstream skills.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
The command reference includes `npx clawhub publish` without pinning. Since publishing commonly occurs in environments holding tokens, source code, and package metadata, an attacker controlling the fetched package version could potentially access sensitive local context during execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The unpinned `npx clawhub inspect my-skill` example carries the same supply-chain execution risk as the publish examples. The danger comes from retrieving and running the package, not from whether the subcommand is intended to inspect or mutate state.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
This `inspect --files` example uses an unpinned `npx` package and therefore inherits package substitution and malicious update risk. In a skill guide, repeated examples reinforce unsafe defaults, increasing the likelihood of copy-paste execution by users.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The command shows unpinned runtime package execution via `npx`. An attacker only needs control over the served package version or its distribution path to turn a benign inspection step into arbitrary code execution.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
The `explore` example is another instance of floating `npx` execution. Although lower apparent sensitivity than publish, it still executes code from an unpinned remote package and therefore presents supply-chain risk.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
The `search` example uses `npx clawhub` without version locking, which can result in execution of an attacker-controlled or unintended package release. Repetition throughout the guide makes the unsafe pattern systematic rather than incidental.

Rp1

Medium
Category
MCP Rug Pull
Confidence
88% confidence
Finding
The auth example uses unpinned `npx`, which is especially sensitive because auth commands may run in contexts containing tokens, credentials, or session state. A malicious package version could exfiltrate secrets or alter authentication flows.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding
This version-bump publish example still uses floating `npx`, preserving the same supply-chain risk at a step likely performed repeatedly by maintainers. Because the guide aims to produce 'clean security scanner ratings,' failing to model secure dependency execution is a meaningful weakness.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The template encourages authors to use generic trigger phrases like 'Use when: scenario1, scenario2, scenario3' without requiring narrow activation boundaries or explicit non-goals. In a skill ecosystem, broad or vague activation language can cause unintended invocation in unrelated contexts, increasing the chance that powerful instructions or tooling are applied when not appropriate.

Vague Triggers

Medium
Confidence
96% confidence
Finding
The template instructs authors to include generic trigger keywords and usage scenarios, but it does not require narrow activation boundaries, exclusions, or specificity checks. In practice, this can cause skills to match overly broad user requests, increasing the chance of unintended activation and expanding the attack surface for prompt-injection or misuse through unrelated conversations.

Vague Triggers

Medium
Confidence
86% confidence
Finding
The guidance frames the description as a primary trigger mechanism and emphasizes including broad activation keywords, but it does not equally require tight scope boundaries, exclusions, or least-privilege activation criteria. That can cause over-triggering of powerful skills, increasing the chance that a skill handling credentials, APIs, or state-changing actions is invoked in situations the user did not intend.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Static analysis

No suspicious patterns detected.