Last active
February 20, 2024 13:50
-
-
Save danackerson/b6f276f9979924c4836e5aef2f859291 to your computer and use it in GitHub Desktop.
govulncheck pre-commit hook for golang projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git config --global init.templateDir ~/.git-template | |
$ vi ~/.git-template/hooks/pre-commit | |
#!/usr/bin/env bash | |
set -e -o pipefail | |
if [[ -f "go.sum" ]]; then | |
govulncheck ./... | |
fi | |
$ cd <git repo> | |
$ git init | |
$ git commit ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment