Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeRelaxPatches ¶
func ComputeRelaxPatches(ctx context.Context, cl client.ResolutionClient, result *resolution.ResolutionResult, opts RemediationOptions) ([]resolution.ResolutionDiff, error)
ComputeRelaxPatches attempts to resolve each vulnerability found in result independently, returning the list of unique possible patches
Types ¶
type InPlacePatch ¶ added in v1.7.0
type InPlacePatch struct { lf.DependencyPatch ResolvedVulns []resolution.ResolutionVuln }
type InPlaceResult ¶ added in v1.7.0
type InPlaceResult struct { Patches []InPlacePatch Unfixable []resolution.ResolutionVuln }
func ComputeInPlacePatches ¶ added in v1.7.0
func ComputeInPlacePatches(ctx context.Context, cl client.ResolutionClient, graph *resolve.Graph, opts RemediationOptions) (InPlaceResult, error)
ComputeInPlacePatches finds all possible targeting version changes that would fix vulnerabilities in a resolved graph. TODO: Check for introduced vulnerabilities
func (InPlaceResult) VulnCount ¶ added in v1.7.0
func (r InPlaceResult) VulnCount() VulnCount
type RemediationOptions ¶
type RemediationOptions struct { IgnoreVulns []string // Vulnerability IDs to ignore ExplicitVulns []string // If set, only consider these vulnerability IDs & ignore all others DevDeps bool // Whether to consider vulnerabilities in dev dependencies MinSeverity float64 // Minimum vulnerability CVSS score to consider MaxDepth int // Maximum depth of dependency to consider vulnerabilities for (e.g. 1 for direct only) AvoidPkgs []string // Names of dependencies to avoid upgrading AllowMajor bool // Whether to allow changes to major versions of direct dependencies }
func (RemediationOptions) MatchVuln ¶
func (opts RemediationOptions) MatchVuln(v resolution.ResolutionVuln) bool
Click to show internal directories.
Click to hide internal directories.