Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMethodID ¶
Types ¶
type CallGraph ¶
type CallGraph struct {
Nodes map[string]*MethodNode `json:"nodes"`
Edges []*CallEdge `json:"edges"`
}
func NewCallGraph ¶
func NewCallGraph() *CallGraph
func (*CallGraph) AddNode ¶
func (cg *CallGraph) AddNode(id string, node *MethodNode)
type CallType ¶ added in v0.2.0
type CallType string
CallType represents the type of method invocation
const ( CallTypeStatic CallType = "static" // invokestatic CallTypeVirtual CallType = "virtual" // invokevirtual CallTypeInterface CallType = "interface" // invokeinterface CallTypeSpecial CallType = "special" // invokespecial (constructors, super) CallTypeDynamic CallType = "dynamic" // invokedynamic (lambdas) CallTypeReflective CallType = "reflective" // Reflection-based call CallTypeUnknown CallType = "unknown" // Unable to determine )
type Dependency ¶
type DependencyTree ¶
type DependencyTree struct {
Root *Dependency `json:"root"`
Dependencies []*Dependency `json:"dependencies"`
}
type MethodNode ¶
type MethodNode struct {
ClassName string `json:"class_name"`
MethodName string `json:"method_name"`
Signature string `json:"signature"`
IsExternal bool `json:"is_external"`
Package string `json:"package"`
// Edge case metadata for improved analysis
IsReflective bool `json:"is_reflective,omitempty"` // Method uses reflection (Class.forName, Method.invoke)
IsLambda bool `json:"is_lambda,omitempty"` // Lambda synthetic method
IsDynamic bool `json:"is_dynamic,omitempty"` // Uses invokedynamic
Interfaces []string `json:"interfaces,omitempty"` // Implemented interfaces
VirtualTargets []string `json:"virtual_targets,omitempty"` // Possible virtual dispatch targets
}
type ReachabilityStatus ¶
type ReachabilityStatus string
const ( StatusReachable ReachabilityStatus = "REACHABLE" StatusUnreachable ReachabilityStatus = "UNREACHABLE" StatusUnknown ReachabilityStatus = "UNKNOWN" )
type TriageResult ¶
type TriageResult struct {
Vulnerability *Vulnerability `json:"vulnerability"`
Status ReachabilityStatus `json:"status"`
Reason string `json:"reason"`
Recommendation string `json:"recommendation"`
}
type Vulnerability ¶
type Vulnerability struct {
ID string `json:"id"`
Severity string `json:"severity"`
AffectedPackage string `json:"affected_package"`
AffectedMethods []string `json:"affected_methods,omitempty"`
FixedVersion string `json:"fixed_version,omitempty"`
Description string `json:"description"`
CVSS float64 `json:"cvss,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.