T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:22
- Finding
- Unpinned Global npm Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 22 **Vulnerability Type**: Supply-chain exposure through an unpinned globally installed dependency **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g mcporter ``` ### Technical Analysis The installation instruction retrieves and installs the latest available `mcporter` package without specifying an audited version or verifying package integrity. npm installations may execute package lifecycle scripts. The global installation scope also increases the potential effect compared with a project-local dependency. The project does not provide a lockfile, integrity hash, verified package version, or explicit trusted registry. Consequently, the code installed by this instruction may change after the Skill has been audited. Exploitation would require compromise of the referenced package, its publishing account, or the configured npm registry; the audited file does not establish that the current package is malicious. ### Attack Path 1. An attacker compromises the package publication process, publishing account, or npm registry used by the victim. 2. The attacker publishes a malicious package release under the expected package name. 3. A user follows the documented `npm install -g mcporter` instruction. 4. npm retrieves the attacker-controlled latest release. 5. Malicious package code or lifecycle scripts execute with the privileges of the user running npm. 6. The installed global command can subsequently intercept mailbox configuration and data processed through it. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the invoking user. Depending on that user's access, the attacker could read or modify user files, access locally available credentials, tamper with globally installed tooling, and capture DingTalk mailbox endpoint credentials or mailbox content handled by the tool. This instruction does not itself grant root privileges; s ...[truncated 91 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `mcporter` to a specific, reviewed version rather than installing the latest release. - Verify the package's official publisher, registry source, and provenance before installation. - Use npm integrity verification and retain a lockfile or equivalent reviewed dependency manifest where possible. - Prefer a project-local installation over a global installation to reduce scope. - Disable lifecycle scripts during installation when they are unnecessary, then explicitly review any required scripts. - Document the expected package version and a controlled upgrade-review procedure. - Avoid running the installation command with `sudo` or another elevated account. ]]>
