T08 · Insecure Dependencies
- Location
SKILL.md:43- Finding
Unpinned Remote npm Package Installation and Execution
- Content
View full analysis
- Remediation
View remediation
``` 2. Use a project-local dependency and committed lockfile instead of a global installation: ```bash npm ci npx --no-install runcomfy --version ``` 3. Commit and review `package-lock.json`, and use `npm ci` so dependency resolution is reproducible. 4. Publish an expected npm integrity value or cryptographic checksum through a trusted channel and verify the downloaded artifact before execution. 5. Avoid `npx -y` because it permits automatic retrieval and execution without confirmation. If npx is necessary, specify an exact version and require explicit user approval before the initial download. 6. Run the CLI in a restricted container or sandbox with access only to the required input and output files. Do not expose unrelated home-directory content or environment variables. 7. Provide `RUNCOMFY_TOKEN` only to the generation process, use a narrowly scoped token where supported, and rotate it if dependency compromise is suspected. 8. Review package lifecycle scripts and the complete transitive dependency tree before approving a new CLI version. ]]>
