Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BranchDiff ¶
type BranchDiff[T models.Vuln] struct { // Completely new vulnerabilities (not on any other branch) NewToAllBranches []T // Vulnerabilities that exist on other branches (need event history copied) ExistingOnOtherBranches []BranchVulnMatch[T] }
func DiffVulnsBetweenBranches ¶
func DiffVulnsBetweenBranches[T models.Vuln]( currentBranchVulns []T, otherBranchesVulns []T, ) BranchDiff[T]
Compare compares vulnerabilities on current branch with other branches
type BranchVulnMatch ¶
type BranchVulnMatch[T models.Vuln] struct { // The vulnerability as detected on the current branch CurrentBranchVuln T // The same vulnerability from other branches with their event history OtherBranchVulns []T // Consolidated events from all other branches (ready to copy) EventsToCopy []models.VulnEvent }
BranchVulnMatch represents a vulnerability found on current branch that exists elsewhere
type DependencyVulnStateMachine ¶
type DependencyVulnStateMachine struct {
}
type ScanDiff ¶
type ScanDiff struct {
// Newly discovered vulnerabilities (never seen before)
NewlyDiscovered []models.DependencyVuln
// Fixed everywhere (no longer detected in any artifact)
FixedEverywhere []models.DependencyVuln
// First time detected in this specific artifact (but exists elsewhere)
NewInArtifact []models.DependencyVuln
// No longer detected in this artifact (but still exists elsewhere)
RemovedFromArtifact []models.DependencyVuln
// Still detected, no changes
Unchanged []models.DependencyVuln
}
func DiffScanResults ¶
func DiffScanResults(artifactName string, foundVulns []models.DependencyVuln, existingVulns []models.DependencyVuln) ScanDiff
type VulnSet ¶
type VulnSet struct {
// contains filtered or unexported fields
}
func NewVulnSet ¶
func NewVulnSet(vulns []models.DependencyVuln) *VulnSet
NewVulnSet creates a new vulnerability set
func (*VulnSet) Add ¶
func (s *VulnSet) Add(vuln models.DependencyVuln)
Add adds a vulnerability to the set (deduplicates by hash)
func (*VulnSet) Contains ¶
func (s *VulnSet) Contains(vuln models.DependencyVuln) bool
Contains checks if a vulnerability exists in the set
func (*VulnSet) Get ¶
func (s *VulnSet) Get(vuln models.DependencyVuln) (models.DependencyVuln, bool)
Get retrieves a vulnerability from the set
Click to show internal directories.
Click to hide internal directories.