T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:10
- Finding
- Unpinned Third-Party Package Installation with Global CLI Exposure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10 and 30–34 **Vulnerability Type**: Unreviewed and unpinned third-party dependency installation **Risk Level**: Medium ### Vulnerable Code ```markdown - **npm**: `@lidh04/circle-chain-sdk` — local dependency: `npm i @lidh04/circle-chain-sdk` ``` ```bash ### Install globally npm install -g @lidh04/circle-chain-sdk circle --help ``` ### Technical Analysis The Skill directs users or agents to install `@lidh04/circle-chain-sdk` without pinning an exact version or supplying a lockfile, integrity hash, source commit, or other reproducible provenance. The package implementation is not included in the audited artifact, so its installation scripts and runtime behavior cannot be independently verified. The global installation command is particularly sensitive because it may: - Execute npm lifecycle scripts with the installing user's privileges. - Add a package-controlled `circle` executable to the user's command path. - Allow a future release to change behavior without any corresponding modification to this reviewed Skill. - Expose authentication credentials, payment passwords, wallet operations, and transfer data to a compromised dependency when users invoke the documented functionality. This is a supply-chain risk rather than proof that the named package is currently malicious. The risk arises from implicitly trusting mutable, unaudited package content. ### Attack Path 1. An attacker compromises the package publisher account, registry distribution channel, or a future package release. 2. The attacker publishes a modified version containing a malicious lifecycle script or CLI implementation. 3. A user follows the unpinned command `npm install -g @lidh04/circle-chain-sdk`. 4. npm retrieves the latest matching release and may execute its installation lifecycle scripts. 5. The package installs a globally available `circle` executable. 6. When the user subsequently performs login, wallet, pa ...[truncated 815 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a reviewed, exact version rather than allowing npm to resolve a mutable latest release. 2. Commit and enforce a lockfile containing registry integrity hashes. 3. Provide verifiable source provenance, including the corresponding repository commit and build process. 4. Audit package source, transitive dependencies, npm lifecycle scripts, and published tarball contents before recommending installation. 5. Prefer a project-local installation over `npm install -g`, and invoke the CLI through an explicit local path or a package script. 6. Disable lifecycle scripts during installation where compatible, for example by using npm's script-disabling controls. 7. Use registry allowlisting, package-signing or provenance verification, and automated dependency monitoring. 8. Clearly warn users that the package processes authentication and financial information, and advise them not to supply sensitive credentials until the installed artifact has been verified. ]]>
