T08 · Insecure Dependencies
- Location
SKILL.md:34- Finding
Execution of an Unpinned npm CLI Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 34-49, 87, 115-121, and 136
Vulnerability Type: Unpinned third-party executable dependency
Risk Level: MediumVulnerable Code
bash npm install -g mp-skills npx mp-skills --help npx mp-skills find <keyword> npx mp-skills list npx mp-skills add TencentCloudBase/awesome-miniprogram-skills --skill <skill-name> npx mp-skills setupTechnical Analysis
The Skill instructs the Agent to install and execute
mp-skillswithout specifying an exact package version, integrity hash, lockfile, or verified package provenance. Both the global npm installation and repeatednpxinvocations can resolve a package version from the npm registry at execution time.Consequently, the code that runs may differ from the version that was reviewed when this Skill was authored. If the npm package, its publisher account, or a transitive dependency is compromised, invoking these commands can execute attacker-controlled installation hooks or runtime code under the current user's account.
The instructions also require
mp-skills setup, which is expected to modify project and cloud configuration. This increases the potential effect of a dependency compromise because the executable may have access to source files, environment configuration, cloud credentials available to the process, and network connectivity.Attack Path
- An attacker compromises the
mp-skillsnpm package, its publisher account, or one of its transitive dependencies. - The attacker publishes a malicious release or dependency update under the package name currently resolved by npm.
- An Agent follows
SKILL.mdand runsnpm install -g mp-skillsor an unpinnednpx mp-skillscommand. - npm downloads and executes the attacker-controlled package code.
- The malicious code runs with the invoking user's privileges and can inspect or modify accessible project files, configurat ...[truncated 690 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin
mp-skillsto an explicitly reviewed version, such asnpx mp-skills@X.Y.Z. - Prefer a project-local development dependency governed by a committed lockfile instead of a global installation.
- Install dependencies through
npm ciso resolution follows the reviewed lockfile. - Verify npm package provenance, publisher identity, signatures where available, and expected integrity hashes.
- Review transitive dependencies and lifecycle scripts before permitting execution.
- Run the CLI in a restricted environment with only the minimum required filesystem, network, credential, and cloud permissions.
- Require explicit user confirmation before commands that modify project files, databases, cloud functions, or environment configuration.
- Document and verify the expected file and cloud-resource changes before and after setup.
- Pin
