File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ steps:
39
39
- make lint-frontend
40
40
depends_on : [deps-frontend]
41
41
42
+ - name : security-check
43
+ image : golang:1.19
44
+ pull : always
45
+ commands :
46
+ - make security-check
47
+ depends_on : [deps-backend]
48
+ volumes :
49
+ - name : deps
50
+ path : /go
51
+
42
52
- name : lint-backend
43
53
image : gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
44
54
pull : always
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ MISSPELL_PACKAGE ?= github.com/client9/misspell/cmd/
[email protected]
35
35
SWAGGER_PACKAGE ?= github.com/go-swagger/go-swagger/cmd/
[email protected]
36
36
XGO_PACKAGE ?= src.techknowlogick.com/xgo@latest
37
37
GO_LICENSES_PACKAGE ?= github.com/google/
[email protected]
38
+ GOVULNCHECK_PACKAGE ?= golang.org/x/vuln/cmd/govulncheck@latest
38
39
39
40
DOCKER_IMAGE ?= gitea/gitea
40
41
DOCKER_TAG ?= latest
@@ -728,6 +729,10 @@ generate-go: $(TAGS_PREREQ)
728
729
@echo " Running go generate..."
729
730
@CC= GOOS= GOARCH= $(GO ) generate -tags ' $(TAGS)' $(GO_PACKAGES )
730
731
732
+ .PHONY : security-check
733
+ security-check :
734
+ govulncheck -v ./...
735
+
731
736
$(EXECUTABLE ) : $(GO_SOURCES ) $(TAGS_PREREQ )
732
737
CGO_CFLAGS=" $( CGO_CFLAGS) " $(GO ) build $(GOFLAGS ) $(EXTRA_GOFLAGS ) -tags ' $(TAGS)' -ldflags ' -s -w $(LDFLAGS)' -o $@
733
738
@@ -813,6 +818,7 @@ deps-backend:
813
818
$(GO ) install $(SWAGGER_PACKAGE )
814
819
$(GO ) install $(XGO_PACKAGE )
815
820
$(GO ) install $(GO_LICENSES_PACKAGE )
821
+ $(GO ) install $(GOVULNCHECK_PACKAGE )
816
822
817
823
node_modules : package-lock.json
818
824
npm install --no-save
You can’t perform that action at this time.
0 commit comments