ci

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiffVulnerabilityResults

func DiffVulnerabilityResults(oldRes, newRes models.VulnerabilityResults) models.VulnerabilityResults

DiffVulnerabilityResults will return any new vulnerabilities that are in `newRes` which is not present in `oldRes`, but not the reverse.

Current implementation is O(n^2) on the number of vulns, but can be reduced to linear time

func DiffVulnerabilityResultsByOccurrences

func DiffVulnerabilityResultsByOccurrences(oldRes, newRes models.VulnerabilityResults) map[string]int

DiffVulnerabilityResultsByOccurrences will return the occurrence of each vulnerability that are in `newRes` which is not present in `oldRes`, but not the reverse. This calculates the difference by vulnerability ID, while ignoring the source of the vulnerability.

This prevents us reporting "new" vulnerabilities in a PR when a previously vulnerable file is being moved.

func LoadVulnResults

func LoadVulnResults(path string) (models.VulnerabilityResults, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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