T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:31
- Finding
- Unpinned npm dependencies create a mutable supply-chain risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 31 **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ```bash npm install wechaty wechaty-puppet-wechat ``` ### Technical Analysis The installation command does not specify reviewed package versions or integrity values. Consequently, executing it resolves whichever releases the npm registry considers current at installation time. The installed code may differ from the code available when the Skill was audited. This is a supply-chain weakness rather than evidence that the named packages are currently malicious. Exploitation depends on a package or registry account being compromised, a malicious release being published, or dependency resolution otherwise selecting an unsafe component. ### Attack Path 1. An attacker compromises a package maintainer or registry account, or causes an unsafe release to be resolved. 2. The attacker publishes malicious code under one of the instructed package names or a transitive dependency. 3. A user follows the Skill and runs the unpinned `npm install` command. 4. npm retrieves the mutable package release and its dependency tree. 5. Malicious installation hooks or subsequently imported runtime code execute under the account running npm or the bot. ### Impact Assessment Malicious dependency code could obtain the same operating-system privileges as the user running the installation or bot. Depending on that user's environment, the code could read accessible files and credentials, alter project files, access the network, or manipulate WeChat bot messages and session data. No evidence was found that this Skill itself requests elevated privileges, installs persistence, or intentionally retrieves a malicious package. The impact is contingent on a supply-chain compromise. ]]>
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin each direct dependency to an explicitly reviewed version rather than relying on the latest registry release. - Generate and commit a `package-lock.json` using a trusted registry. - Use `npm ci` for reproducible installation after providing the lockfile. - Review and constrain transitive dependencies through the lockfile. - Enable dependency vulnerability and provenance checks in CI. - Where practical, initially install with lifecycle scripts disabled and review packages that require installation hooks. - Periodically update pins through a controlled review and testing process. ]]>
