T08 · Insecure Dependencies
Warning
- Location
- README.md:33
- Finding
- Unpinned Third-Party Installer and Mutable Repository Source<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, line 33 **Vulnerability Type**: Unpinned third-party dependency and mutable installation source **Risk Level**: Medium ### Vulnerable Code ```bash npx add https://github.com/wpank/ai/tree/main/skills/backend/api-design-principles ``` ### Technical Analysis The documented installation command invokes `npx`, which may download and execute the npm package named `add` if a trusted local copy is unavailable. The command does not pin that package to an audited version. The Skill content is also retrieved from a mutable branch of a personal GitHub repository rather than a full commit hash or signed, checksum-verified release. Consequently, the code and instructions installed by this command may differ from the content reviewed during this audit. This installation mechanism exceeds the minimum privileges needed for a primarily documentation-based Skill. Installation could instead use a pinned archive or an explicit local copy operation without executing a third-party installer. ### Attack Path 1. An attacker compromises the npm package used by `npx`, the associated npm maintainer account, the GitHub account, or the referenced repository. 2. The attacker publishes malicious installer behavior or changes the contents of the repository’s mutable default branch. 3. A user follows the README and executes the documented `npx add` command. 4. `npx` retrieves and executes the installer with the permissions of the current user. 5. The compromised installer can execute arbitrary commands, alter local files, steal user-accessible credentials, or install modified Skill instructions and templates. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the privileges of the user running the installation command. The accessible scope may include: - Files readable or writable by the current user. - Developer credentials and tokens available to the process. - Project configu ...[truncated 351 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the installer package to a specific, reviewed version instead of relying on the latest package resolved by `npx`. 2. Pin repository content to a full Git commit hash or immutable signed release tag. 3. Publish and verify a SHA-256 or stronger checksum for downloaded artifacts. 4. Prefer a non-executable installation procedure, such as downloading a pinned archive and copying the required files. 5. If an installer is necessary, document its package identity, version, expected behavior, and required permissions. 6. Use npm lockfiles, integrity metadata, provenance verification, and trusted registries where applicable. 7. Avoid running the installation command with elevated privileges. ]]>
