T08 · Insecure Dependencies
- Location
SKILL.md:13- Finding
Unpinned Third-Party npm Package Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13–17 and 27–29
Vulnerability Type: Unpinned third-party dependency installation and execution
Risk Level: MediumVulnerable code:
yaml install: - id: npm-global kind: node package: slg-cli bins: [slg] label: "Install slg-cli (npm global)"bash npm install -g slg-cli # or run without installing npx slg-cli <command>Technical Analysis
The skill instructs users or agents to install or directly execute
slg-cliwithout specifying an exact version or verifying the package's integrity. Both commands resolve a mutable package version from the npm registry. The global installation can also run npm lifecycle scripts and place an executable in the user's global binary path. Thenpxalternative may download and immediately execute the latest matching registry artifact.Consequently, the code ultimately executed is not fixed to the artifact reviewed in this audit. If the npm publisher account, package, release process, or transitive dependency chain is compromised, a malicious package version could execute arbitrary code under the invoking user's account. The GitHub homepage declared in the metadata does not establish that a downloaded npm artifact corresponds to reviewed source code.
Attack Path
- An attacker compromises the
slg-clinpm package, its publisher account, release pipeline, or a dependency included in a future release. - The attacker publishes a malicious version under the same package name.
- A user or agent follows
SKILL.mdand runsnpm install -g slg-cliornpx slg-cli <command>. - npm resolves the mutable malicious release and may execute its lifecycle scripts during installation.
- The installed or downloaded CLI executes with the privileges of the invoking user.
- Malicious code can access resources available to that user, including the current repository, G ...[truncated 599 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
slg-clito a specific, audited version in both metadata and command examples, such asslg-cli@X.Y.Z. - Verify the package using a trusted integrity digest, signed provenance, or an audited lockfile before execution.
- Avoid global installation where possible; install the dependency in an isolated project directory or disposable sandbox with minimal filesystem and network permissions.
- Avoid unrestricted
npxexecution of an unversioned package. Use an exact version and configure npm not to accept an unexpected package resolution. - Disable npm lifecycle scripts during installation with
--ignore-scriptswhere the package can operate without them. - Document the expected npm registry, publisher identity, release provenance, and checksums so consumers can validate the artifact.
- Review and pin transitive dependencies, and use automated dependency and provenance monitoring for future releases.
- Pin
