resolution

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MatchConfidenceHigh      = "high"
	MatchConfidenceMedium    = "medium"
	MatchConfidenceLow       = "low"
	MatchConfidenceAmbiguous = "ambiguous"
)

Variables

This section is empty.

Functions

func HasSelectorFields

func HasSelectorFields(in Selector) bool

func NormalizePath

func NormalizePath(value string) string

Types

type Candidate

type Candidate struct {
	Org               string
	Repo              string
	ToolType          string
	Location          string
	ActionClasses     []string
	TargetClass       string
	CredentialKinds   []string
	FindingKeys       []string
	EvidenceLocations []string
}

func NormalizeCandidate

func NormalizeCandidate(in Candidate) Candidate

type MatchResult

type MatchResult struct {
	Matched         bool
	Confidence      string
	MismatchReasons []string
	Score           int
}

func Match

func Match(selector Selector, candidate Candidate) MatchResult

type Selector

type Selector struct {
	Repo              string   `json:"repo,omitempty" yaml:"repo,omitempty"`
	ToolType          string   `json:"tool_type,omitempty" yaml:"tool_type,omitempty"`
	Locations         []string `json:"locations,omitempty" yaml:"locations,omitempty"`
	ActionClasses     []string `json:"action_classes,omitempty" yaml:"action_classes,omitempty"`
	TargetClass       string   `json:"target_class,omitempty" yaml:"target_class,omitempty"`
	CredentialKinds   []string `json:"credential_kinds,omitempty" yaml:"credential_kinds,omitempty"`
	FindingKeys       []string `json:"finding_keys,omitempty" yaml:"finding_keys,omitempty"`
	EvidenceLocations []string `json:"evidence_locations,omitempty" yaml:"evidence_locations,omitempty"`
}

func CloneSelector

func CloneSelector(in *Selector) *Selector

func NormalizeSelector

func NormalizeSelector(in Selector) Selector

Jump to

Keyboard shortcuts

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