Back to skill

Security audit

skills-best-practices

Security checks for vulnerabilities and agentic risk

Overview

This is a documentation-only skill about writing agent skills; its main caution is a user-run validator command that fetches an unpinned package.

Before installing, treat this as a skill-authoring guide and review any command examples before running them. If you use the validator command in a sensitive project or CI environment, prefer a pinned or otherwise verified version and run it with minimal credentials and filesystem access.

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:375
Finding

Unpinned Third-Party Validator Download and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:375-378
Vulnerability Type: Unpinned third-party package execution
Risk Level: Medium

Vulnerable Code

markdown
Run the official Agent Skills validator before publishing:

```bash
uvx --from skills-ref agentskills validate path/to/skill
text

### Technical Analysis

The documented command directs `uvx` to obtain and execute the `skills-ref` package without specifying an exact version, lockfile, or integrity hash. Consequently, the code executed by users or CI runners may differ from the version that existed when this Skill was audited.

This creates a supply-chain risk: compromise of the package publisher, package registry, release process, or a future package version could cause attacker-controlled code to run when users follow the validation workflow. Although validation is legitimate to the Skill's declared functionality, executing an unpinned package exceeds the minimum-risk approach because reproducible and integrity-verified alternatives are available.

This finding is distinct from remote shell-script execution. The project contains no actual instruction to execute `curl | bash`; `references/clawhub-publishing.md:29` mentions that pattern only to prohibit it.

### Attack Path

1. An attacker compromises the `skills-ref` package account, release pipeline, or another relevant supply-chain component.
2. The attacker publishes a malicious release under the expected package name.
3. A user or CI pipeline follows the documented `uvx --from skills-ref ...` instruction.
4. `uvx` retrieves the currently resolved package release rather than a previously reviewed, pinned artifact.
5. The malicious package code executes with the privileges and environmental access of the invoking user or CI runner.

### Impact Assessment

Successful exploitation could provide arbitrary code execution under the invoking account. In a developer environment, this may expose source code, local credentials, SSH mat
...[truncated 426 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin skills-ref to an exact, reviewed version rather than allowing unconstrained resolution.
  • Use a lockfile or package-manager mechanism that records the complete dependency graph.
  • Verify package artifacts with trusted hashes or signatures where supported.
  • Document the canonical publisher and source repository so users can verify package provenance.
  • In CI, install the pinned validator in a restricted build step and run it with minimal credentials, filesystem access, and network permissions.
  • Prefer a preinstalled and independently verified validator when available.
  • Establish a controlled update process that reviews and tests each new validator version before changing the pin.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (13)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
A minimal skill is a directory with a `SKILL.md` file:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
A minimal skill is a directory with a `SKILL.md` file:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
A minimal skill is a directory with a `SKILL.md` file:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
A minimal skill is a directory with a `SKILL.md` file:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
A minimal skill is a directory with a `SKILL.md` file:

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/clawhub-publishing.md (reported line 29)May include surrounding context.

md
Only `suspicious.env_credential_access` is externally self-clearable; every other code requires a fixed re-publish.

**Hard-block codes** (`malicious.install_terminal_payload`, `malicious.crypto_mining`, `malicious.known_blocked_signature`) auto-hide the skill and place the uploader in manual moderation. The most common is `install_terminal_payload`: install instructions telling users to paste obfuscated shell payloads (base64-decoded `curl | bash`). Never include these, even as examples.

## Surviving the LLM Review

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
65% confidence
Finding

uvx/uv tool run commands without ==version create a rug-pull risk.

Content

No source excerpt is available for this finding.

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE.txt (reported line 27)May include surrounding context.

text
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE.txt (reported line 31)May include surrounding context.

text
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE.txt (reported line 54)May include surrounding context.

text
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE.txt (reported line 147)May include surrounding context.

text
permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation source, and
configuration files.

"Object" form shall mean any form resulting from mechanical transformation or

Static analysis

No suspicious patterns detected.