From 941a37e07588ced89a681e6e1b2f5ad45ab92c7f Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:40:26 -0700 Subject: [PATCH 1/2] chore(ci): added govulncheck --- .github/workflows/master.yml | 3 +++ .github/workflows/sonar.yml | 5 ++++- Makefile | 9 ++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 91e208b..5f5a5c5 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -38,6 +38,9 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} if: env.SONAR_TOKEN != '' + - name: Vulnerability Check + run: go install golang.org/x/vuln/cmd/govulncheck@v1.5.0 && 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..f3d4bc1 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -58,4 +58,7 @@ 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@v1.5.0 && 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 From 9d61f323ea7bff67bcf0d350925aab4ec4d6d049 Mon Sep 17 00:00:00 2001 From: petruki <31597636+petruki@users.noreply.github.com> Date: Sat, 4 Jul 2026 14:50:18 -0700 Subject: [PATCH 2/2] fix(ci): replaced govulncheck tag with commit hash --- .github/workflows/master.yml | 4 +++- .github/workflows/sonar.yml | 4 +++- README.md | 1 - 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 5f5a5c5..98f5523 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -39,7 +39,9 @@ jobs: if: env.SONAR_TOKEN != '' - name: Vulnerability Check - run: go install golang.org/x/vuln/cmd/govulncheck@v1.5.0 && govulncheck ./... + run: | + go install golang.org/x/vuln/cmd/govulncheck@3e6f44f962742443c11ae2261f02e0c917aeb2bc + govulncheck ./... build-test: name: Build & Test - Go ${{ matrix.go-version }} on ${{ matrix.os }} diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index f3d4bc1..c861a2d 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -61,4 +61,6 @@ jobs: -Dsonar.pullrequest.base=${{ steps.pr.outputs.base_ref }} - name: Vulnerability Check - run: go install golang.org/x/vuln/cmd/govulncheck@v1.5.0 && govulncheck ./... \ No newline at end of file + run: | + go install golang.org/x/vuln/cmd/govulncheck@3e6f44f962742443c11ae2261f02e0c917aeb2bc + 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)