T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:27
- Finding
- Unpinned Third-Party npm Package Retrieval and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 27–42 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash # Scan specific files npx slopcheck SKILL.md README.md # Scan a directory recursively (.md, .yml, .yaml, .json, .cursorrules) npx slopcheck . # Scan with JSON output for programmatic use npx slopcheck --json . # Ignore known-good internal packages npx slopcheck --ignore my-internal-pkg,another-known-pkg . # Control registry check concurrency npx slopcheck --concurrency 5 . ``` ### Technical Analysis The documented commands invoke `slopcheck` through `npx` without specifying an exact package version or integrity constraint. If the package is not already available locally, `npx` can retrieve a release from the npm registry and execute its CLI code. The effective executable can therefore differ from the version reviewed when this Skill was published. The project contains only `SKILL.md`; it does not include the package implementation, a lockfile, checksums, or provenance verification. Consequently, the behavior of the remotely resolved executable cannot be validated from the audited artifact. A compromised maintainer account, malicious package release, registry compromise, or future unsafe release could convert these otherwise legitimate-looking commands into arbitrary local code execution. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or another component of the package publication process. 2. The attacker publishes a malicious release under the existing `slopcheck` package name. 3. A user or agent follows one of the documented unversioned `npx slopcheck` commands. 4. `npx` resolves and downloads the mutable package release from the npm registry. 5. Package lifecycle behavior or the CLI entry point executes attacker-controlled code under the invoking user's account. 6. The malicious p ...[truncated 804 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the command to an exact, reviewed release rather than resolving the latest available version: ```bash npx --yes slopcheck@0.1.2 SKILL.md README.md npx --yes slopcheck@0.1.2 . ``` 2. Verify the selected release's npm provenance, publisher identity, and integrity before recommending execution. 3. Prefer installing the reviewed version through a lockfile-backed development dependency and invoke it with `npm exec --offline` where practical. 4. Include or reference the reviewed source revision so users can compare the npm artifact against its source. 5. Run the tool with least privilege in an isolated environment without unrelated credentials or sensitive environment variables. 6. In CI, restrict outbound network access and use an approved package mirror or allowlist after the dependency has been reviewed.
