T08 · Insecure Dependencies
- Location
SKILL.md:5- Finding
Unpinned Third-Party CLI Dependency Executes with API Credentials
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 5-12
Vulnerability Type: Unpinned executable dependency
Risk Level: Mediumyaml metadata: requires: bins: ["anygen"] env: ["ANYGEN_API_KEY"] install: - id: node kind: node package: "@anygen/cli" bins: ["anygen"]Technical Analysis
The skill installs the third-party npm package
@anygen/cliwithout specifying an exact version, lockfile, or integrity hash. Consequently, installation can resolve mutable registry content that was not present in the audited project and could change after this skill has been reviewed.npm package installation may execute package lifecycle scripts. The installed
anygenexecutable is then trusted to operate in an environment containingANYGEN_API_KEYand to write downloaded artifacts to the local filesystem. Because neither the package implementation nor a cryptographic integrity constraint is included, the effective executable behavior cannot be verified from this project.This is a supply-chain exposure rather than evidence that the current package is malicious. Exploitation would require compromise, replacement, or malicious publication of a version resolved under the package name.
Attack Path
- An attacker compromises the npm package, its publisher account, or its distribution path and publishes attacker-controlled content under
@anygen/cli. - The skill installer resolves the unpinned package to the compromised release.
- Attacker-controlled code executes through an npm lifecycle script or when the installed
anygenbinary is invoked. - The code reads environment variables available to the process, potentially including
ANYGEN_API_KEY. - The code can transmit accessible credentials or data, alter downloaded artifacts, or perform filesystem operations with the invoking process's permissions.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileg ...[truncated 496 chars]
- An attacker compromises the npm package, its publisher account, or its distribution path and publishes attacker-controlled content under
- Remediation
View remediation
Remediation Suggestions
- Pin
@anygen/clito a specific, reviewed version instead of allowing mutable version resolution. - Use a committed lockfile and verify the package's registry integrity hash during installation.
- Obtain the package only from a documented, trusted registry and enable provenance or signature verification where supported.
- Review the pinned package source and its transitive dependencies before deployment.
- Disable npm lifecycle scripts during installation where operationally feasible, or explicitly audit every required lifecycle script.
- Run the CLI in a sandbox with only the required output directory mounted as writable.
- Expose
ANYGEN_API_KEYonly to the command that requires it, use a narrowly scoped credential, and avoid inheriting unrelated secrets. - Add dependency monitoring and require security review before changing the pinned version.
- Pin
