Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSCallGraph ¶ added in v0.2.1
type CSCallGraph struct {
Nodes map[string]ContextNode // key: ContextNode.String()
Edges map[string][]ContextNode // caller → callees
ReverseEdges map[string][]ContextNode // callee → callers
Summaries map[string]FunctionSummary // key: ContextNode.String()
SCCs map[int]*SCC // SCC ID → SCC
NodeToSCC map[string]int // ContextNode → SCC ID
}
CSCallGraph is a context-sensitive call graph.
func NewCSCallGraph ¶ added in v0.2.1
func NewCSCallGraph() *CSCallGraph
NewCSCallGraph creates an empty context-sensitive call graph.
type CallEdge ¶
type CallEdge struct {
Caller Symbol
Callee Symbol
File string
Line int
Synthetic bool // true for virtual/inferred edges
}
CallEdge is a directed edge from Caller to Callee.
type Context ¶ added in v0.2.1
type Context struct {
Caller Symbol
}
Context represents k-CFA calling context (k=1: immediate caller).
type ContextNode ¶ added in v0.2.1
ContextNode is a context-sensitive node in the call graph.
func (ContextNode) String ¶ added in v0.2.1
func (cn ContextNode) String() string
String returns a unique identifier for this context node.
type FunctionCaps ¶
type FunctionCaps struct {
Symbol Symbol
DirectCaps capability.CapabilitySet
TransitiveCaps capability.CapabilitySet
Depth int // max hops to nearest capability sink
}
FunctionCaps holds the direct and transitive capabilities of a single function.
type FunctionSummary ¶ added in v0.2.1
type FunctionSummary struct {
Node ContextNode
Sources capability.CapabilitySet // Direct sources (env, network, fs:read)
Sinks capability.CapabilitySet // Direct sinks (exec, unsafe)
Sanitizers capability.CapabilitySet // Sanitization (crypto)
Effects capability.CapabilitySet // All direct capabilities
Transitive capability.CapabilitySet // Propagated from callees
Depth int // Max hops from capability
Confidence float64 // Min confidence across chain
CallStack []CallEdge // Path to root capability
Iteration int // Fixpoint iteration when updated
}
FunctionSummary captures taint-relevant information per function.
type IRGraph ¶
type IRGraph struct {
Calls []CallEdge
Functions map[string]FunctionCaps // Symbol.String() → FunctionCaps
}
IRGraph is the normalized intermediate representation for a package.
type SCC ¶ added in v0.2.1
type SCC struct {
ID int
Nodes []ContextNode
Summary FunctionSummary // Collapsed summary for entire SCC
}
SCC represents a strongly connected component (cycle) in the call graph.