T08 · Insecure Dependencies
- Location
SKILL.md:29- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
- Remediation
View remediation
``` 2. Verify the package's npm publisher, repository association, provenance attestations, and integrity before use. 3. Record and validate the expected package tarball integrity hash. 4. Prefer a project-local, lockfile-controlled installation over global installation: ```bash npm install --save-exact microsoft-ads-cli@ ``` 5. Disable npm lifecycle scripts with `--ignore-scripts` when the reviewed package does not require them. 6. Execute the CLI in a restricted environment with access only to the credentials and filesystem paths required for Microsoft Ads reporting. 7. Avoid installing the package with `sudo`, an administrator account, or another privileged context. 8. Review the referenced CLI implementation and each dependency update before changing the pinned version. 9. Store Microsoft Ads credentials in a secure credential manager where supported. If a JSON credential file remains necessary, restrict its permissions to the owning user and never print its contents in logs. ]]>
