vulnerability-git-hooks

git hooks to prevent committing vulnerable dependencies

MIT License

Stars
3
Committers
2

Vulnerability Git Hooks

A colleciton of git hooks that use the deps.dev query API to prevent adding vulnerable dependencies to your repository.

How does it work?

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.

Requirements

Installation

Copy the script to the .git/hooks directory in your local repository.

License

All code in this repository is licensed under the MIT license.