-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for build info in binaries built with go 1.18+ (#101)
* parse go 1.18+ output of `go version -m` also fix version detection to also recognize development builds of go Signed-off-by: nscuro <nscuro@protonmail.com> * handle more build settings (if available) Signed-off-by: nscuro <nscuro@protonmail.com> * also consider compiler setting Signed-off-by: nscuro <nscuro@protonmail.com> * regenerate example sboms Signed-off-by: nscuro <nscuro@protonmail.com> * add e2e test for binary built with go 1.18 Signed-off-by: nscuro <nscuro@protonmail.com> * update changelog Signed-off-by: nscuro <nscuro@protonmail.com> * add test; minor tweaks Signed-off-by: nscuro <nscuro@protonmail.com>
- Loading branch information
Showing
22 changed files
with
466 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<bom xmlns="http://cyclonedx.org/schema/bom/1.3" serialNumber="urn:uuid:00000000-0000-0000-0000-000000000000" version="1"> | ||
<metadata> | ||
<component bom-ref="pkg:golang/testmod-simple@v0.0.0-20210716183230-c7ea7c975ab8?type=module" type="application"> | ||
<name>testmod-simple</name> | ||
<version>v0.0.0-20210716183230-c7ea7c975ab8</version> | ||
<purl>pkg:golang/testmod-simple@v0.0.0-20210716183230-c7ea7c975ab8?type=module</purl> | ||
</component> | ||
<properties> | ||
<property name="cdx:gomod:binary:hash:MD5">2c07cd14d44d6755840ac54352af3b8e</property> | ||
<property name="cdx:gomod:binary:hash:SHA-1">8118611f54381a50ecf93426c634cd2f252a43d9</property> | ||
<property name="cdx:gomod:binary:hash:SHA-256">6cbded365fd60481e0590ea48e755a3707226b38e255ae9ad39c05acf1ef2e6d</property> | ||
<property name="cdx:gomod:binary:hash:SHA-384">76386970bea6b0b8f3dd69d2fc0a73ec5e68a13f7223840bf5bde7c089663f163114daec07d2f127c543b45be40ddf85</property> | ||
<property name="cdx:gomod:binary:hash:SHA-512">d46e44061199deb900cfed6087db53741a03659a478e4ba3179dedd6bfe322664c18383ccbad0b8185d507717f67e31038d54dfd612718f8ea50038ce516b32e</property> | ||
<property name="cdx:gomod:binary:name">simple1.18</property> | ||
<property name="cdx:gomod:build:compiler">gc</property> | ||
<property name="cdx:gomod:build:env:CGO_ENABLED">1</property> | ||
<property name="cdx:gomod:build:env:GOARCH">amd64</property> | ||
<property name="cdx:gomod:build:env:GOOS">linux</property> | ||
<property name="cdx:gomod:build:env:GOVERSION">go1.18-36be0be</property> | ||
<property name="cdx:gomod:build:vcs">git</property> | ||
<property name="cdx:gomod:build:vcs:modified">false</property> | ||
<property name="cdx:gomod:build:vcs:revision">c7ea7c975ab86e174b22b585c63b43bcc86e8772</property> | ||
<property name="cdx:gomod:build:vcs:time">2021-07-16T18:32:30Z</property> | ||
</properties> | ||
</metadata> | ||
<components> | ||
<component bom-ref="pkg:golang/github.com/google/uuid@v1.2.0?type=module" type="library"> | ||
<name>github.com/google/uuid</name> | ||
<version>v1.2.0</version> | ||
<scope>required</scope> | ||
<hashes> | ||
<hash alg="SHA-256">a8962d5e72515a6a5eee6ff75e5ca1aec2eb11446a1d1336931ce8c57ab2503b</hash> | ||
</hashes> | ||
<purl>pkg:golang/github.com/google/uuid@v1.2.0?type=module</purl> | ||
<externalReferences> | ||
<reference type="vcs"> | ||
<url>https://github.com/google/uuid</url> | ||
</reference> | ||
</externalReferences> | ||
</component> | ||
</components> | ||
<dependencies> | ||
<dependency ref="pkg:golang/testmod-simple@v0.0.0-20210716183230-c7ea7c975ab8?type=module"> | ||
<dependency ref="pkg:golang/github.com/google/uuid@v1.2.0?type=module"></dependency> | ||
</dependency> | ||
<dependency ref="pkg:golang/github.com/google/uuid@v1.2.0?type=module"></dependency> | ||
</dependencies> | ||
<compositions> | ||
<composition> | ||
<aggregate>complete</aggregate> | ||
<dependencies> | ||
<dependency ref="pkg:golang/testmod-simple@v0.0.0-20210716183230-c7ea7c975ab8?type=module"></dependency> | ||
</dependencies> | ||
</composition> | ||
<composition> | ||
<aggregate>unknown</aggregate> | ||
<dependencies> | ||
<dependency ref="pkg:golang/github.com/google/uuid@v1.2.0?type=module"></dependency> | ||
</dependencies> | ||
</composition> | ||
</compositions> | ||
</bom> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.