astutil

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CollectInsights

func CollectInsights(workflowFiles []parser.WorkflowFile) map[string]*Insight

CollectInsights parses workflow files into AST insights shared across reachability filtering, metadata enrichment, and advanced data-flow findings.

func EnrichFindingsWithMetadata

func EnrichFindingsWithMetadata(findings []rules.Finding, insights map[string]*Insight) []rules.Finding

EnrichFindingsWithMetadata decorates findings with runner and trigger context where available.

func FilterFindingsByReachability

func FilterFindingsByReachability(insights map[string]*Insight, findings []rules.Finding) ([]rules.Finding, int)

FilterFindingsByReachability removes findings tied to unreachable jobs or steps.

func GenerateDataFlowFindings

func GenerateDataFlowFindings(insights map[string]*Insight) []rules.Finding

GenerateDataFlowFindings converts AST taint analysis into actionable findings.

Types

type Insight

type Insight struct {
	Workflow     *ast.WorkflowAST
	Reachability map[string]bool
	DataFlows    []*ast.DataFlow
	Triggers     []string
	JobRunners   map[string]string
}

Insight captures parsed AST information for downstream enrichment.

type Stats

type Stats struct {
	SuppressedReachability int
	GeneratedDataFlows     int
}

Stats tracks AST post-processing effects for reporting.

Jump to

Keyboard shortcuts

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