T08 · Insecure Dependencies
- Location
SKILL.md:33- Finding
Unpinned npm Packages Executed Through npx
- Content
View full analysis
--pubkey 9V6Pn19kiUA5Rn6JpQfNduanvGt2aXGwsarosNfa2Ldf' ); ``` ```bash # SKILL.md:753 npx clawhub install twzrd-clawrouter ``` ### Technical Analysis The documented workflow tells users to download and execute npm packages through `npx` without pinning all packages to exact, audited versions. In particular: - `clawhub` has no version constraint. - `tsx` has no version constraint. - `twzrd-receipt-verifier@^1.3.0` uses a caret range and can resolve to a later compatible release. The project contains no package manifest or lockfile that fixes these tools and their transitive dependencies to reviewed versions. Consequently, the code executed by these commands can change after the Skill has been audited. This creates a supply-chain trust boundary in which package maintainers, compromised publisher accounts, registry infrastructure, or compromised transitive dependencies can affect the executable payload. This is particularly significant because the Skill operates in the context of cryptocurrency payment routing and wallet-backed proxy software. Although the audited TypeScript does not read private keys or directly sign transactions, an npm package executed by `npx` runs with the permissions of the invoking user and is not constrained by the Skill's declared TypeScript behavior. ### Attack Path 1. An attacker compromises a referenced npm package, its publisher account, or one of its resolved dependencies. 2. The attacker publishes a malicious version that remains elig ...[truncated 1323 chars]- Remediation
View remediation
install twzrd-clawrouter npx tsx@ example.ts npx twzrd-receipt-verifier@1.3.0 --pubkey 9V6Pn19kiUA5Rn6JpQfNduanvGt2aXGwsarosNfa2Ldf ``` 2. Add a `package.json` and committed lockfile containing exact reviewed dependency resolutions. Install with: ```bash npm ci ``` 3. Prefer invoking locally installed, lockfile-controlled binaries rather than allowing `npx` to download packages on demand: ```bash npm exec --offline -- tsx example.ts ``` 4. Record and verify package integrity metadata or trusted release signatures before execution. Document the expected package version, registry origin, and integrity hash. 5. Review transitive dependencies and package lifecycle scripts. Where compatible with the required package, install using `--ignore-scripts` and explicitly run only the audited entry point. 6. Replace the caret constraint on the receipt verifier with an exact version. Upgrade it only after reviewing and testing the new artifact. 7. Run payment-related tooling under a dedicated, least-privileged operating-system account with no access to valuable wallet secrets or unrelated credentials. ]]>
