Skip to content

Add go version information to version string

Brian Williams requested to merge bwill/include-go-info-in-version-string into main

What does this MR do?

This change adds the Go version, as well as the OS and architecture that the binary was built with to the version string. This will help with determining what Go version that the binary was built with to aid in debugging, determining if security fixes are needed, and so on.

This will cause the --version output to look like:

$ go run . --version
[INFO] [cluster-image-scanning] [2022-02-14T14:00:02-06:00] ▶ GitLab cluster-image-scanning analyzer vX.Y.Z
analyzer version vX.Y.Z (go1.17.6 darwin/amd64)

This change should only affect the CLI --version output and will not change the scanner version that appears in reports.

What are the relevant issue numbers?

Does this MR meet the acceptance criteria?

Edited by Brian Williams

Merge request reports