Skip to content

Commit

Permalink
Merge pull request #34 from rancherlabs/windows
Browse files Browse the repository at this point in the history
sbom: Add support for `windows/amd64`
  • Loading branch information
pjbgf authored Feb 5, 2025
2 parents 6c27ba2 + 19641af commit e144311
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cmd/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ func sbomCmd(img, outformat, platform string) error {
spdx = data.LinuxAmd64.SPDX
} else if strings.EqualFold(platform, "linux/arm64") && data.LinuxArm64 != nil {
spdx = data.LinuxArm64.SPDX
} else if strings.EqualFold(platform, "windows/amd64") && data.WindowsAmd64 != nil {
spdx = data.WindowsAmd64.SPDX
} else if data.SPDX != nil {
spdx = *data.SPDX
} else {
Expand Down
7 changes: 4 additions & 3 deletions internal/sbom/sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ import (
)

type BuildKitSBOM struct {
LinuxAmd64 *archSBOM `json:"linux/amd64,omitempty"`
LinuxArm64 *archSBOM `json:"linux/arm64,omitempty"`
SPDX *json.RawMessage `json:"SPDX,omitempty"`
LinuxAmd64 *archSBOM `json:"linux/amd64,omitempty"`
LinuxArm64 *archSBOM `json:"linux/arm64,omitempty"`
WindowsAmd64 *archSBOM `json:"windows/amd64,omitempty"`
SPDX *json.RawMessage `json:"SPDX,omitempty"`
}

type archSBOM struct {
Expand Down

0 comments on commit e144311

Please # to comment.