From 0758292c15b2c3eb1dae0a18241171965276b02b Mon Sep 17 00:00:00 2001 From: Rick Staa Date: Sun, 29 Nov 2026 09:27:20 +0100 Subject: [PATCH] ci: catch new go advisories weekly, not only on pull requests Co-Authored-By: Claude Opus 5.5 --- .github/workflows/security.yml | 33 +++++++++++++++++++++++++++++++++ docs/development.md | 4 +++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/security.yml diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml new file mode 100644 index 0000000..643447a --- /dev/null +++ b/.github/workflows/security.yml @@ -0,0 +1,33 @@ +name: Vulnerability scan + +# Pull requests already run govulncheck in ci.yml. This weekly run on main +# also catches advisories published while no pull request is open. + +on: + schedule: + - cron: "23 8 * * 1" + workflow_dispatch: + +permissions: + contents: read + +jobs: + govulncheck: + name: Check Go vulnerabilities + runs-on: ubuntu-26.04 + timeout-minutes: 15 + env: + GOTOOLCHAIN: local + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version-file: go.mod + cache: true + # Keep the govulncheck version in step with ci.yml. + - name: Vulnerability scan + run: | + go install golang.org/x/vuln/cmd/govulncheck@v1.8.0 + govulncheck ./... diff --git a/docs/development.md b/docs/development.md index 317fd76..c564fdd 100644 --- a/docs/development.md +++ b/docs/development.md @@ -55,7 +55,9 @@ go build ./... ``` [CI](../.github/workflows/ci.yml) also runs Staticcheck and Govulncheck, provisions -the SDK fixtures below, and saves test artifacts. Import boundaries are checked +the SDK fixtures below, and saves test artifacts. +[Vulnerability scan](../.github/workflows/security.yml) also runs Govulncheck on +`main` every Monday and on manual dispatch. Import boundaries are checked by `TestImportLattice` in [cmd/livepeer/imports_test.go](../cmd/livepeer/imports_test.go). ## SDK integration fixtures