T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:9
- Finding
- Unpinned Executable npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 9–13 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ```yaml install: - kind: node package: nansen-cli bins: [nansen] ``` ### Technical Analysis The skill declares `nansen-cli` as an installable npm dependency without specifying an exact version or an integrity constraint. Consequently, installation may resolve to a future package release that differs from the version originally reviewed. Because the installed package exposes the `nansen` executable and the skill requires `NANSEN_API_KEY`, code contained in a compromised or unexpectedly changed package release may execute in the Agent's environment with access to that credential. This creates a software supply-chain risk even though the audited skill file contains no direct malicious payload. ### Attack Path 1. An attacker compromises the `nansen-cli` package, its publisher account, or its release process. 2. The attacker publishes a malicious package version that can be selected by an unpinned installation. 3. The skill installation process retrieves and installs the malicious release. 4. The Agent invokes the installed `nansen` executable as instructed by the skill. 5. Malicious package code executes with the operating-system privileges of the Agent process. 6. The code may read `NANSEN_API_KEY`, access other process-readable data, issue unauthorized network requests, or perform other actions permitted to the Agent account. ### Impact Assessment Successful exploitation could expose `NANSEN_API_KEY` and allow unauthorized use of the associated Nansen account or API quota. Arbitrary code could also operate within the permissions granted to the Agent process, potentially reading accessible files, communicating over available network channels, or modifying user-writable resources. The precise scope depends on the runtime sandbox, file ...[truncated 201 chars]
- Remediation
- ## Remediation Suggestions - Pin `nansen-cli` to a reviewed, exact version rather than allowing installation-time resolution to an arbitrary future release. - Use a lockfile and package-integrity verification where supported, retaining the expected integrity hash in reviewed project configuration. - Verify the package publisher, provenance, and release signatures before updating the pinned version. - Perform dependency and malware scanning whenever the pinned package is upgraded. - Inject `NANSEN_API_KEY` only into the specific command invocation that requires it, and avoid exposing unrelated credentials to the CLI process. - Run the executable with least privilege in a restricted environment with limited filesystem and network access. - Rotate the API key immediately if dependency compromise is suspected, and monitor the associated account for unauthorized activity.
