T08 · Insecure Dependencies
- Location
README.md:27- Finding
Unpinned Third-Party Installation Through npx and a Mutable GitHub Source
- Content
View full analysis
Vulnerability Details
File Location:
README.md, lines 27–31
Vulnerability Type: Supply-chain risk caused by an unpinned executable package and mutable remote source
Risk Level: MediumVulnerable Code Snippet:
markdown ## Installation ```bash npx add https://github.com/wpank/ai/tree/main/skills/backend/event-storetext ### Technical Analysis The installation command invokes `npx`, which may download and execute the npm package named `add` when it is not already available locally. The package is not pinned to an exact version and no lockfile integrity value or checksum is supplied. The command also references the mutable `main` branch of a remote GitHub repository rather than a reviewed commit SHA. Consequently, the code and files retrieved when a user runs this command may differ from the two documentation files examined during this audit. This creates two independent supply-chain trust points: 1. The package that `npx` resolves and executes. 2. The mutable content obtained from the remote GitHub repository. Compromise, malicious publication, ownership transfer, or an unexpected update at either point could cause unreviewed code to be processed or executed on the user's machine. ### Attack Path 1. An attacker compromises the resolved npm package, publishes a malicious version under the package name, or compromises the referenced GitHub repository. 2. The attacker adds malicious package lifecycle behavior, installer logic, or skill content. 3. A user follows the installation instruction in `README.md`. 4. `npx` resolves and potentially downloads the unpinned package, then executes it with the user's privileges. 5. The installer retrieves content from the mutable GitHub `main` branch. 6. The malicious component can act within the permissions and environment available to the invoking user. ### Impact Assessment Successful exploitation could permit arbitrary actions under the ...[truncated 514 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the ambiguous
npx addcommand with a trusted and explicitly documented installer. - Pin the installer package to an exact reviewed version, for example
package-name@x.y.z, rather than allowing resolution of the latest release. - Pin the GitHub source to a reviewed commit SHA instead of the mutable
mainbranch. - Publish and verify a cryptographic checksum or signed release artifact before installation.
- Disable or avoid package lifecycle scripts where they are unnecessary.
- Prefer a transparent file-copy installation method for this documentation-only skill.
- Document the exact files that will be installed and the permissions required.
- Perform installation with least privilege and avoid running the command with administrative or root permissions.
- Replace the ambiguous
