T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Unpinned Executable npm Dependency Has Access to an API Credential## Vulnerability Details **File Location**: `SKILL.md`, lines 5-16 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml openclaw: requires: env: - NANSEN_API_KEY bins: - nansen primaryEnv: NANSEN_API_KEY install: - kind: node package: nansen-cli bins: [nansen] allowed-tools: Bash(nansen:*) ``` ### Technical Analysis The skill installs the third-party npm package `nansen-cli` without specifying an exact version or verifying an integrity hash. It subsequently authorizes execution of the package-provided `nansen` binary through Bash. The installed executable operates in a context requiring `NANSEN_API_KEY`, making that credential potentially accessible to package runtime code. Because the reviewed project does not include the dependency's source code, lockfile, version constraint, or integrity metadata, the behavior of the installed package cannot be verified from this artifact alone. This is a supply-chain exposure rather than evidence that the current `nansen-cli` package is malicious. A compromised maintainer account, malicious future release, package replacement, registry compromise, or unintended incompatible update could cause installation of attacker-controlled code. ### Attack Path 1. An attacker compromises the package publisher, registry distribution path, or a future release of `nansen-cli`. 2. The skill installation process resolves the unpinned package to the attacker-controlled version. 3. Package installation hooks or the authorized `nansen` executable run attacker-controlled code. 4. The malicious code reads `NANSEN_API_KEY` from the process environment or abuses the credential directly. 5. The code may transmit the credential, perform unauthorized Nansen API operations, or access other resources available to the process. Exploitation requires compromise or malicious control of ...[truncated 573 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `nansen-cli` to an exact, reviewed version rather than resolving an unconstrained release. 2. Record and verify the package integrity hash using a lockfile or equivalent trusted installation metadata. 3. Restrict installation to the expected official package registry and prevent dependency substitution through untrusted registry configuration. 4. Review the pinned package, including installation lifecycle scripts and transitive dependencies, before deployment. 5. Run the executable in a sandbox with minimal filesystem, network, and operating-system permissions. 6. Expose `NANSEN_API_KEY` only to the specific command that requires it, rather than placing it in a broadly inherited environment. 7. Use a narrowly scoped API key, rotate it periodically, and monitor it for anomalous alert-management activity. 8. Add automated dependency provenance, signature, integrity, and vulnerability checks to the release process.
