T08 · Insecure Dependencies
- Location
assets/vitepress/package.json:9- Finding
Unpinned npm Dependencies Permit Unreviewed Supply-Chain Code Execution
- Content
View full analysis
- Remediation
View remediation
", "vitepress": "", "vitepress-plugin-mermaid": "", "wrangler": "" } } ``` 2. Generate, review, and commit `package-lock.json` so direct and transitive dependency versions and integrity hashes are reproducible. 3. Replace: ```bash npm --prefix codewiki install ``` with: ```bash npm --prefix codewiki ci ``` 4. Avoid unversioned ephemeral execution. Pin every `npx` package explicitly, or preferably execute binaries from the lockfile-controlled local installation: ```bash npm --prefix codewiki exec -- vitepress dev . ``` 5. Replace the global Wrangler installation with a project-local, pinned development dependency. Execute it through the local package context rather than modifying the user-wide environment. 6. Where compatible with the selected packages, consider disabling lifecycle scripts during installation: ```bash npm --prefix codewiki ci --ignore-scripts ``` Confirm first that no required dependency legitimately relies on an installation script. 7. Use a controlled dependency-update process that includes automated vulnerability scanning, integrity review, changelog inspection, and testing before lockfile updates are accepted. 8. Run documentation builds in a restricted environment with minimal filesystem access, no unnecessary secrets, and limited outbound network connectivity. ]]>
