GitHub action for govulncheck

Clone this repo:
  1. dd0578b all: provide options to specify action output by Zvonimir Pavlinovic · 8 weeks ago master v1 v1.0.3
  2. 3a32958 action.yml: update actions to latest versions by Tobias Klauser · 7 months ago v1.0.2
  3. 7da72f7 all: allow go.mod or Go version to be used by Zvonimir Pavlinovic · 11 months ago v1.0.1
  4. b56219a action.yml: provide option to checkout repository by Zvonimir Pavlinovic · 11 months ago
  5. 5f206a9 actions.yml: add working directory input by Zvonimir Pavlinovic · 11 months ago

GitHub Action for govulncheck

This repository holds the GitHub Action for govulncheck.

Govulncheck provides a low-noise, reliable way for Go users to learn about known vulnerabilities that may affect their dependencies. See details on Go's support for vulnerability management.

The govulncheck GitHub Action is currently experimental and is under active development.

Using the govulncheck GitHub Action

To use the govulncheck GitHub Action add the following step to your workflow:

- id: govulncheck
  uses: golang/govulncheck-action@v1

By default the govulncheck Github Action will run with the latest version of Go and analyze all packages in the provided Go module. Assuming you have the latest Go version installed locally, this is equivalent to running the following on your command line:

$ govulncheck ./...

To specify a specific Go version, directory in which to run govulncheck, or package pattern, use the following syntax:

- id: govulncheck
  uses: golang/govulncheck-action@v1
     go-version-input: <your-Go-version>
     go-package: <your-package-pattern>

For example, the code snippet below can be used to run govulncheck against a repository on every push:

on: [push]

    runs-on: ubuntu-latest
    name: Run govulncheck
      - id: govulncheck
        uses: golang/govulncheck-action@v1
           go-version-input: 1.20.6
           go-package: ./...

govulncheck Github Action accepts several other optional inputs:

work-dir: directory in which to run govulncheck, default '.'
repo-checkout: checkout the repository, default true
check-latest: check for the latest Go version, default false
go-version-file: go.mod or file specifying Go version, default ''
output-format: the format of govulncheck output ('text', 'json', or 'sarif'), default 'text'
output-file: the file to which the output is redirected, default '' (no

The precedence for inputs go-version-input, go-version-file, and check-latest specifying Go version is inherited from actions/setup-go.

The govulncheck-action follows the exit codes of govulncheck command. Specifying the output format ‘json’ or ‘sarif’ will return success even if there are some vulnerabilities detected. See here for more information.

When a vulnerability is found with ‘text’ output format, an error will be displayed for that GitHub job with information about the vulnerability and how to fix it. For example:



Our canonical Git repository is located at There is a mirror of the repository at See for details on how to contribute.


The main issue tracker for the time repository is located at

If you want to report a bug or have a feature suggestion, please file an issue at, prefixed with govulncheck-action: in the title.


Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.