name: Security # govulncheck reads the live vulnerability database, so the weekly run # reports a new advisory against code that has not changed. Scheduled runs # use the default branch's copy of this file. on: push: branches: [main] schedule: - cron: '0 6 * * 1' jobs: govulncheck: name: Vulnerability check runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod # The scan covers the standard library of the Go release that runs it, # which must be the release go.mod names, the one releases are built # with: its toolchain line if it has one, else its go line. - name: Check the Go toolchain run: | want="$(sed -n 's/^toolchain //p' go.mod)" [ -n "$want" ] || want="go$(sed -n 's/^go //p' go.mod)" have="$(go env GOVERSION)" echo "go.mod names: $want; running: $have" [ "$have" = "$want" ] - name: govulncheck run: go tool govulncheck ./...