Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.26 KB

File metadata and controls

34 lines (23 loc) · 1.26 KB

Vulnerability Git Hooks

MIT License Stability Experimental

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.