T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:24
- Finding
- Unpinned Third-Party Financial SDK Introduces Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, lines 24-26 **Vulnerability Type**: Unpinned and unverifiable third-party dependency **Risk Level**: Medium ```bash npm install @payspawn/sdk ``` ### Technical Analysis The Skill instructs users to install `@payspawn/sdk` without specifying a reviewed version or integrity hash. The audited project does not include a package lockfile, vendored implementation, source-code reference, or other mechanism for verifying the exact package contents. Consequently, the installed code may change after this Skill has been reviewed. npm packages can also execute lifecycle scripts during installation. At runtime, this SDK is given access to `PAYSPAWN_CREDENTIAL` and is used to initiate USDC payments. A compromised package release, package-maintainer account, or dependency in the package's transitive dependency tree could therefore execute code under the installing user's account, access the spending credential, or manipulate payment operations. The audit does not establish that the current package is malicious. The finding concerns the Skill's reliance on an unpinned, externally mutable dependency for security-sensitive financial operations without reproducible dependency controls. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or a transitive dependency and publishes a malicious release. 2. A user follows the Skill and runs `npm install @payspawn/sdk`. 3. Because no version is pinned, npm resolves a currently available compatible release rather than a specific audited artifact. 4. Malicious lifecycle code may execute during installation, or malicious SDK logic may execute when the package is imported and used. 5. At runtime, the compromised SDK can attempt to read `PAYSPAWN_CREDENTIAL`, redirect or modify payment requests, transmit sensitive information, or consume the spending authorization available to the credential. ### Impact Assessment ...[truncated 713 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `@payspawn/sdk` to an exact, independently reviewed version rather than installing the latest release implicitly. 2. Provide and commit a lockfile that records the complete transitive dependency graph and integrity hashes. 3. Publish the SDK's authoritative source repository, release-signing process, package provenance, and corresponding smart-contract addresses in the Skill documentation. 4. Verify package provenance and npm integrity metadata before installation; consider using signed releases and reproducible builds. 5. Disable npm lifecycle scripts during installation where compatible, such as through `npm install --ignore-scripts`, and explicitly document any scripts that are genuinely required. 6. Audit the SDK, its transitive dependencies, and the deployed smart contracts before using credentials backed by funded accounts. 7. Apply restrictive daily, per-transaction, velocity, and recipient limits, and use a dedicated low-value credential so dependency compromise has a bounded financial impact. 8. Implement dependency monitoring and require security review before upgrading the pinned SDK version.
