T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:28
- Finding
- Unpinned Global Package Installation with Optional Root Privileges## Vulnerability Details **File Location**: `SKILL.md`, lines 28–32 **Vulnerability Type**: Unpinned third-party package installation with privileged execution **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @google/jules ``` ```bash sudo npm install -g @google/jules ``` ### Technical Analysis The skill instructs the agent to install the latest available version of `@google/jules` globally without pinning a reviewed version or verifying package integrity and provenance. The effective code installed by this command can therefore change after the skill itself has been audited. The suggested fallback further runs npm through `sudo`. npm packages can execute lifecycle scripts during installation, so this may execute package-controlled code with root privileges. No evidence indicates that the named package is currently malicious; the risk arises from the unsafe dependency installation procedure and the impact of a potential upstream package or release compromise. ### Attack Path 1. An attacker compromises the package publisher account, package registry delivery path, or a future package release. 2. The attacker publishes a modified version containing a malicious npm lifecycle script or executable payload. 3. An agent follows the skill and runs the unpinned `npm install -g @google/jules` command. 4. npm retrieves the attacker-controlled latest release and executes applicable lifecycle scripts. 5. If the documented `sudo` fallback is used, the payload executes with root privileges and can modify system-wide files. ### Impact Assessment A normal global installation may modify globally installed Node.js packages and expose attacker-controlled commands to users of the environment. Depending on npm configuration and directory permissions, compromise may extend to the executing user's files, credentials, source repositories, and accessible network resources. If the `sudo` command is used, malicious installation code can obtain root-level execut ...[truncated 277 chars]
- Remediation
- ## Remediation Suggestions - Pin `@google/jules` to an exact, reviewed version rather than installing the mutable latest release. - Verify package provenance, publisher identity, and registry metadata before installation. - Record and validate the expected package integrity hash where the installation workflow supports it. - Remove the recommendation to run `sudo npm install -g`; do not execute third-party package installation scripts as root. - Prefer a user-scoped npm prefix, a project-local installation, or an isolated container or virtual environment. - Consider disabling npm lifecycle scripts during installation when compatible, then explicitly review and run only required setup operations. - Establish a controlled update process that reviews new versions before changing the pinned dependency.
