Skip to content

Commit 9380bb6

Browse files
authored
Consolidate security-check into checks-backend (#21882)
Also, run it via exact version instead of relying on global binary.
1 parent 43aafc5 commit 9380bb6

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

.drone.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,6 @@ steps:
3939
- make lint-frontend
4040
depends_on: [deps-frontend]
4141

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-
5242
- name: lint-backend
5343
image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env
5444
pull: always

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ checks: checks-frontend checks-backend
333333
checks-frontend: lockfile-check svg-check
334334

335335
.PHONY: checks-backend
336-
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate
336+
checks-backend: tidy-check swagger-check fmt-check misspell-check swagger-validate security-check
337337

338338
.PHONY: lint
339339
lint: lint-frontend lint-backend
@@ -745,7 +745,7 @@ generate-go: $(TAGS_PREREQ)
745745

746746
.PHONY: security-check
747747
security-check:
748-
govulncheck -v ./...
748+
go run $(GOVULNCHECK_PACKAGE) -v ./...
749749

750750
$(EXECUTABLE): $(GO_SOURCES) $(TAGS_PREREQ)
751751
CGO_CFLAGS="$(CGO_CFLAGS)" $(GO) build $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@

0 commit comments

Comments
 (0)