name: govulncheck

on:
  push:
  pull_request:
  schedule:
    - cron: "22 10 * * *"
  workflow_dispatch:

permissions:
  contents: read

jobs:
  govulncheck:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false
      - uses: actions/setup-go@v6
        with:
          go-version-file: go.mod
      - run: |
          # v1.4.0 currently panics under Go 1.26 while building the SSA call graph.
          go run golang.org/x/vuln/cmd/govulncheck@v1.3.0 ./...
