T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Executable npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 12-15 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ```yaml install: - kind: node package: nansen-cli bins: [nansen] ``` ### Technical Analysis The Skill installs `nansen-cli` without specifying an exact version or package integrity hash. Consequently, installation may resolve to a future release whose contents differ from the version originally reviewed. Because the installed package provides the `nansen` executable invoked by the Skill, its runtime code operates with the privileges available to the Agent. The Skill also requires `NANSEN_API_KEY`. A malicious or compromised package release could attempt to read that environment variable or perform other actions permitted by the execution environment. The package name and documented npm and GitHub sources are consistent, and the reviewed file contains no evidence that the current package is malicious. The risk arises from mutable, unverified dependency resolution. ### Attack Path 1. An attacker compromises the package publisher, registry account, release pipeline, or a future package release. 2. The attacker publishes a modified `nansen-cli` version under the same package name. 3. The Skill installation process resolves the unversioned dependency to the compromised release. 4. Malicious package lifecycle code or the installed `nansen` executable runs with the Agent's privileges. 5. The compromised code may access the required `NANSEN_API_KEY`, inspect other data available to the process, make unauthorized network requests, or execute commands within the Agent's permission boundary. ### Impact Assessment Successful exploitation could expose `NANSEN_API_KEY` and any other environment data readable by the process. It could also permit arbitrary operations within the privileges and filesystem or network access granted to package installati ...[truncated 179 chars]
- Remediation
- ## Remediation Suggestions - Pin `nansen-cli` to an exact, reviewed version rather than resolving the latest available release. - Use a lockfile and verify the package integrity hash during installation. - Re-audit the dependency before intentionally upgrading the pinned version. - Disable npm lifecycle scripts where compatible with the package's documented installation requirements. - Verify the expected npm publisher, repository, and package provenance in the deployment pipeline. - Run package installation and CLI execution in a restricted environment with minimal filesystem and network permissions. - Provide `NANSEN_API_KEY` only to the runtime step that requires it, and prevent package installation hooks from receiving the secret where feasible.
