attackpath

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: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ControlPathNodeControlPath       = "control_path"
	ControlPathNodeAgent             = "agent"
	ControlPathNodeExecutionIdentity = "execution_identity"
	ControlPathNodeCredential        = "credential"
	ControlPathNodeTool              = "tool"
	ControlPathNodeWorkflow          = "workflow"
	ControlPathNodeRepo              = "repo"
	ControlPathNodeGovernanceControl = "governance_control"
	ControlPathNodeTarget            = "target"
	ControlPathNodeActionCapability  = "action_capability"
)
View Source
const ControlPathGraphVersion = "1"

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlPathEdge added in v1.3.0

type ControlPathEdge struct {
	EdgeID       string   `json:"edge_id"`
	PathID       string   `json:"path_id"`
	Kind         string   `json:"kind"`
	FromNodeID   string   `json:"from_node_id"`
	ToNodeID     string   `json:"to_node_id"`
	EvidenceRefs []string `json:"evidence_refs,omitempty"`
	SourceRefs   []string `json:"source_refs,omitempty"`
}

type ControlPathGraph added in v1.3.0

type ControlPathGraph struct {
	Version string                  `json:"version"`
	Summary ControlPathGraphSummary `json:"summary"`
	Nodes   []ControlPathNode       `json:"nodes"`
	Edges   []ControlPathEdge       `json:"edges"`
}

func BuildControlPathGraph added in v1.3.0

func BuildControlPathGraph(paths []ControlPathInput) *ControlPathGraph

type ControlPathGraphSummary added in v1.3.0

type ControlPathGraphSummary struct {
	TotalNodes int                     `json:"total_nodes"`
	TotalEdges int                     `json:"total_edges"`
	NodeKinds  []ControlPathKindRollup `json:"node_kinds"`
	EdgeKinds  []ControlPathKindRollup `json:"edge_kinds"`
}

type ControlPathInput added in v1.3.0

type ControlPathInput struct {
	PathID                   string
	AgentID                  string
	Org                      string
	Repo                     string
	ToolType                 string
	Location                 string
	ExecutionIdentity        string
	ExecutionIdentityType    string
	ExecutionIdentitySource  string
	ExecutionIdentityStatus  string
	CredentialAccess         bool
	CredentialProvenance     *agginventory.CredentialProvenance
	GovernanceControls       []agginventory.GovernanceControlMapping
	MatchedProductionTargets []string
	WritePathClasses         []string
	PullRequestWrite         bool
	MergeExecute             bool
	DeployWrite              bool
	ProductionWrite          bool
	ApprovalGap              bool
}

type ControlPathKindRollup added in v1.3.0

type ControlPathKindRollup struct {
	Kind  string `json:"kind"`
	Count int    `json:"count"`
}

type ControlPathNode added in v1.3.0

type ControlPathNode struct {
	NodeID       string   `json:"node_id"`
	PathID       string   `json:"path_id"`
	Kind         string   `json:"kind"`
	Org          string   `json:"org"`
	Repo         string   `json:"repo"`
	Label        string   `json:"label,omitempty"`
	ToolType     string   `json:"tool_type,omitempty"`
	Location     string   `json:"location,omitempty"`
	AgentID      string   `json:"agent_id,omitempty"`
	Status       string   `json:"status,omitempty"`
	EvidenceRefs []string `json:"evidence_refs,omitempty"`
	SourceRefs   []string `json:"source_refs,omitempty"`
}

type Edge

type Edge struct {
	EdgeID       string `json:"edge_id"`
	Org          string `json:"org"`
	Repo         string `json:"repo"`
	FromNodeID   string `json:"from_node_id"`
	ToNodeID     string `json:"to_node_id"`
	Rationale    string `json:"rationale"`
	SourceLink   string `json:"source_link"`
	SourceDetail string `json:"source_detail"`
}

type Graph

type Graph struct {
	Org   string `json:"org"`
	Repo  string `json:"repo"`
	Nodes []Node `json:"nodes"`
	Edges []Edge `json:"edges"`
}

func Build

func Build(findings []model.Finding) []Graph

type Node

type Node struct {
	NodeID       string `json:"node_id"`
	Org          string `json:"org"`
	Repo         string `json:"repo"`
	Kind         string `json:"kind"`
	FindingType  string `json:"finding_type"`
	ToolType     string `json:"tool_type"`
	Location     string `json:"location"`
	CanonicalKey string `json:"canonical_key"`
}

Jump to

Keyboard shortcuts

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