8000 GitHub - hamba/vulnfix: Go vulnerability updater · GitHub
[go: up one dir, main page]

Skip to content
{"props":{"color_mode":"dark","logged_in":false,"marketing_page":false,"home_path":"/","login_path":"/login?return_to=https%3A%2F%2FGitHub.com%2Fhamba%2Fvulnfix","signup_path":"/signup?ref_cta=Sign+up\u0026ref_loc=header+logged+out\u0026ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E\u0026source=header-repo\u0026source_repo=hamba%2Fvulnfix","signup_enabled":true,"is_signup_controller":false,"show_search_and_nav":true,"hide_search":false,"private_mode_enabled":false,"should_use_dotcom_links":true,"auth_hydro_click":"{\"event_type\":\"authentication.click\",\"payload\":{\"location_in_page\":\"site header menu\",\"repository_id\":null,\"auth_type\":\"SIGN_UP\",\"originating_url\":\"https://GitHub.com/hamba/vulnfix\",\"user_id\":null}}","auth_hydro_click_hmac":"5bb525e2d4870bcf151b70e957bc728fe7e97c36c4d20168fe674d8dcd0ee49f"}}
hambaPublic

About

Go vulnerability updater

Resources

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Logo

Go Report Card Build Status Coverage Status Go Reference GitHub release GitHub license

vulnfix consumes govulncheck -json output and applies dependency fixes to a Go module.

It is designed for a simple workflow:

  1. run govulncheck -json
  2. pipe the output to vulnfix
  3. let vulnfix update vulnerable modules and tidy the module graph

Install

go install github.com/hamba/vulnfix@latest

Usage

govulncheck -json ./... | vulnfix

Run in a different module directory:

govulncheck -json ./... | vulnfix -C /path/to/module

You can also apply fixes from a saved report:

vulnfix < govulncheck-report.json

Optionally write a Markdown CVE report:

govulncheck -json ./... | vulnfix -o report.md

How It Works

vulnfix parses the govulncheck -json output and collects the minimum fixed version for each vulnerable module. It then runs go get <module>@<version> for each affected dependency and follows up with go mod tidy to keep the module graph clean.

Special pseudo-modules are handled automatically:

Module Action
stdlib Updates the go directive via go get go@<version>
toolchain Updates the toolchain directive via go get toolchain@<version>
everything else Regular go get <module>@<version>

About

Go vulnerability updater

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages

0