A colleciton of git hooks that use the deps.dev
query API to prevent adding vulnerable dependencies to your repository.
The pre-commit
script calculates the hash for each file that has been staged for commit.
For example /m56MsEiiIS5aRp0T5U6VdDdjq0=
is the hash for org.apache.logging.log4j:log4j-core:2.17.0
It then uses the deps.dev
query API to check if any of the files match a known dependency.
If any vulnerabilities are found, the commit is aborted.
Copy the script to the .git/hooks
directory in your local repository.
All code in this repository is licensed under the MIT license.