import type { Issue, AnalysisContext } from "../types.js"; import type { ControlFlowGraph, CFGAnalysisResult } from "./types.js"; /** * Analyzes CFGs to detect security vulnerabilities and patterns */ export declare class CFGAnalyzer { /** * Analyze a CFG for external calls before state updates (CEI pattern violation) */ analyzeExternalBeforeState(cfg: ControlFlowGraph, criticalStateVars?: string[]): CFGAnalysisResult; /** * Check for Check-Effects-Interactions pattern violation on a specific path */ private checkCEIViolationOnPath; /** * Analyze CFG for unreachable code */ analyzeUnreachableCode(cfg: ControlFlowGraph): CFGAnalysisResult; /** * Analyze CFG for potential reentrancy paths */ analyzeReentrancyPaths(cfg: ControlFlowGraph): CFGAnalysisResult; /** * Analyze CFG for state consistency issues */ analyzeStateConsistency(cfg: ControlFlowGraph): CFGAnalysisResult; /** * Find all paths from start to any of the end nodes */ private findAllPaths; /** * DFS to find reachable nodes */ private dfsReachable; /** * Find paths with state access after external call */ private findPathsWithStateAccessAfterCall; /** * Analyze state variable usage patterns */ private analyzeStateVariableUsage; /** * Check if variable is important for state consistency */ private isImportantForConsistency; /** * Find node that reads a specific variable */ private findNodeReadingVariable; /** * Build exploit path from violation */ private buildExploitPath; /** * Extract code snippet from node */ private extractCodeSnippet; /** * Convert CFG analysis results to standard Issue format */ convertToIssues(results: CFGAnalysisResult[], context: AnalysisContext): Issue[]; } //# sourceMappingURL=analyzer.d.ts.map