T08 · Insecure Dependencies
Warning
- Location
- readme.md:41
- Finding
- Unpinned External Package Receives Payment Provider Credentials## Vulnerability Details **File Location**: `readme.md:41-60`, `readme.md:102`; duplicated in `skill.md:99-124` **Vulnerability Type**: Unverified and unpinned third-party dependency **Risk Level**: Medium The documentation instructs users to install an external npm package without pinning an exact version, providing a lockfile, or supplying integrity verification. The application then passes a Stripe API key to code whose implementation is absent from this project. Relevant code from `readme.md:41-60`: ```bash npm install openclaw-agent-payment-rail ``` ```bash export STRIPE_API_KEY="sk_test_..." ``` ```typescript import { PaymentRail } from 'openclaw-agent-payment-rail'; const rail = new PaymentRail(); // Initialize await rail.initialize({ provider: 'stripe', apiKey: process.env.STRIPE_API_KEY, }); ``` The README also recommends a global installation at `readme.md:102`: ```bash npm install -g openclaw-agent-payment-rail ``` Equivalent instructions appear in `skill.md:99-124`: ```bash npm install openclaw-agent-payment-rail ``` ```bash # Stripe export STRIPE_API_KEY="sk_test_..." # PayPal (coming soon) export PAYPAL_CLIENT_ID="..." export PAYPAL_CLIENT_SECRET="..." ``` ```typescript import { PaymentRail } from 'openclaw-agent-payment-rail'; const rail = new PaymentRail(); await rail.initialize({ provider: 'stripe', apiKey: process.env.STRIPE_API_KEY, }); ``` ### Technical Analysis The artifact contains only documentation and does not include the implementation of the advertised payment operations. All substantive functionality is delegated to `openclaw-agent-payment-rail`. The installation command does not pin an exact version. npm may therefore resolve a later release than the one originally reviewed. The artifact also provides no lockfile, package integrity hash, vendored source, signed provenance, or checksum through which users can verify the installed implementation. npm packages may execute lifecycle scripts during installation ...[truncated 2228 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version rather than allowing npm to select the latest compatible release. 2. Commit a lockfile containing npm integrity metadata and require reproducible, lockfile-enforced installation such as `npm ci`. 3. Include or vendor the implementation source in the audited artifact so payment and credential-handling behavior can be reviewed. 4. Publish and verify release provenance, signatures, or cryptographic checksums for the approved package. 5. Avoid recommending global installation unless the CLI is essential. Prefer a project-local dependency invoked through a pinned script. 6. Where compatible, install with lifecycle scripts disabled and explicitly review any scripts before enabling them. 7. Use restricted payment-provider credentials with only the permissions required for the documented operations. 8. Use test-mode keys during development, isolate production credentials, rotate keys regularly, and revoke them immediately after suspected dependency compromise. 9. Run payment integrations in a constrained service account or container with minimal filesystem access, restricted outbound networking, and no unrelated secrets in its environment. 10. Add dependency monitoring and require security review before updating the approved package version.
