ingest

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EvidenceClassPolicyDecision = "policy_decision"
	EvidenceClassApproval       = "approval"
	EvidenceClassJITCredential  = "jit_credential" // #nosec G101 -- Deterministic runtime evidence label, not credential material.
	EvidenceClassFreezeWindow   = "freeze_window"
	EvidenceClassKillSwitch     = "kill_switch"
	EvidenceClassActionOutcome  = "action_outcome"
	EvidenceClassProofVerify    = "proof_verification"
	EvidenceClassOther          = "other"
	CorrelationStatusMatched    = "matched"
	CorrelationStatusUnmatched  = "unmatched"
	CorrelationStatusStale      = "stale"
	CorrelationStatusConflict   = "conflict"
)
View Source
const SchemaVersion = "v1"

Variables

This section is empty.

Functions

func DefaultPath

func DefaultPath(statePath string) string

func Save

func Save(path string, bundle Bundle) error

Types

type Bundle

type Bundle struct {
	SchemaVersion string   `json:"schema_version"`
	GeneratedAt   string   `json:"generated_at"`
	Records       []Record `json:"records"`
}

func Load

func Load(path string) (Bundle, error)

func LoadOptional

func LoadOptional(statePath string) (Bundle, string, error)

func Normalize

func Normalize(bundle Bundle) (Bundle, error)

type Correlation

type Correlation struct {
	PathID           string   `json:"path_id"`
	AgentID          string   `json:"agent_id,omitempty"`
	Tool             string   `json:"tool,omitempty"`
	Repo             string   `json:"repo,omitempty"`
	Location         string   `json:"location,omitempty"`
	Target           string   `json:"target,omitempty"`
	Status           string   `json:"status"`
	EvidenceClasses  []string `json:"evidence_classes,omitempty"`
	ActionClasses    []string `json:"action_classes,omitempty"`
	Sources          []string `json:"sources,omitempty"`
	PolicyRefs       []string `json:"policy_refs,omitempty"`
	ProofRefs        []string `json:"proof_refs,omitempty"`
	GraphNodeRefs    []string `json:"graph_node_refs,omitempty"`
	GraphEdgeRefs    []string `json:"graph_edge_refs,omitempty"`
	RecordIDs        []string `json:"record_ids,omitempty"`
	LatestObservedAt string   `json:"latest_observed_at,omitempty"`
}

type Record

type Record struct {
	RecordID      string   `json:"record_id"`
	PathID        string   `json:"path_id,omitempty"`
	AgentID       string   `json:"agent_id,omitempty"`
	Tool          string   `json:"tool,omitempty"`
	Repo          string   `json:"repo,omitempty"`
	Location      string   `json:"location,omitempty"`
	Target        string   `json:"target,omitempty"`
	ActionClasses []string `json:"action_classes,omitempty"`
	PolicyRef     string   `json:"policy_ref,omitempty"`
	ProofRef      string   `json:"proof_ref,omitempty"`
	GraphNodeRefs []string `json:"graph_node_refs,omitempty"`
	GraphEdgeRefs []string `json:"graph_edge_refs,omitempty"`
	Source        string   `json:"source"`
	ObservedAt    string   `json:"observed_at"`
	EvidenceClass string   `json:"evidence_class"`
	Status        string   `json:"status,omitempty"`
	EvidenceRefs  []string `json:"evidence_refs,omitempty"`
}

type Summary

type Summary struct {
	ArtifactPath     string        `json:"artifact_path,omitempty"`
	TotalRecords     int           `json:"total_records"`
	MatchedRecords   int           `json:"matched_records"`
	UnmatchedRecords int           `json:"unmatched_records"`
	Correlations     []Correlation `json:"correlations,omitempty"`
}

func Correlate

func Correlate(snapshot state.Snapshot, artifactPath string, bundle Bundle) Summary

Jump to

Keyboard shortcuts

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