Back to skill

Security audit

Skill Security Scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent security-scanner purpose, but it asks users to execute mutable external npm code without version pinning or reviewable dependency metadata.

Review carefully before installing. If used, run it only in a restricted environment with read-only access to the skill being scanned, avoid exposing credentials or sensitive directories, and prefer an exact audited package version with lockfile or integrity verification.

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

T08 · Insecure Dependencies

Warning
Location
SKILL.md:36
Finding
Unpinned npm Package Is Retrieved and Executed<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:36-38` **Vulnerability Type**: Unpinned remote npm dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npx @claws-shield/cli scan <path-to-skill> ``` ### Technical Analysis The documented command uses `npx` to resolve and execute `@claws-shield/cli` without specifying an exact version. The project contains no package manifest, lockfile, integrity hash, or trusted registry configuration that would bind this command to a reviewed package artifact. Consequently, the code executed by this command can change after the Skill has been audited. The security of the command depends on the continuing integrity of the npm package, its publisher account, its transitive dependencies, and the registry resolution process. There is no evidence in the audited files that the current npm package is malicious. The vulnerability is the unsafe, mutable dependency execution mechanism. ### Attack Path 1. An attacker compromises the package publisher, npm account, package release process, or a relevant dependency. 2. The attacker publishes a malicious version of `@claws-shield/cli`. 3. A user follows the documented unversioned `npx` command. 4. `npx` resolves and downloads the attacker-controlled package version. 5. Package code executes locally with the permissions of the user who launched the command. 6. The malicious package can access resources available to that user, including the supplied scan target and other files permitted by the operating system. ### Impact Assessment Successful exploitation would permit arbitrary code execution with the invoking user's privileges. The accessible scope could include: - Reading or modifying files available to the user. - Accessing the target Skill directory. - Reading environment variables and locally available credentials. - Making outbound network connections. - Executing additional processes. This code does not independently obtain elevated syste ...[truncated 107 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace the unversioned package reference with an exact, previously audited version. - Add a package manifest and lockfile that record exact direct and transitive dependency versions. - Verify package integrity through lockfile integrity metadata or independently maintained checksums. - Configure and document the expected npm registry to reduce dependency-confusion risk. - Review the package and its transitive dependencies before updating the pinned version. - Prefer installing dependencies in a controlled build step rather than resolving and executing mutable packages directly through `npx`. - Run the scanner in a restricted environment with only the required filesystem access and with network access disabled unless explicitly necessary. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/run-scan.mjs:3
Finding
Core Scanning Behavior Is Delegated to an Unverifiable External Dependency<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run-scan.mjs:3-10` **Vulnerability Type**: Unpinned and unauditable third-party scanner implementation **Risk Level**: Medium ### Vulnerable Code ```js import { scanSkill } from "@claws-shield/scanner" const skillPath = process.argv[2] if (!skillPath) { console.error("Usage: run-scan.mjs <path-to-skill>") process.exit(1) } const result = await scanSkill(skillPath) ``` ### Technical Analysis The local script is only a wrapper around `scanSkill` from `@claws-shield/scanner`. The project does not include the dependency implementation, a package manifest, a lockfile, an exact version constraint, or an integrity record. Therefore, all substantive scanning behavior—including filesystem traversal and any possible network activity—occurs in code that could not be audited from the supplied project. The wrapper passes the user-controlled path directly to the external dependency and imposes no filesystem boundary or runtime capability restrictions. Supplying a path is expected functionality for a scanner and is not itself proof of malicious behavior. The risk arises because the unverified dependency receives that path while executing with the full permissions of the Node.js process. No project-local evidence confirms that the dependency currently exfiltrates data or performs other malicious actions. ### Attack Path 1. An attacker compromises or substitutes the `@claws-shield/scanner` package or one of its transitive dependencies. 2. The compromised dependency is installed or otherwise made available to the wrapper. 3. A user runs `scripts/run-scan.mjs` with a Skill directory or another accessible path. 4. The wrapper imports and executes the compromised module. 5. The supplied path is passed to attacker-controlled `scanSkill` code. 6. That code can inspect the target and perform any other operation allowed to the Node.js process, potentially including reading additional files or transmitting dat ...[truncated 636 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Include a `package.json` that pins `@claws-shield/scanner` to an exact audited version. - Commit a lockfile containing exact transitive versions and package integrity metadata. - Vendor or otherwise make the scanner implementation available for source review. - Establish a controlled dependency-update process with code review and integrity verification. - Resolve and canonicalize the requested path before scanning. - Where appropriate, restrict scanning to an explicitly approved directory tree and reject paths outside that boundary. - Run the scanner in a sandbox with read-only access to the selected target and no access to unrelated user files. - Disable outbound network access during scans unless the scanner has a documented and necessary network function. - Avoid exposing unnecessary environment variables or credentials to the scanner process. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill documentation instructs users to run `npx @claws-shield/cli` without pinning an exact version, which allows the latest published package to be fetched at execution time. If the package is later compromised, typosquatted, or a malicious version is published, users following the skill instructions could execute unreviewed code from the registry.

Static analysis

No suspicious patterns detected.