T08 · Insecure Dependencies
- Location
SKILL.md:29- Finding
Unpinned Global Installation of an Unaudited Third-Party npm Package
- Content
View full analysis
- Remediation
View remediation
``` 2. Record and verify package integrity and provenance before installation. Use a lockfile where possible, validate npm provenance signatures, and compare the package tarball against an approved cryptographic digest. 3. Include or vendor the reviewed CLI source code in the Skill package so its credential handling, API destinations, and read-only guarantees can be audited. 4. Avoid global installation. Prefer a project-local, isolated installation under a dedicated directory with minimum filesystem permissions. 5. Disable npm lifecycle scripts where compatible: ```bash npm install --ignore-scripts snapchat-ads-cli@ ``` If lifecycle scripts are required, review each script and its transitive execution chain before permitting it. 6. Run the CLI as a non-administrative user in a sandbox or container with: - Access only to the required credential. - Restricted filesystem access. - Outbound network access limited to documented Snapchat API endpoints. - No access to unrelated secrets or environment variables. 7. Document the expected Snapchat API hosts and enforce destination allowlisting so OAuth credentials cannot be sent to arbitrary endpoints. 8. Use a narrowly scoped, short-lived OAuth token and rotate it immediately if package compromise or unexpected network activity is suspected. ]]>
