T08 · Insecure Dependencies
- Location
scripts/run.sh:8- Finding
Unpinned npm Package Is Automatically Downloaded and Executed
- Content
View full analysis
Vulnerability Details
File Location:
scripts/run.sh:8
Related Locations:SKILL.md:6,SKILL.md:17
Vulnerability Type: Unpinned third-party dependency and automatic remote package execution
Risk Level: MediumVulnerable Code
sh if command -v npx >/dev/null 2>&1; then exec npx -y @edgefinder/cli "$@" fiThe corresponding package metadata and documentation also omit an exact version:
json "package":"@edgefinder/cli"markdown The wrapper prefers the installed `edgefinder` binary and falls back to `npx -y @edgefinder/cli`.Technical Analysis
The fallback invokes
npxwith-y, automatically accepting package installation and executing@edgefinder/cliwithout an exact version or integrity constraint. npm therefore resolves whichever package release is current at execution time. The effective executable can change after this Skill has been audited.This creates a supply-chain trust boundary: the wrapper delegates local code execution to mutable registry content. A compromised package publisher, malicious future release, or npm package-distribution compromise could cause arbitrary attacker-controlled JavaScript and package lifecycle behavior to execute. The local script does not independently verify the downloaded artifact's version, checksum, provenance, or signature.
Attack Path
- An attacker compromises the
@edgefinder/clipublisher, its release pipeline, or the relevant package-distribution channel. - The attacker publishes a malicious release that is selected by npm's unversioned resolution.
- A host invokes
scripts/run.shwithout an installededgefinderexecutable but withnpxavailable. npx -y @edgefinder/cliautomatically retrieves and executes the resolved package without user confirmation.- The malicious package runs with the privileges and environment of the user or Agent process.
Impact Assessment
A compromised dependency could execute arbitrary code with the ...[truncated 544 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
@edgefinder/clito a reviewed exact version rather than relying on npm's current resolution. - Verify the downloaded package using an approved integrity hash, lockfile, trusted artifact registry, or equivalent provenance mechanism.
- Remove the automatic
npx -yfallback. Require an explicit, separately reviewed installation step when the binary is unavailable. - Prefer a locally installed dependency managed through a committed lockfile and reproducible deployment process.
- Run the CLI with least privilege and a restricted environment. Pass only required environment variables and isolate filesystem and network access where practical.
- Establish dependency monitoring and a controlled upgrade process so new releases are reviewed before execution.
- Pin
