Add go version information to version string
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?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Brian Williams