Documentation
¶
Index ¶
- func AddServiceToBomIfNotExists(bom *cyclonedx.BOM, service cyclonedx.Service)
- func AppendAffectedVersionsIfNotExists(affect *cyclonedx.Affects, affectedVersions ...cyclonedx.AffectedVersions)
- func AppendComponents(bom *cyclonedx.BOM, components *[]cyclonedx.Component)
- func AppendDependencies(bom *cyclonedx.BOM, dependencies *[]cyclonedx.Dependency)
- func AppendProperties(properties *[]cyclonedx.Property, newProperties ...cyclonedx.Property) *[]cyclonedx.Property
- func AttachComponentAffects(issue *cyclonedx.Vulnerability, affectedComponent cyclonedx.Component, ...)
- func AttachEvidenceOccurrenceToComponent(component *cyclonedx.Component, ...)
- func AttachLicenseToComponent(component *cyclonedx.Component, license cyclonedx.LicenseChoice)
- func ConvertToAffectedVersions(affectedComponent cyclonedx.Component, fixedVersion []string) *[]cyclonedx.AffectedVersions
- func CreateBaseVulnerability(params CdxVulnerabilityParams, properties ...cyclonedx.Property) cyclonedx.Vulnerability
- func CreateFileOrDirComponent(filePathOrUri string) (component cyclonedx.Component)
- func CreateScaImpactedAffects(impactedPackageComponent cyclonedx.Component, fixedVersions []string) (affect cyclonedx.Affects)
- func Exclude(bom cyclonedx.BOM, componentsToExclude ...cyclonedx.Component) (filteredSbom *cyclonedx.BOM)
- func GetDirectDependencies(dependencies *[]cyclonedx.Dependency, ref string) []string
- func GetFileRef(filePathOrUri string) string
- func GetOrCreateScaIssue(destination *cyclonedx.BOM, params CdxVulnerabilityParams, ...) (scaVulnerability *cyclonedx.Vulnerability)
- func GetProperty(properties *[]cyclonedx.Property, name string) *cyclonedx.Property
- func GetRootDependenciesEntries(bom *cyclonedx.BOM, skipDefaultRoot bool) (roots []cyclonedx.Dependency)
- func GetSerialNumber(id string) string
- func GetTrimmedPurlByRef(dep string, components *[]cyclonedx.Component) string
- func HasImpactedAffects(vulnerability cyclonedx.Vulnerability, affectedComponent cyclonedx.Component) bool
- func SearchComponentByCleanPurl(components *[]cyclonedx.Component, purl string) (component *cyclonedx.Component)
- func SearchComponentByRef(components *[]cyclonedx.Component, ref string) (component *cyclonedx.Component)
- func SearchDependencyEntry(dependencies *[]cyclonedx.Dependency, ref string) *cyclonedx.Dependency
- func SearchForServiceByName(bom *cyclonedx.BOM, serviceName string) *cyclonedx.Service
- func SearchParents(componentRef string, components []cyclonedx.Component, ...) []cyclonedx.Component
- func SearchRating(ratings *[]cyclonedx.VulnerabilityRating, method cyclonedx.ScoringMethod, ...) *cyclonedx.VulnerabilityRating
- func SearchVulnerabilityByRef(destination *cyclonedx.BOM, ref string) *cyclonedx.Vulnerability
- type CdxVulnerabilityParams
- type ComponentRelation
- type FullBOM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendAffectedVersionsIfNotExists ¶ added in v1.22.0
func AppendAffectedVersionsIfNotExists(affect *cyclonedx.Affects, affectedVersions ...cyclonedx.AffectedVersions)
func AppendComponents ¶ added in v1.21.0
func AppendDependencies ¶ added in v1.21.0
func AppendDependencies(bom *cyclonedx.BOM, dependencies *[]cyclonedx.Dependency)
func AppendProperties ¶
func AppendProperties(properties *[]cyclonedx.Property, newProperties ...cyclonedx.Property) *[]cyclonedx.Property
AppendProperties appends new properties to the existing properties list and returns the updated list.
func AttachComponentAffects ¶
func AttachEvidenceOccurrenceToComponent ¶
func AttachEvidenceOccurrenceToComponent(component *cyclonedx.Component, evidenceOccurrence cyclonedx.EvidenceOccurrence)
func AttachLicenseToComponent ¶
func AttachLicenseToComponent(component *cyclonedx.Component, license cyclonedx.LicenseChoice)
func ConvertToAffectedVersions ¶ added in v1.23.0
func ConvertToAffectedVersions(affectedComponent cyclonedx.Component, fixedVersion []string) *[]cyclonedx.AffectedVersions
func CreateBaseVulnerability ¶
func CreateBaseVulnerability(params CdxVulnerabilityParams, properties ...cyclonedx.Property) cyclonedx.Vulnerability
func GetDirectDependencies ¶
func GetDirectDependencies(dependencies *[]cyclonedx.Dependency, ref string) []string
func GetFileRef ¶
func GetOrCreateScaIssue ¶
func GetOrCreateScaIssue(destination *cyclonedx.BOM, params CdxVulnerabilityParams, properties ...cyclonedx.Property) (scaVulnerability *cyclonedx.Vulnerability)
Returns the index of the vulnerability in the BOM
func GetProperty ¶
func GetRootDependenciesEntries ¶
func GetRootDependenciesEntries(bom *cyclonedx.BOM, skipDefaultRoot bool) (roots []cyclonedx.Dependency)
func GetSerialNumber ¶
func GetTrimmedPurlByRef ¶ added in v1.25.0
func HasImpactedAffects ¶
func HasImpactedAffects(vulnerability cyclonedx.Vulnerability, affectedComponent cyclonedx.Component) bool
func SearchComponentByCleanPurl ¶ added in v1.25.0
func SearchComponentByRef ¶
func SearchDependencyEntry ¶
func SearchDependencyEntry(dependencies *[]cyclonedx.Dependency, ref string) *cyclonedx.Dependency
SearchDependencyEntry searches for a dependency entry by reference in the provided dependencies list.
func SearchForServiceByName ¶
func SearchParents ¶
func SearchRating ¶
func SearchRating(ratings *[]cyclonedx.VulnerabilityRating, method cyclonedx.ScoringMethod, sources ...*cyclonedx.Source) *cyclonedx.VulnerabilityRating
func SearchVulnerabilityByRef ¶
func SearchVulnerabilityByRef(destination *cyclonedx.BOM, ref string) *cyclonedx.Vulnerability
Types ¶
type CdxVulnerabilityParams ¶
type ComponentRelation ¶
type ComponentRelation string
const ( // Indicates that the component is a root component in the BOM RootRelation ComponentRelation = "root" // Indicates that the component is a direct dependency of another component DirectRelation ComponentRelation = "direct_dependency" // Indicates that the component is a transitive dependency of another component TransitiveRelation ComponentRelation = "transitive_dependency" // Undefined relation UnknownRelation ComponentRelation = "" )
func GetComponentRelation ¶
func GetComponentRelation(bom *cyclonedx.BOM, componentRef string, skipDefaultRoot bool) ComponentRelation
Click to show internal directories.
Click to hide internal directories.