T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:31
Vulnerability Type: Supply-chain exposure through an unpinned npm dependency
Risk Level: MediumVulnerable Code
bash npm install viemTechnical Analysis
The skill instructs users to install
viemwithout specifying an exact reviewed version. Consequently, npm resolves whichever release is current under the applicable registry and dependency-resolution configuration at installation time. The audited skill therefore does not guarantee that users execute the same dependency version that was originally reviewed.npm installation may execute lifecycle scripts belonging to resolved packages or their transitive dependencies. This is particularly sensitive because the package is installed into a wallet-management project that may contain
AGENT_PRIVATE_KEYin its environment or.envfile. A compromised future release, compromised transitive dependency, registry substitution, or malicious registry configuration could introduce code with access to the user's filesystem, environment, and network under the privileges of the invoking account.The audit did not find evidence that the currently named
viempackage is malicious. The finding concerns the unsafe, non-reproducible installation instruction and the resulting supply-chain attack surface.Attack Path
- An attacker compromises a future package release, a transitive dependency, or the package-resolution infrastructure used by the victim.
- The victim follows the skill instruction and runs
npm install viem. - npm resolves the attacker-controlled or compromised version because no exact version or reviewed lockfile is required.
- Malicious package code or an installation lifecycle script runs with the victim user's privileges.
- The payload searches the project environment, process environment, or local files for wallet credentials such as
AGENT_PRIVATE_KEY. - The payload can trans ...[truncated 1376 chars]
- Remediation
View remediation
Remediation Suggestions
-
Replace the floating installation command with an exact, reviewed version, for example:
bash npm install --save-exact viem@<reviewed-version> -
Generate, review, and commit
package-lock.json, then instruct users and automation to perform reproducible installation:bash npm ci -
Verify package provenance and integrity before updating the pinned version. Review direct and transitive dependency changes as part of every upgrade.
-
Where compatible with the dependency and workflow, suppress lifecycle scripts during installation:
bash npm ci --ignore-scripts -
Install dependencies before creating or loading the wallet secret. Keep
.envoutside unnecessary tool access, restrict its filesystem permissions, and ensure it remains excluded from version control. -
Use a dedicated low-value wallet with only the funds required for registration, limiting losses if the development environment or dependency chain is compromised.
-
