T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned npm Packages Execute in Credential-Sensitive Workflows## Vulnerability Details **File Location**: `SKILL.md:15-26`; `references/30-bridge-and-faucet.md:36-41`; `references/30-bridge-and-faucet.md:53-55` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```yaml install: - kind: node package: "@zeko-labs/bridge-cli" bins: - zeko-bridge - kind: node package: "@zeko-labs/faucet-cli" bins: - zeko-faucet - kind: node package: o1js ``` ```bash MINA_PRIVATE_KEY=... npx -y @zeko-labs/bridge-cli bridge \ --from mina:testnet \ --to zeko-m:testnet \ --amount 1 \ --json ``` ```bash MINA_PRIVATE_KEY=... npx -y @zeko-labs/bridge-cli doctor ``` ### Technical Analysis The Skill does not pin exact versions or integrity hashes for its npm dependencies. The documented `npx -y` commands automatically resolve, download, and execute a package without interactive confirmation. Consequently, the code executed can change after the Skill has been reviewed. The bridge package executes while `MINA_PRIVATE_KEY` is available in its process environment. npm packages and their transitive dependencies can execute package code and lifecycle scripts with the current user's permissions and environment access. A compromised future release, hijacked maintainer account, or malicious transitive dependency could read the wallet key, alter transaction parameters, or execute arbitrary local commands. This is particularly sensitive because bridge operations involve signing transactions and transferring assets. Although no currently embedded malicious package code was found in the audited files, the unpinned runtime resolution creates a supply-chain trust boundary that is not adequately constrained. ### Attack Path 1. An attacker compromises `@zeko-labs/bridge-cli`, one of its transitive dependencies, or the relevant package-publishing account. 2. The attacker publishes a maliciou ...[truncated 1048 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every npm dependency to an exact reviewed version rather than relying on an implicitly resolved latest version. 2. Use a committed lockfile and verify package integrity hashes during installation. 3. Replace runtime `npx -y` execution with a previously installed, reviewed, version-pinned binary. 4. Verify publisher identity, package provenance, signatures, and release integrity before updating. 5. Disable or carefully control npm lifecycle scripts where operationally possible. 6. Run each command in an isolated environment that exposes only the credential required for that specific operation. 7. Ensure the bridge tool cannot access unrelated credentials, project files, SSH keys, or cloud tokens. 8. Require explicit user confirmation of the source, destination, amount, fee, and network immediately before signing. 9. Document an approved package version and a controlled dependency-update review process.
