T08 · Insecure Dependencies
- Location
SKILL.md:20- Finding
Unpinned npm Package Is Downloaded and Executed at Runtime
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 20
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code Snippet:
markdown All commands use `npx rulespec` — no global install needed. npx downloads and runs it automatically.Technical Analysis
The skill directs the agent to execute
npx rulespecwithout specifying an exact package version, integrity hash, lockfile, or other trusted provenance control.npxmay retrieve the package from the configured npm registry and execute package-controlled code on the local system.Because dependency resolution occurs at invocation time, the package code ultimately executed can differ from the code available when this skill was audited. A compromised maintainer account, malicious package release, registry compromise, dependency confusion caused by an untrusted registry configuration, or compromise of the package's transitive dependencies could therefore introduce arbitrary executable behavior.
The audited project does not itself contain a malicious script, and no evidence establishes that the current
rulespecpackage is malicious. The risk arises from instructing automatic execution of an unpinned, remotely retrieved dependency without verification.Attack Path
- An attacker compromises the npm package, a maintainer account, a transitive dependency, or the registry resolution path and publishes or serves a malicious version.
- An agent follows
SKILL.mdand invokes a command usingnpx rulespec. npxresolves and downloads the package version available through the configured registry.- Package lifecycle hooks or CLI entry-point code execute under the invoking user's account.
- The malicious code performs actions permitted by that account, potentially including reading accessible files, altering project content, accessing environment variables, or making network requests.
Impact Assessment
Suc ...[truncated 499 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to an exact reviewed version, for example
npx --yes rulespec@X.Y.Z, rather than resolving the latest release. - Declare the package in a project manifest and commit a lockfile containing integrity metadata.
- Install dependencies with a deterministic command such as
npm ciand execute the locked local binary withnpx --no-install rulespecor an equivalent package script. - Verify the package's official registry namespace, repository, publisher identity, signatures or provenance attestations, and integrity hashes.
- Review direct and transitive dependency changes before upgrades and use automated dependency and provenance scanning.
- Disable or strictly control package lifecycle scripts where operationally feasible.
- Run the CLI in a sandbox or least-privileged environment with restricted filesystem, credential, and network access.
- Pin the CLI to an exact reviewed version, for example
