diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 91e208b..98f5523 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -38,6 +38,11 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} if: env.SONAR_TOKEN != '' + - name: Vulnerability Check + run: | + go install golang.org/x/vuln/cmd/govulncheck@3e6f44f962742443c11ae2261f02e0c917aeb2bc + govulncheck ./... + build-test: name: Build & Test - Go ${{ matrix.go-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 5903906..c861a2d 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -58,4 +58,9 @@ jobs: args: > -Dsonar.pullrequest.key=${{ inputs.pr_id }} -Dsonar.pullrequest.branch=${{ steps.pr.outputs.head_ref }} - -Dsonar.pullrequest.base=${{ steps.pr.outputs.base_ref }} \ No newline at end of file + -Dsonar.pullrequest.base=${{ steps.pr.outputs.base_ref }} + + - name: Vulnerability Check + run: | + go install golang.org/x/vuln/cmd/govulncheck@3e6f44f962742443c11ae2261f02e0c917aeb2bc + govulncheck ./... \ No newline at end of file diff --git a/Makefile b/Makefile index 4198b1b..39c96c7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -.PHONY: test fmt cover cover-html lint lint-install godoc-install docs +.PHONY: test fmt cover cover-html lint lint-install godoc-install docs vulncheck vulncheck-install GOLANGCI_LINT_VERSION=v2.12.2 +GOVULNCHECK_VERSION=v1.5.0 test-clean: go clean -testcache @@ -25,3 +26,9 @@ cover: cover-html: go tool cover -html="coverage.out" + +vulncheck-install: + go install golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION) + +vulncheck: + govulncheck ./... \ No newline at end of file diff --git a/README.md b/README.md index 7c1edbc..f506960 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,6 @@ A Go SDK for Switcher API [![Master CI](https://github.com/switcherapi/switcher-client-go/actions/workflows/master.yml/badge.svg)](https://github.com/switcherapi/switcher-client-go/actions/workflows/master.yml) [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=switcherapi_switcher-client-go&metric=alert_status)](https://sonarcloud.io/dashboard?id=switcherapi_switcher-client-go) ![Known Vulnerabilities](https://snyk.io/test/github/switcherapi/switcher-client-go/badge.svg) -[![Go Report Card](https://goreportcard.com/badge/github.com/switcherapi/switcher-client-go)](https://goreportcard.com/report/github.com/switcherapi/switcher-client-go) ![Go](https://img.shields.io/badge/go-1.25%2B-blue.svg) ![Status](https://img.shields.io/badge/status-under_development-orange.svg) ![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)