T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:25
- Finding
- Unpinned Security-Critical npm Dependencies## Vulnerability Details **File Location**: `SKILL.md`, lines 25–30 **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```markdown ## Dependencies This skill requires the `tweetnacl` and `tweetnacl-util` npm packages for Ed25519 cryptography. ```bash npm install tweetnacl tweetnacl-util ``` ``` ### Technical Analysis The documented installation command resolves mutable package versions from the npm registry. The project provides neither exact reviewed versions nor a lockfile with integrity information. Consequently, separate installations may retrieve different dependency versions. These packages operate directly on Ed25519 private-key material and transaction signatures. If a package, transitive dependency, maintainer account, or registry delivery path were compromised, attacker-controlled code could run in the same environment as the generated wallet secret key. A malicious update could capture key material, alter destination addresses or transaction fields before signing, or forge misleading signing behavior. The audit found no evidence that the currently named packages are malicious. The vulnerability is the unsafe, non-reproducible dependency acquisition process documented by the Skill. ### Attack Path 1. An attacker compromises a dependency release channel, maintainer account, or relevant package version. 2. The victim follows the documented `npm install tweetnacl tweetnacl-util` command. 3. npm resolves and installs the compromised mutable version. 4. Malicious installation or runtime code executes in the wallet-signing environment. 5. When the Skill generates or uses an Ed25519 keypair, the dependency accesses the secret key or modifies data passed for signing. 6. The attacker can exfiltrate key material through a network channel or cause the victim to authorize manipulated game transactions. ### Impact Assessment Successful exploitation would provide code execution with the privileges of the ...[truncated 516 chars]
- Remediation
- ## Remediation Suggestions 1. Pin each dependency to a reviewed exact version rather than allowing npm to resolve the latest release: ```json { "dependencies": { "tweetnacl": "REVIEWED_EXACT_VERSION", "tweetnacl-util": "REVIEWED_EXACT_VERSION" } } ``` 2. Commit `package.json` and `package-lock.json` so installations are reproducible and package integrity hashes are enforced. 3. Replace the documented installation workflow with: ```bash npm ci --ignore-scripts ``` Use `--ignore-scripts` where compatible to prevent dependency lifecycle scripts from executing during installation. 4. Review direct and transitive dependencies before updating them, and require controlled dependency-update approval. 5. Run dependency installation and wallet operations in a least-privileged, isolated environment with restricted filesystem and network access. 6. Keep secret keys outside source files, logs, and environment locations broadly accessible to dependencies. 7. Verify package provenance and registry configuration, and use automated supply-chain scanning for lockfile changes.
