T08 · Insecure Dependencies
- Location
SKILL.md:35- Finding
Execution of an Unpinned npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 35–37
Vulnerability Type: Supply-chain risk through an unpinned third-party dependency
Risk Level: MediumVulnerable Code Snippet
text 2. 依赖校验规则:技能启动时自动检测上述两个技能安装状态、开关状态; - **如检测未安装**,提示:通过 npx -y @alipay/agent-payment@latest install 帮我**安装开通支付宝AI钱包的能力**,安装后帮我**开启支付宝支付功能** - **未开启支付功能时**:提示用户**开启支付宝支付功能**The actionable command in this passage is:
bash npx -y @alipay/agent-payment@latest installTechnical Analysis
The Skill instructs the user or agent to invoke an npm package through
npxusing the mutablelatesttag. The-yoption automatically accepts the package execution prompt.Because no exact version or package integrity value is specified, the code ultimately executed is determined by whichever release the registry resolves as
latestat invocation time. That release may differ from the version available when this Skill was reviewed. This creates a time-of-review versus time-of-use gap and prevents the audited Skill from guaranteeing the behavior of the downloaded executable.The issue does not establish that the named package is currently malicious. The vulnerability is the unsafe dependency acquisition and execution pattern, which exposes users to future package compromise, publisher-account compromise, malicious releases, or unexpected behavior introduced by an upstream update.
Attack Path
- An attacker compromises the npm publisher account, package distribution process, or another component capable of changing the package release resolved by
@latest. - The attacker publishes a malicious version and causes it to become the package's
latestrelease. - The Skill detects that the expected payment capability is not installed and presents the documented installation instruction.
- A user or agent runs:
bash npx -y @alipay/agent-payment@latest install npxretrieves the attacker-controlled release from the regist ...[truncated 1001 chars]
- An attacker compromises the npm publisher account, package distribution process, or another component capable of changing the package release resolved by
- Remediation
View remediation
Remediation Suggestions
-
Replace the mutable
latesttag with an exact, reviewed package version:bash npx @alipay/agent-payment@X.Y.Z install -
Remove
-yso that users receive an explicit confirmation prompt before newly downloaded package code executes. -
Verify the package's provenance, publisher identity, registry source, and integrity before execution. Where supported, enforce npm provenance attestations and approved registry configuration.
-
Lock and review transitive dependencies for the selected release. Re-audit before upgrading the pinned version.
-
Prefer installing through a controlled deployment process rather than dynamically retrieving and executing a package from the network during Skill use.
-
Execute installation with least privilege in an isolated environment. Do not expose unrelated credentials, sensitive environment variables, host files, or unrestricted network access to the installer.
-
Require explicit informed user approval before any installation or payment capability enablement occurs.
-
