ownership

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package ownership is a test helper for AD-2 field ownership: each Finding field is set only by its owning stage. Stage tests run a stage on a fully populated Finding and assert every field the stage does not own is unchanged.

Index

Constants

This section is empty.

Variables

View Source
var (
	Detect   = []string{"ID", "Provider", "Detector", "AlsoMatchedBy", "Confidence", "Redacted", "CredentialParts", "Locations"}
	Suppress = []string{"Suppressed", "SuppressionReason"}
	Verify   = []string{"Status", "StatusReason", "Verified", "VerifyEvidence"}
	Enrich   = []string{"Tier", "Scopes", "Org", "FirstSeen", "AgeDays", "DollarsAtRiskPerDay", "PotentialDollarsAtRiskPerDay", "DollarsMethod"}
	FixPlan  = []string{"FixPlan"}
	// Baseline is set by the suppress stage's baseline comparison (Suppressor.Compare),
	// which runs after the merge on the final id. Suppress owns both sets.
	Baseline = []string{"NewVsBaseline"}
)

Fields owned by each stage (AD-2).

Functions

func Changed

func Changed(before, after model.Finding, owned []string) []string

Changed returns the names of the fields that differ between before and after and are not in owned, in declaration order.

func Full

func Full() model.Finding

Full returns a Finding with every field set.

Types

This section is empty.

Jump to

Keyboard shortcuts

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