package
0.0.0-20240813002718-d6d87c73acf5
Repository: https://github.com/picatz/taint.git
Documentation: pkg.go.dev
# Functions
AddFunction analyzes the given target SSA function, adding information to the call graph.
CalleesOf returns nodes that are called by the caller node.
CallersOf returns nodes that call the callee node.
GraphString returns a string representation of the call graph, which is a sequence of nodes separated by newlines, with the callees of each node indented by a tab.
InstructionsFor returns the ssa.Instruction for the given ssa.Value using the given node as the root of the call graph that is searched.
NewGraph returns a new Graph with the specified root node.
NewVulncheckCallGraph builds a call graph of prog based on VTA analysis, straight from the govulncheck project.
PathSearch returns the first path found from the start node to a node that matches the isMatch function.
PathSearchCallTo returns the first path found from the start node to a node that matches the function name.
PathsSearch returns all paths found from the start node to a node that matches the isMatch function.
PathsSearchCallTo returns the paths that call the given function name, which uses SSA function name syntax, e.g.: "(*database/sql.DB).Query".
WriteComsmograph writes the given callgraph.Graph to the given io.Writer in CSV format, which can be used to generate a visual representation of the call graph using Comsmograph.
WriteCSV writes the given callgraph.Graph to the given io.Writer in CSV format.
WriteDOT writes the given callgraph.Graph to the given io.Writer in the DOT format, which can be used to generate a visual representation of the call graph using Graphviz.
# Type aliases
Edges is a handy alias for a slice of callgraph.Edges.
Nodes is a handy alias for a slice of callgraph.Nodes.
Path is a sequence of callgraph.Edges, where each edge represents a call from a caller to a callee, making up a "chain" of calls, e.g.: main → foo → bar → baz.
Paths is a collection of paths, which may be logically grouped together, e.g.: all paths from main to foo, or all paths from main to bar.