T08 · Insecure Dependencies
- Location
SKILL.md:177- Finding
Unpinned ClawHub CLI Execution Through npx
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
SKILL.md:177Unpinned ClawHub CLI Execution Through npx
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
required: false sensitive: true
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
# 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
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
# 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
YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).
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
# BAD — writes to system locations
cp config.json /etc/myapp/config.json
echo "alias myskill='...'" >> ~/.bashrc
sudo mv binary /usr/local/bin/
# BAD — base64 encoded execution
eval "$(echo 'c29tZSBjb2Rl' | base64 -d)"
# BAD — credentials in source
API_KEY = "sk-abc123def456"
Add this to SKILL.md for any skill with scripts:
## Bundled Scripts
| Script | Purpose | Lines |
|--------|---------|-------|
| `scripts/setup.sh` | Creates workspace directory structure | 25 |
| `scripts/analyze.py` | Parses input data and generates report | 80 |
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
No suspicious patterns detected.