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 go.mod's toolchain line, the one releases are built # with. setup-go@v5 installs the go line's release and the go command # switches; fail if it did not. - name: Check the Go toolchain run: | want="$(sed -n 's/^toolchain //p' go.mod)" have="$(go env GOVERSION)" echo "go.mod toolchain: ${want:-none}; running: $have" [ "$have" = "$want" ] - name: govulncheck run: go tool govulncheck ./...