From 3a1a7a0408475eea1543c73d0d55ff5245efe949 Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Wed, 3 Apr 2024 10:30:19 +0200 Subject: [PATCH] CI: Run "govulncheck". --- .github/workflows/govuln.yml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/govuln.yml diff --git a/.github/workflows/govuln.yml b/.github/workflows/govuln.yml new file mode 100644 index 0000000..1db6237 --- /dev/null +++ b/.github/workflows/govuln.yml @@ -0,0 +1,47 @@ +name: Go Vulnerability Checker +on: + push: + branches: [ master ] + paths: + - '.github/workflows/govuln.yml' + - '**.go' + - 'go.*' + pull_request: + branches: [ master ] + paths: + - '.github/workflows/govuln.yml' + - '**.go' + - 'go.*' + schedule: + - cron: "0 2 * * SUN" + +permissions: + contents: read + +jobs: + run: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: + - "1.20" + - "1.21" + - "1.22" + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - run: date + + - name: Install dependencies + run: | + sudo apt -y update && sudo apt -y install protobuf-compiler + make common + + - name: Install and run govulncheck + run: | + set -euo pipefail + go install golang.org/x/vuln/cmd/govulncheck@latest + govulncheck ./...