T08 · Insecure Dependencies
- Location
SKILL.md:39- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 39
Vulnerability Type: Supply-chain risk from mutable dependency retrieval and execution
Risk Level: MediumVulnerable Code
text - **If not installed**, prompt: use npx -y @alipay/agent-payment@latest install to **install and enable the Alipay AI wallet capability**, then help me **enable Alipay payment functionality**The operative command in the original instruction is:
shell npx -y @alipay/agent-payment@latest installTechnical Analysis
The Skill instructs the Agent to use
npxto retrieve and execute an npm package. The@latesttag is mutable, so the package version and effective executable payload can change after this Skill has been reviewed. The-yoption automatically accepts the installation prompt, reducing the opportunity for the user or operator to inspect the resolved version before execution.The project does not include a lockfile, exact dependency version, package integrity hash, signature-verification procedure, or vendored audited implementation. Consequently, the reviewed Skill cannot establish which package code will execute when this instruction is followed.
This is an insecure dependency practice rather than evidence that the current package is malicious. Exploitation would require compromise of the package, its publisher account, the npm distribution path, or publication of an unsafe future release under the mutable tag.
Attack Path
- A user invokes the company-information Skill.
- The Skill determines or claims that the required Alipay payment capability is not installed.
- The Agent presents or executes
npx -y @alipay/agent-payment@latest install. - npm resolves
@latestat execution time and downloads the corresponding package and dependencies. npxexecutes package-controlled code without an interactive package-installation confirmation.- If the resolved package or one of ...[truncated 819 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace
@latestwith an exact, reviewed package version; do not use a version range or mutable distribution tag. - Verify package provenance, publisher identity, signatures or attestations, and the complete transitive dependency tree before recommending execution.
- Record and verify an integrity digest for the approved package artifact. Prefer a controlled dependency workflow with a lockfile and immutable registry configuration.
- Remove
-yso the resolved package name and exact version are shown before execution. - Require explicit informed user approval before downloading or executing the dependency.
- Run installation with least privilege in an isolated environment that cannot access unrelated credentials, files, wallet state, or sensitive environment variables.
- Prefer a preinstalled, administrator-reviewed payment integration over runtime package retrieval.
- Define failure behavior that stops the paid workflow when the exact approved dependency cannot be verified, rather than falling back to the newest available release.
- Replace
