Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): Add govulncheck to checks.yaml #1986

Merged
merged 4 commits into from
Mar 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ jobs:
- run: go work use .
if: env.IS_RELEASE_BRANCH == 'true'
working-directory: ${{ matrix.directory }}
- name: govluncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee
with:
go-version-input: "1.24.1"
work-dir: ${{ matrix.directory }}
- name: golangci-lint
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/vulnerability-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ jobs:
directory:
- examples
- sdk
- lib/ocrypto
- service
steps:
- name: govluncheck
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ toolcheck:
@which protoc-gen-doc > /dev/null || (echo "protoc-gen-doc not found, run 'go install github.com/pseudomuto/protoc-gen-doc/cmd/[email protected]'" && exit 1)
@golangci-lint --version | grep "version v\?1.6[456]" > /dev/null || (echo "golangci-lint version must be v1.64 or later [$$(golangci-lint --version)]" && exit 1)
@which goimports >/dev/null || (echo "goimports not found, run 'go install golang.org/x/tools/cmd/goimports@latest'")
@govulncheck -version >/dev/null || (echo "govulncheck not found, run 'go install golang.org/x/vuln/cmd/govulncheck@latest'")

fix: tidy fmt

Expand All @@ -33,7 +34,7 @@ tidy:
license:
for m in $(MODS); do (cd $$m && go run github.com/google/[email protected] check --disallowed_types=forbidden --include_tests ./) || exit 1; done

lint: proto-lint go-lint
lint: proto-lint go-lint govulncheck

proto-lint:
buf lint service || (exit_code=$$?; \
Expand All @@ -51,6 +52,15 @@ go-lint:
(cd "$$m" && golangci-lint run $(LINT_OPTIONS) --path-prefix="$$m" ) || status=1; \
done; \
exit $$status

govulncheck:
status=0; \
for m in $(MODS); do \
echo "govulncheck module: $$m"; \
(cd "$$m" && govulncheck ./...) || status=1; \
done; \
exit $$status

proto-generate:
rm -rf protocol/go/[a-fh-z]* docs/grpc docs/openapi
buf generate service
Expand Down
Loading