T08 · Insecure Dependencies
- Location
SKILL.md:42- Finding
Unreviewable External npm Package Is Installed and Executed
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:42-64
Vulnerability Type: Supply-chain exposure through externally downloaded executable code
Risk Level: MediumVulnerable Code Snippet:
bash npm view @alipay/agent-payment@1.0.0 dist.integrity npm install @alipay/agent-payment@1.0.0 && npx @alipay/agent-payment@1.0.0 install-cli which alipay-bot && alipay-bot --versionTechnical Analysis
The Skill instructs the agent to download and execute
@alipay/agent-payment@1.0.0, but the dependency's implementation is not included in the audited project. As a result, its installation scripts,install-clibehavior, generated files, network destinations, and runtime handling of payment data cannot be verified from this artifact.Pinning the package version and validating
dist.integrityare useful safeguards against unintended package substitution. However, integrity verification only proves that the downloaded archive matches the archive published under that version; it does not establish that the archive itself is safe. Bothnpm installlifecycle scripts and the subsequentnpx ... install-clicommand can execute package-controlled code with the permissions of the agent process.The installed CLI is subsequently entrusted with payment links, session identifiers, order summaries, payment-state requests, optional model and operating-system metadata, and user-approved problem reports. This creates a material trust boundary around an unaudited executable dependency.
Attack Path
- A payment-related request activates the Skill.
- The required
alipay-botexecutable is not present. - After user approval and integrity comparison, the agent runs
npm install. - npm may execute package-defined installation lifecycle scripts.
- The agent then runs the package-controlled
install-clientry point throughnpx. - Package code executes with the filesystem, process, environme ...[truncated 939 chars]
- Remediation
View remediation
Remediation Suggestions
- Include the executable dependency's source code, build inputs, and lockfile in the review scope.
- Audit all npm lifecycle scripts and the
install-clientry point before deployment. - Where feasible, install with lifecycle scripts disabled and invoke only a separately verified binary.
- Verify the final installed CLI artifact against a published cryptographic digest, not only the npm archive integrity value.
- Document every file created or modified by
install-cliand all network endpoints contacted by the CLI. - Run installation and payment operations in a least-privilege sandbox with a restricted filesystem and an explicit outbound-network allowlist.
- Avoid exposing unrelated environment variables, credentials, conversation history, or host files to the dependency.
- Maintain a reviewed software bill of materials and continuously monitor the pinned package for security advisories.
