๐Ÿ“ฆ veggiemonk / buildinfo

extract build information from go binary

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ Apache License 2.0
binarybuildclidependenciesgogolangversionvulnerability
๐Ÿ“ฅ Clone https://github.com/veggiemonk/buildinfo.git
HTTPS git clone https://github.com/veggiemonk/buildinfo.git
SSH git clone git@github.com:veggiemonk/buildinfo.git
CLI gh repo clone veggiemonk/buildinfo
Julien Bisconti Julien Bisconti add install instruction 451c093 1 years ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“„ .gitignore
๐Ÿ“„ go.mod
๐Ÿ“„ LICENSE
๐Ÿ“„ main.go
๐Ÿ“„ README.md
๐Ÿ“„ README.md

buildinfo

Extract build information from Go binary

Install

go install github.com/veggiemonk/buildinfo@latest

Usage

Mostly used to update binaries that were install with go install.

buildinfo $(which pkgsite) | jq -r '.Path' | xargs -I {} go install "{}@latest"

Tips

  • Find the origin of the binary: buildinfo $(which hugo) | jq -r '.Main.Path'
  • Find the version of Go the binary was compiled with: buildinfo $(which gopls) | jq -r '.GoVersion'
  • Find the version of the binary: buildinfo $(which pkgsite) | jq -r '.Main.Version'
  • Filter dependencies: buildinfo $(which hugo) | jq -r -c '.Deps.[]' | grep yaml
Noteworthy:

  • Check for vulnerable binaries: govulncheck -mode=binary $(which hugo)