T08 · Insecure Dependencies
Error
- Location
- SKILL.md:10
- Finding
- Unpinned Third-Party CLI Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10–13 **Vulnerability Type**: Unpinned third-party package installation **Risk Level**: High ### Vulnerable Code ```yaml install: - kind: node package: nansen-cli bins: [nansen] ``` ### Technical Analysis The Skill requests installation of `nansen-cli` without specifying an exact version, lockfile, integrity hash, or other provenance control. Consequently, the package resolved during installation may differ from the version originally reviewed. Because npm packages execute locally and may run installation lifecycle scripts, compromise of the package, its publication account, or a transitive dependency could introduce arbitrary code into the Agent environment. The Skill also requires `NANSEN_API_KEY`, making that credential potentially accessible to a malicious CLI process. ### Attack Path 1. An attacker compromises the `nansen-cli` package, its maintainer account, or a transitive dependency. 2. The attacker publishes a malicious version under the expected package name. 3. The Agent installs the package without enforcing an audited version or integrity value. 4. Malicious package code executes during installation or when the `nansen` binary is invoked. 5. The code accesses available environment variables, including `NANSEN_API_KEY`, and may transmit credentials or execute additional actions using the Agent's operating-system privileges. ### Impact Assessment Successful exploitation could allow arbitrary code execution with the privileges of the process installing or running the Skill. Potential consequences include theft of the Nansen API key, unauthorized API activity, manipulation of analytics results, access to files available to the Agent, and compromise of other credentials exposed to the same process. The scope is limited by the permissions, filesystem access, network access, and environment variables granted to the Agent runtime. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `nansen-cli` to an exact, reviewed version rather than resolving the latest available release. - Enforce package integrity through a lockfile and registry-provided integrity hashes. - Verify that the package name and publisher correspond to the official Nansen distribution. - Review the package and its transitive dependency tree before deployment. - Disable package lifecycle scripts where feasible, or install dependencies in an isolated build environment. - Run the CLI in a sandbox with minimal filesystem and network permissions. - Expose `NANSEN_API_KEY` only to the specific command that requires it, and use a narrowly scoped, revocable API key. - Establish a controlled dependency-update process that requires review before changing the pinned version. ]]>
