T08 · Insecure Dependencies
Warning
- Location
- README.md:24
- Finding
- Unpinned Third-Party Package Execution During Installation## Vulnerability Details **File Location**: `README.md`, lines 24–28 **Vulnerability Type**: Unpinned executable dependency and mutable remote source **Risk Level**: Medium ### Vulnerable Code ```markdown ## Installation ```bash npx add https://github.com/wpank/ai/tree/main/skills/design-systems/design-system-patterns ``` ``` ### Technical Analysis The installation instructions invoke the npm package named `add` through `npx`. Because no exact package version or integrity value is specified, `npx` may download and execute whichever package release the registry currently resolves. npm package lifecycle or command code executes with the permissions of the user running the installation. The argument also references the mutable `main` branch of a remote GitHub repository rather than an immutable commit. Consequently, both the executable installer and the content it processes can change after this audit without any modification to the reviewed project. This creates a supply-chain trust gap. The finding does not establish that the current package or repository is malicious; the vulnerability is that the documented command permits future, compromised, or unexpectedly changed third-party content to execute during installation. ### Attack Path 1. An attacker compromises the npm account or package resolved by `npx add`, publishes a malicious release, or compromises the referenced GitHub repository. 2. The attacker adds malicious installer behavior or substitutes malicious Skill content. 3. A user follows the documented installation command. 4. `npx` resolves and downloads the unpinned package, then executes it locally. 5. The malicious process operates with the invoking user's permissions and can access resources available to that user. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the installing user's account. Depending on that account's privilege ...[truncated 441 chars]
- Remediation
- ## Remediation Suggestions 1. Do not execute an implicitly resolved npm package. Use a reviewed installer pinned to an exact version, for example `package-name@x.y.z`. 2. Pin remote repository content to a full immutable commit SHA instead of the mutable `main` branch. 3. Where supported, verify the downloaded artifact using a published cryptographic checksum or signature before processing it. 4. Prefer non-executable installation instructions that copy reviewed local files into the destination directory. 5. If an installer is necessary, document its package owner, source repository, expected integrity value, and minimum required privileges. 6. Run installation in a restricted environment without unnecessary secrets, elevated permissions, or broad filesystem access. 7. Add automated dependency and provenance checks so changes to the installer or source artifact require explicit review.
