-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
206 additions
and
85 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
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 |
---|---|---|
@@ -1,24 +1,82 @@ | ||
package model | ||
|
||
import ( | ||
"github.com/aquasecurity/trivy/pkg/sbom/cyclonedx" | ||
) | ||
import "time" | ||
|
||
type Sbom struct { | ||
ID string | ||
Report cyclonedx.BOM | ||
} | ||
//"github.com/aquasecurity/trivy/pkg/sbom/cyclonedx" | ||
|
||
// type Sbom struct { | ||
// ID string | ||
// Report cyclonedx.BOM | ||
// } | ||
|
||
type SbomData struct { | ||
ID string | ||
// type SbomData struct { | ||
// ID string | ||
// ClusterName string | ||
// ComponentName string | ||
// PackageName string | ||
// PackageUrl string | ||
// BomRef string | ||
// SerialNumber string | ||
// CycloneDxVersion int | ||
// BomFormat string | ||
// } | ||
|
||
type Sbom struct { | ||
ID string | ||
ClusterName string | ||
ComponentName string | ||
PackageName string | ||
PackageUrl string | ||
BomRef string | ||
SerialNumber string | ||
CycloneDxVersion int | ||
BomFormat string | ||
Report AutoGenerated | ||
} | ||
|
||
// type SbomData struct { | ||
// ID string | ||
// ClusterName string | ||
// ComponentName string | ||
// PackageName string | ||
// PackageUrl string | ||
// BomRef string | ||
// SerialNumber string | ||
// CycloneDxVersion int | ||
// BomFormat string | ||
// } | ||
|
||
type AutoGenerated struct { | ||
Schema string `json:"$schema"` | ||
BomFormat string `json:"bomFormat"` | ||
SpecVersion string `json:"specVersion"` | ||
SerialNumber string `json:"serialNumber"` | ||
Version int `json:"version"` | ||
Metadata struct { | ||
Timestamp time.Time `json:"timestamp"` | ||
Tools []struct { | ||
Vendor string `json:"vendor"` | ||
Name string `json:"name"` | ||
Version string `json:"version"` | ||
} `json:"tools"` | ||
Component struct { | ||
BomRef string `json:"bom-ref"` | ||
Type string `json:"type"` | ||
Name string `json:"name"` | ||
Purl string `json:"purl"` | ||
Properties []struct { | ||
Name string `json:"name"` | ||
Value string `json:"value"` | ||
} `json:"properties"` | ||
} `json:"component"` | ||
} `json:"metadata"` | ||
Components []struct { | ||
BomRef string `json:"bom-ref"` | ||
Type string `json:"type"` | ||
Name string `json:"name"` | ||
Properties []struct { | ||
Name string `json:"name"` | ||
Value string `json:"value"` | ||
} `json:"properties"` | ||
Version string `json:"version,omitempty"` | ||
Purl string `json:"purl,omitempty"` | ||
} `json:"components"` | ||
Dependencies []struct { | ||
Ref string `json:"ref"` | ||
DependsOn []string `json:"dependsOn"` | ||
} `json:"dependencies"` | ||
Vulnerabilities []interface{} `json:"vulnerabilities"` | ||
} |