T08 · Insecure Dependencies
- Location
SKILL.md:14- Finding
Unpinned npm Dependency Installation and Implicit npx Package Retrieval
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 14–17
Vulnerability Type: Supply-chain risk from unverified dependency installation and executable package resolution
Risk Level: MediumVulnerable Code Snippet
text npm install npm run tauri dev npm run build cargo check npx tauri build --bundles nsisTechnical Analysis
The skill instructs the agent to install npm dependencies and execute the Tauri CLI through
npx, but it does not require an audited lockfile, exact dependency versions, package-integrity verification, or offline resolution.npm installcan execute package lifecycle scripts with the privileges of the user running the agent. In addition, when the requested executable is unavailable locally,npxmay retrieve a package from the configured npm registry and execute it. This creates a supply-chain execution boundary in which the effective code may differ from what was reviewed in the skill.The referenced
assets/wb-skin-studio/template, itspackage.json, and its dependency lockfile are absent from the audited project. Therefore, the provenance, versions, lifecycle scripts, and integrity of the dependencies that these commands would install cannot be verified from the available artifact.Attack Path
- An attacker compromises a dependency used by the copied template, influences dependency resolution, substitutes the template, or controls the configured npm registry.
- The agent follows the skill and runs
npm install. - npm resolves and installs the attacker-controlled package. A lifecycle script such as
preinstall,install, orpostinstallexecutes automatically if present. - Alternatively, if a verified local Tauri CLI is unavailable, the agent runs
npx tauri build --bundles nsis, causingnpxto resolve and potentially download executable package code. - The malicious package executes with the privileges and environmental access of the developer or agent process.
This path is con ...[truncated 880 chars]
- Remediation
View remediation
Remediation Suggestions
- Include the referenced template,
package.json, and an audited dependency lockfile in the reviewed artifact. - Pin dependencies to exact versions and review all transitive dependencies and lifecycle scripts before use.
- Use
npm cirather thannpm installso installation fails when the lockfile and manifest disagree. - Use
npm ci --ignore-scriptswhere feasible. Explicitly document and separately approve any lifecycle scripts required by the build. - Require registry integrity controls, including the standard lockfile integrity hashes and a trusted, explicitly configured npm registry.
- Install and lock the Tauri CLI as a local development dependency rather than allowing implicit
npxretrieval. - Invoke only the verified local executable, preferably with a command that prohibits package installation, such as:
text npm exec --offline --no -- tauri build --bundles nsis- Build in an isolated, least-privileged environment without unrelated credentials or sensitive environment variables.
- Generate and verify checksums or signatures for release installers to detect build-output tampering.
- Include the referenced template,
