T08 · Insecure Dependencies
- Location
SKILL.md:35- Finding
Unpinned Global Installation of a Mutable Third-Party CLI
- Content
View full analysis
- Remediation
View remediation
``` 2. Publish and verify the expected npm package name, publisher identity, registry URL, version, and integrity hash through a trusted channel. 3. Prefer a project-local dependency with a committed lockfile over a global installation. Invoke it through a controlled package script or an equivalent mechanism that uses the locked version. 4. Install and execute the CLI using a dedicated, least-privileged account or isolated environment. Do not use `sudo` or an administrator shell. 5. Disable npm lifecycle scripts during installation if the package supports operation without them: ```bash npm install --ignore-scripts settlemesh@ ``` If lifecycle scripts are required, review them before installation and execute them only in a sandbox. 6. Do not immediately authenticate through a newly downloaded executable. Verify the installed package version and provenance first, then run authentication as a separate step. 7. Scope API keys to the minimum necessary permissions, avoid exposing them to unrelated processes, rotate them after suspected compromise, and protect cached sessions with restrictive filesystem permissions. 8. Establish an update process in which new CLI versions are reviewed and tested before changing the pinned version. ]]>
