Documentation
¶
Index ¶
- type AnalysisInfo
- type BaseImageDetails
- type CycloneDXVersion
- type ExperimentalAnalysisConfig
- type ExperimentalLicenseConfig
- type GroupInfo
- type ImageMetadata
- type ImageOriginDetails
- type LayerMetadata
- type License
- type LicenseCount
- type Metadata
- type PackageInfo
- type PackageSource
- type PackageVulns
- type SourceInfo
- type VulnerabilityFlattened
- type VulnerabilityResults
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisInfo ¶
type BaseImageDetails ¶
type CycloneDXVersion ¶
type CycloneDXVersion int
const ( CycloneDXVersion14 CycloneDXVersion = iota CycloneDXVersion15 )
type ExperimentalAnalysisConfig ¶
type ExperimentalAnalysisConfig struct {
Licenses ExperimentalLicenseConfig `json:"licenses"`
}
ExperimentalAnalysisConfig is an experimental type intended to contain the types of analysis performed on packages found by the scanner.
type GroupInfo ¶
type GroupInfo struct {
// IDs expected to be sorted in alphanumeric order
IDs []string `json:"ids"`
// Aliases include all aliases and IDs
Aliases []string `json:"aliases"`
// Map of Vulnerability IDs to AnalysisInfo
ExperimentalAnalysis map[string]AnalysisInfo `json:"experimental_analysis,omitempty"`
MaxSeverity string `json:"max_severity"`
}
func (*GroupInfo) IndexString ¶
func (*GroupInfo) IsCalled ¶
IsCalled returns true if any analysis performed determines that the vulnerability is being called Also returns true if no analysis is performed
func (*GroupInfo) IsGroupUnimportant ¶
type ImageMetadata ¶
type ImageMetadata struct {
OS string `json:"os"`
LayerMetadata []LayerMetadata `json:"layer_metadata"`
BaseImages [][]BaseImageDetails `json:"base_images"`
}
type ImageOriginDetails ¶
type ImageOriginDetails struct {
Index int `json:"index"`
}
type LayerMetadata ¶
type LicenseCount ¶
type PackageInfo ¶
type PackageSource ¶
type PackageSource struct {
Source SourceInfo `json:"source"`
// Place Annotations in PackageSource instead of SourceInfo as we need SourceInfo to be mappable
ExperimentalAnnotations []extractor.Annotation `json:"experimental_annotations,omitempty"`
Packages []PackageVulns `json:"packages"`
}
PackageSource represents Vulnerabilities associated with a Source
type PackageVulns ¶
type PackageVulns struct {
Package PackageInfo `json:"package"`
DepGroups []string `json:"dependency_groups,omitempty"`
Vulnerabilities []osvschema.Vulnerability `json:"vulnerabilities,omitempty"`
Groups []GroupInfo `json:"groups,omitempty"`
Licenses []License `json:"licenses,omitempty"`
LicenseViolations []License `json:"license_violations,omitempty"`
}
PackageVulns grouped by package TODO: rename this to be Package as it now includes license information too.
type SourceInfo ¶
func (SourceInfo) String ¶
func (s SourceInfo) String() string
type VulnerabilityFlattened ¶
type VulnerabilityFlattened struct {
Source SourceInfo
Package PackageInfo
DepGroups []string
Vulnerability osvschema.Vulnerability
GroupInfo GroupInfo
Licenses []License
LicenseViolations []License
}
VulnerabilityFlattened is a flattened version of the VulnerabilityResults TODO: rename this to IssueFlattened or similar in the next major release as it now contains license violations.
type VulnerabilityResults ¶
type VulnerabilityResults struct {
Results []PackageSource `json:"results"`
ExperimentalAnalysisConfig ExperimentalAnalysisConfig `json:"experimental_config"`
ImageMetadata *ImageMetadata `json:"image_metadata,omitempty"`
LicenseSummary []LicenseCount `json:"license_summary,omitempty"`
}
VulnerabilityResults is the top-level struct for the results of a scan
func (*VulnerabilityResults) Flatten ¶
func (vulns *VulnerabilityResults) Flatten() []VulnerabilityFlattened
Flatten the grouped/nested vulnerability results into one flat array.