Skip to main content
The GitHub Action does this for you, and also checks files that run during CI.
The free tier allows 100 units a day per IP, so check only the dependencies a pull request changes, not the whole lockfile.

Script

Save as scripts/check-deps.mjs. It compares package-lock.json with the base branch and checks every new or changed version.

Workflow

Choosing what to block

To also fail on known vulnerabilities, check report.risk instead of report.verdict.