T08 · Insecure Dependencies
Error
- Location
- SKILL.md:36
- Finding
- Unpinned Remote Package Execution Through CLI Fallback<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 36 **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: High ### Vulnerable Code ```markdown Run `git-escrows --help` to verify the CLI is installed. If it fails, try `npx git-escrows --help` or `bunx git-escrows --help`. Use whichever works for all subsequent commands. If none work, tell the user to install with `npm i -g git-escrows`. ``` ### Technical Analysis The fallback directs the agent to execute `git-escrows` through `npx` or `bunx` without specifying an approved package version, integrity hash, or trusted artifact source. If the package is not already installed locally, these tools may retrieve and execute package code from a remote registry. Consequently, the code executed during a Skill run can differ from the code reviewed during the audit. A compromised package release, package ownership takeover, registry compromise, or malicious dependency update could introduce arbitrary executable behavior. The package would run with the permissions of the agent process and could potentially access the working directory, environment variables, Git credentials, and the configured `PRIVATE_KEY`. This is classified as `T08: Insecure Dependencies` because the unsafe execution path relies on an unpinned third-party dependency obtained from a mutable package source. ### Attack Path 1. An attacker compromises the `git-escrows` package, one of its transitive dependencies, or the package publication account. 2. The attacker publishes a malicious version to the package registry. 3. The locally installed `git-escrows` command is unavailable or fails. 4. Following the Skill instructions, the agent runs `npx git-escrows --help` or `bunx git-escrows --help`. 5. The package runner retrieves and executes the malicious release. 6. Malicious installation hooks or runtime code execute with the agent’s operating-system permissions. 7. The payload may read the configured wallet ...[truncated 893 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `git-escrows` to a reviewed, exact version rather than executing the latest available release: ```bash npx --yes git-escrows@1.2.3 --help ``` 2. Verify the selected package version and all transitive dependencies using a lockfile and registry integrity hashes. 3. Prefer a preinstalled, administrator-approved binary and fail closed when it is unavailable instead of automatically downloading executable code. 4. Validate package provenance, publisher identity, release signatures, and repository ownership before installation. 5. Install the dependency in an isolated environment with minimum filesystem, credential, and network access. 6. Do not expose `PRIVATE_KEY`, Git credentials, or other secrets to package installation hooks or untrusted subprocesses. 7. Document an explicit allowlisted package registry and reject alternate or user-controlled registry configurations. 8. Review and pin the global installation command as well; `npm i -g git-escrows` is also mutable when no version is specified. ]]>
