diff

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Empty

func Empty(result Result) bool

Types

type ChangedItem

type ChangedItem struct {
	Key               Key      `json:"key"`
	PreviousPerms     []string `json:"previous_permissions"`
	CurrentPerms      []string `json:"current_permissions"`
	PermissionChanged bool     `json:"permission_changed"`
}

ChangedItem reports the before/after permission tuple when key identity is stable.

type Key

type Key struct {
	FindingType     string `json:"finding_type"`
	RuleID          string `json:"rule_id,omitempty"`
	DiscoveryMethod string `json:"discovery_method,omitempty"`
	ToolType        string `json:"tool_type"`
	Location        string `json:"location"`
	Repo            string `json:"repo,omitempty"`
	Org             string `json:"org"`
	Detector        string `json:"detector,omitempty"`
	CheckResult     string `json:"check_result,omitempty"`
	Severity        string `json:"severity,omitempty"`
	Autonomy        string `json:"autonomy,omitempty"`
	EvidenceKey     string `json:"evidence_key,omitempty"`
	ParseError      string `json:"parse_error,omitempty"`
}

Key is the tuple-key identity contract for diffing.

type Result

type Result struct {
	Added   []source.Finding `json:"added"`
	Removed []source.Finding `json:"removed"`
	Changed []ChangedItem    `json:"changed"`
}

Result is the deterministic diff payload.

func Compute

func Compute(previous, current []source.Finding) Result

Jump to

Keyboard shortcuts

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