T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:10
- Finding
- Unpinned Third-Party CLI Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10-14 **Vulnerability Type**: Unpinned and unverifiable third-party dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: - id: node kind: node package: "@anygen/cli" bins: ["anygen"] ``` ### Technical Analysis The skill declares `@anygen/cli` without a fixed version, lockfile, integrity hash, or package signature. Consequently, the package resolved during installation can differ from the package that was available when the skill was audited. This creates a supply-chain risk: compromise of the package, its maintainer account, the package registry, or a transitive dependency could cause malicious code to be installed. Depending on the package manager's behavior, such code could run through installation lifecycle scripts or when the `anygen` executable is subsequently invoked. ### Attack Path 1. An attacker compromises the `@anygen/cli` package, its publication account, registry distribution path, or a dependency it resolves. 2. The attacker publishes a malicious release under the expected package name. 3. The skill installation process resolves the mutable package reference to that malicious release. 4. Malicious code runs during package installation, if lifecycle scripts are enabled, or when the installed `anygen` command is invoked. 5. The code executes with the privileges and environment of the user running the agent. ### Impact Assessment Successful exploitation could allow code execution under the installing user's account. The malicious dependency could access files, environment variables, network connectivity, and credentials available to that process, potentially including `ANYGEN_API_KEY`. The scope is limited by the privileges and isolation controls applied to the agent or package installer. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `@anygen/cli` to a specifically audited version rather than using a mutable package reference. - Use a lockfile and verify the package with a registry-provided integrity digest or trusted cryptographic signature. - Restrict installation to an explicitly trusted package registry. - Disable package lifecycle scripts where operationally possible. - Audit direct and transitive dependencies before deployment. - Run installation and execution in a sandbox with minimal filesystem, network, and environment-variable access. - Avoid exposing `ANYGEN_API_KEY` to package installation processes unless it is strictly required. ]]>
