T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:10
- Finding
- Unpinned Third-Party npm Package Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 10-18 and 40 **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```yaml "requires": { "bins": ["oracle"] }, "install": [ { "id": "node", "kind": "node", "package": "@steipete/oracle", "bins": ["oracle"], "label": "Install oracle (node)", }, ], ``` ```bash npx -y @steipete/oracle --help ``` ### Technical Analysis The installation metadata references `@steipete/oracle` without an exact version or integrity constraint. The documented fallback command similarly uses `npx -y` to retrieve and execute the currently resolved package version without interactive confirmation. Because the package version is not pinned, the effective code executed by users may change after this Skill has been reviewed. If the npm package, its publishing account, or one of its transitive dependencies is compromised, a malicious release could execute code during package installation or when the CLI starts. The package would run with the permissions of the user invoking the command. This is a supply-chain weakness rather than evidence that the currently published package is malicious. ### Attack Path 1. An attacker compromises the npm publisher account for `@steipete/oracle`, the package itself, or a transitive dependency. 2. The attacker publishes a malicious version that is selected by the default npm version resolution. 3. A user follows the documented `npx -y @steipete/oracle --help` instruction or installs the package through the unpinned installation metadata. 4. npm downloads the attacker-controlled package and may execute installation lifecycle code. 5. The malicious package can also execute when the `oracle` CLI is launched. 6. The payload operates with the invoking user's permissions and can access resources available in that user's environment. ### Impact Assessment Successful exploitation could provi ...[truncated 645 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version in installation metadata: ```yaml "package": "@steipete/oracle@<reviewed-exact-version>" ``` 2. Pin the fallback command to the same reviewed version: ```bash npx --no-install @steipete/oracle@<reviewed-exact-version> --help ``` If local installation is not guaranteed, use an explicitly pinned installation process rather than resolving the latest release automatically. 3. Maintain a lockfile with integrity hashes where npm installation is performed as part of a managed project. 4. Verify package provenance, signatures, checksums, and publisher identity before updating the pinned version. 5. Review release changes and transitive dependency updates before accepting a new package version. 6. Avoid `npx -y` for security-sensitive workflows because it automatically approves downloading and running code. Require explicit user confirmation and clearly disclose that external package code will execute locally. 7. Where practical, install the reviewed package in an isolated environment with restricted filesystem access, limited credentials, and constrained network permissions. ]]>
