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.
Click to show internal directories.
Click to hide internal directories.