T08 · Insecure Dependencies
- Location
SKILL.md:55- Finding
Unpinned External npm Package Is Installed Globally
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 13-17 and 55-59
Vulnerability Type: Supply-chain exposure through an unpinned third-party dependency
Risk Level: MediumVulnerable Code
yaml install: - kind: node package: "@toani/vault-cli" bins: - toanibash npm install -g @toani/vault-cli@latestTechnical Analysis
The skill directs the agent to install
@toani/vault-cliglobally from the npm registry using the mutablelatestdistribution tag. The declarative installation metadata also specifies the package without an exact version. Consequently, the code executed during installation and subsequent CLI use can change without any corresponding modification to this reviewed skill.npm packages may execute installation lifecycle scripts and include transitive dependencies. Because the dependency implementation and lockfile are absent from the audited project, this audit cannot verify the code that receives access to authentication tokens, clipboard-assisted login, operating-system keychain storage, configured network endpoints, and remote sandbox operations.
This is a supply-chain weakness rather than evidence that the current package release is malicious. Exploitation requires compromise or malicious control of the package, its publishing account, a transitive dependency, or the package distribution channel.
Attack Path
- An attacker compromises the npm publisher account, package repository, build pipeline, or a relevant transitive dependency.
- The attacker publishes a malicious release and assigns it to the
latesttag. - An agent follows the skill instructions and runs the global installation command.
- npm downloads the attacker-controlled release and may execute its lifecycle scripts with the privileges of the invoking user.
- The installed
toaniexecutable subsequently runs attacker-controlled code when the documented login, cred ...[truncated 1013 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version in both the installation metadata and command examples. - Verify package provenance, signatures, publisher identity, and npm registry metadata before installation.
- Pin and review transitive dependencies using a lockfile or a controlled internal package mirror.
- Record and verify the expected package tarball integrity hash before execution.
- Prefer a project-local installation or an isolated execution environment over a global installation.
- Avoid running npm installation commands with administrative privileges.
- Acquire and inspect the package with lifecycle scripts disabled before allowing installation scripts to run.
- Run the CLI with least-privilege tokens and expose sensitive environment variables only for commands that require them.
- Establish a controlled update process in which each new package version is reviewed before the pinned version is changed.
- Replace
