T08 · Insecure Dependencies
- Location
SKILL.md:80- Finding
Unpinned Global Dependency Installation and Execution of Unaudited Project Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 80-86
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code
bash **Run instructions:** ```bash cd lutixia npm install -g @dcloudio/uni-cli npm install npm run dev:%PLATFORM%text ### Technical Analysis The Skill instructs the user or agent to install `@dcloudio/uni-cli` globally without specifying a trusted version or integrity constraint. This causes npm to resolve the package version available from the configured registry at execution time, meaning the installed code can differ from what was present when the Skill was audited. The subsequent `npm install` command operates on a separate `lutixia` project that is not included in the audited artifact. Its manifest, lockfile, dependency sources, version constraints, and npm lifecycle scripts therefore cannot be verified. npm installation can execute package lifecycle hooks such as `preinstall`, `install`, and `postinstall` with the invoking user's privileges. These installation and execution steps are unrelated to the Skill's primary stated function of opening and analyzing MockPlus design pages. The global installation also modifies the user's environment beyond the requirements of that function. ### Attack Path 1. A user or agent loads the MockPlus reader Skill and follows its project run instructions. 2. `npm install -g @dcloudio/uni-cli` retrieves an unpinned package version from the configured npm registry and installs it globally. 3. If the package, one of its transitive dependencies, or the configured registry is compromised, attacker-controlled lifecycle code can execute during installation. 4. The agent then runs `npm install` inside the external `lutixia` directory. 5. Dependencies or lifecycle scripts defined by that unaudited project execute with the permissions of the invoking account. 6. The resulting project command is e ...[truncated 859 chars]- Remediation
View remediation
Remediation Suggestions
- Remove the implemented-project and npm execution instructions from this reader Skill because they are not necessary for opening or analyzing MockPlus pages.
- If the project instructions are required, include the relevant
package.jsonand lockfile within the review scope. - Pin all direct and transitive dependencies to reviewed versions using a committed lockfile and use
npm cirather than an unconstrainednpm install. - Avoid global installation. Install the CLI as a pinned project-local development dependency and invoke it through an explicit package script or
npx --no-install. - Verify package provenance and registry configuration, and use npm integrity metadata and dependency auditing.
- Disable lifecycle scripts during installation with
--ignore-scriptswhen they are not required. Review and explicitly allow any necessary lifecycle scripts before execution. - Run dependency installation and development commands in a restricted, disposable environment without production credentials or sensitive filesystem access.
- Do not instruct the agent to execute commands in an external hard-coded workspace unless that workspace and its dependency manifests have been separately audited.
