T08 · Insecure Dependencies
Warning
- Location
- README.md:9
- Finding
- Unpinned Third-Party Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `README.md:9-13`; `README.zh.md:9-13` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code The English installation documentation contains: ```markdown ## Quick Install ```bash npx skills add alondotsh/alon-skills --skill alon-fact-check ``` ``` The Chinese installation documentation contains the equivalent command: ```markdown ## 快速安装 ```bash npx skills add alondotsh/alon-skills --skill alon-fact-check ``` ``` ### Technical Analysis The documented installation command asks `npx` to resolve and execute the `skills` npm package without specifying an exact version. The repository does not provide a lockfile, integrity hash, package signature, or other mechanism that binds installation to an audited package artifact. Consequently, the code executed by this command can differ from the code that existed when the skill was reviewed. If the resolved npm package or its dependency chain is compromised, malicious lifecycle scripts or command-line code could run during installation. This is a supply-chain weakness rather than evidence that the current package is malicious. Its security impact depends on the integrity of the package and registry content resolved when a user executes the command. ### Attack Path 1. An attacker compromises the npm account, publication pipeline, or dependency chain associated with the package resolved as `skills`. 2. The attacker publishes a malicious version that contains hostile CLI logic, an installation lifecycle script, or a malicious transitive dependency. 3. A user follows the documented command without an explicit package version. 4. `npx` resolves and downloads the attacker-controlled release. 5. The malicious package executes with the operating-system privileges and environment access of the user running the installation command. ### Impact Assessment Successful exploitation could provide arbitrary code execut ...[truncated 522 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the installer package to a reviewed, immutable version rather than allowing `npx` to resolve the latest available release: ```bash npx --package=skills@EXACT_REVIEWED_VERSION skills add alondotsh/alon-skills --skill alon-fact-check ``` 2. Replace `EXACT_REVIEWED_VERSION` with a specific version that the maintainers have audited; do not use floating tags such as `latest`, version ranges, or wildcards. 3. Document the expected npm registry and canonical package identity so users can detect dependency-confusion or registry-substitution scenarios. 4. Publish and document integrity hashes or signed release artifacts where the installation ecosystem supports them. 5. In automated environments, install dependencies through a committed lockfile and use integrity-enforcing installation modes. 6. Advise users not to run the installation command with administrator or root privileges. 7. Apply the same hardened command and verification guidance consistently in both `README.md` and `README.zh.md`. ]]>
