diff options
author | Bo-Yi Wu <appleboy.tw@gmail.com> | 2022-09-11 15:02:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-11 15:02:18 +0800 |
commit | 24b5a384d213a50b900acc896c9d34af934f59ac (patch) | |
tree | 0d7004dd170e792873ff19272f6ce1b43dab083f /Makefile | |
parent | 77c916f6d9915784c323bc2dd8d29c17e6bff257 (diff) | |
download | gitea-24b5a384d213a50b900acc896c9d34af934f59ac.tar.gz gitea-24b5a384d213a50b900acc896c9d34af934f59ac.zip |
chore(security): Support Go Vulnerability Management (#21139)
See https://go.dev/security/vuln/
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -35,6 +35,7 @@ MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/misspell@v0.3.4 SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/swagger@v0.30.0 XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest GO_LICENSES_PACKAGE ?= github.com/google/go-licenses@v1.3.0 +GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest DOCKER_IMAGE ?= gitea/gitea DOCKER_TAG ?= latest @@ -728,6 +729,10 @@ generate-go: $(TAGS_PREREQ) @echo "Running go generate..." @CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES) +.PHONY: security-check +security-check: + govulncheck -v ./... + $(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ) CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ @@ -813,6 +818,7 @@ deps-backend: $(GO) install $(SWAGGER_PACKAGE) $(GO) install $(XGO_PACKAGE) $(GO) install $(GO_LICENSES_PACKAGE) + $(GO) install $(GOVULNCHECK_PACKAGE) node_modules: package-lock.json npm install --no-save |