analyzer

package
v1.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVex

func AddVex(vex *cyclonedx.Vulnerability, vexList *[]cyclonedx.Vulnerability)

func AnalyzeCDX

func AnalyzeCDX(sbom *cyclonedx.BOM)

AnalyzeCDX is a function that accepts a CycloneDX BOM (Software Bill of Materials) as input. It calls findMatchingVulnerabilities to search for vulnerabilities affecting the components in the BOM, and appends any found vulnerabilities to the BOM's Vulnerabilities list.

func MatchCPE

func MatchCPE(cpes []string, criteria *types.Criteria) bool

MatchCPE is a function that takes in a slice of Common Platform Enumeration (CPE) strings and a pointer to a `types.Criteria` object, and returns true if any CPE matches the criteria, false otherwise. Input: a slice of CPE strings, and a pointer to a `types.Criteria` object. Output: a boolean value indicating whether any CPE matched the criteria.

func MatchConstraint

func MatchConstraint(packageVersion *string, criteria *types.Criteria) bool

func New

func New(params types.Parameters)

New is the main function for the analyzer It checks if the database is up to date, then scans the target with diggity It then gets the sbom from cdx mod and analyzes it to find vulnerabilities Finally, it displays the results

func ToVex

func ToVex(pkg *cyclonedx.Component, vuln *types.Vulnerability) *cyclonedx.Vulnerability

ToVex function creates a new CycloneDX vulnerability object given a pointer to a CycloneDX component and a pointer to a types.Vulnerability object. The function initializes the new vulnerability object with data such as vulnerability rating, source of the vulnerability, description and recommendation to fix the vulnerability.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL