T08 · Insecure Dependencies
- Location
SKILL.md:158- Finding
Unpinned npm Dependencies May Execute Mutable Third-Party Code
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 158–164
Vulnerability Type: Unpinned third-party dependencies and unsafe package execution
Risk Level: MediumVulnerable Code
markdown **Hardhat Plugin:** `npm install --save-dev @qelt/hardhat-verify@latest` ```bash npx hardhat qelt:verify --network qelt 0xCONTRACT_ADDRESSCLI Tool:
npm install -g qelt-verify→qelt-verify verify 0x... ./Contract.sol --compiler-version 0.8.20 --optimizetext The same unsafe installation pattern is repeated in `references/verification-guide.md`, lines 158–170: ```markdown Latest version: `@qelt/hardhat-verify@1.0.12` ```bash npm install --save-dev @qelt/hardhat-verify@latest npx hardhat qelt:verify --network qelt 0xCONTRACT_ADDRESSFeatures: auto-detects viaIR, EVM version, routes single vs multi-file automatically.
CLI Tool
Latest version:
qelt-verify@1.1.0bash npm install -g qelt-verify qelt-verify init qelt-verify verify 0xCONTRACT ./Contract.sol --compiler-version 0.8.20 --optimize --watchtext ### Technical Analysis The documented workflow installs `@qelt/hardhat-verify` through the mutable `latest` tag and installs `qelt-verify` without specifying a version. It then executes the installed tools. Consequently, the code reviewed today is not necessarily the code users will install later. npm packages can execute lifecycle scripts during installation. The packages also obtain direct code execution when users invoke the Hardhat task or CLI. If a package, maintainer account, release process, or transitive dependency is compromised, a malicious future release could execute arbitrary code with the permissions of the user running npm. Global installation of `qelt-verify` increases system-wide exposure and makes dependency provenance harder to reproduce. The guide identifies current package versions, but the installation commands do not pin those versions and provide no integrity or provenance verification. ### At ...[truncated 1549 chars]- Remediation
View remediation
Remediation Suggestions
-
Replace mutable or implicit versions with reviewed exact versions:
bash npm install --save-dev --save-exact @qelt/hardhat-verify@1.0.12 npm install --save-dev --save-exact qelt-verify@1.1.0 -
Avoid global package installation. Prefer a pinned local development dependency invoked through a package script or an explicitly pinned command.
-
Commit a lockfile and use reproducible installation in automated environments:
bash npm ci -
Review package provenance, publisher identity, lifecycle scripts, and transitive dependencies before recommending or upgrading a version.
-
Validate package integrity through the lockfile and npm registry integrity metadata. Where supported, require package provenance attestations.
-
Introduce a controlled dependency-update process in which new releases are reviewed and tested before the documentation's pinned version is changed.
-
Retain the direct HTTPS REST API workflow as the preferred option when installation of third-party executable tooling is unnecessary.
-
Update both
SKILL.mdandreferences/verification-guide.mdtogether so that their commands consistently use the same reviewed versions.
-
