T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Execution of an Unpinned Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18-32
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: Highbash # Basic scan npx @elliotllliu/agent-shield scan ./path/to/skill/ # Pre-install check (GitHub URL, npm package, or local path) npx @elliotllliu/agent-shield install-check https://github.com/user/repo # JSON output for programmatic use npx @elliotllliu/agent-shield scan ./path/to/skill/ --json # Fail if score is below threshold npx @elliotllliu/agent-shield scan ./path/to/skill/ --fail-under 70 # Scan .difypkg plugin archives npx @elliotllliu/agent-shield scan ./plugin.difypkgTechnical Analysis
Every documented workflow invokes
@elliotllliu/agent-shieldthroughnpxwithout specifying an exact package version. Depending on the local npm andnpxconfiguration, this can cause the package to be retrieved from the npm registry and executed immediately.Because the package reference is mutable, the code executed by a future user may differ from the code that existed when this Skill was audited. The project contains no package lockfile, integrity hash, vendored implementation, or local source code that would allow the effective scanner payload to be verified. The package's advertised scanning behavior therefore cannot be validated from this artifact.
This finding does not establish that the current npm package is malicious. It identifies an unsafe supply-chain boundary that would permit a compromised publisher account, malicious future release, registry compromise, or compromised transitive dependency to introduce arbitrary executable behavior.
Attack Path
- An attacker compromises the npm publisher account, release process, package, or one of its transitive dependencies.
- The attacker publishes a malicious release under the same package name.
- A user or agent follows the commands documented in
SKILL.md. npxresolves the u ...[truncated 956 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specific, reviewed version, such as
npx @elliotllliu/agent-shield@X.Y.Z, rather than resolving the latest release. - Add a lockfile and retain npm integrity metadata so installations resolve to reviewed artifacts.
- Prefer installing dependencies with a lockfile-enforcing command and execute the pinned local binary instead of allowing
npxto resolve a mutable package dynamically. - Publish or vendor the scanner source required by the Skill so reviewers can verify the implementation corresponding to the documented behavior.
- Verify package provenance, signatures, checksums, publisher identity, and release history before use.
- Disable or strictly control dependency lifecycle scripts where feasible.
- Run the scanner in an isolated environment with read-only access to only the intended scan target, no unnecessary credentials, minimal environment variables, and restricted outbound network access.
- Document the exact trusted version and update process, requiring a new security review before changing the pinned version.
- Pin the CLI to a specific, reviewed version, such as
