Overview
TheLLMAnalyzer class uses AI/LLM to perform contextual analysis of code for privacy issues that go beyond simple pattern matching.
Constructor
Properties
verbose
boolean
Methods
analyzeFile(filePath, content, patternFindings)
Performs AI-powered analysis on file content.filePath(string): Path to the filecontent(string): File contentpatternFindings(Finding[]): Findings from pattern scanner (context)
How It Works
The LLM Analyzer:- Takes context from pattern findings - Uses initial pattern matches to focus analysis
- Analyzes code semantically - Understands code context and intent
- Identifies subtle issues - Finds privacy concerns that patterns miss
- Reduces false positives - Filters out non-issues based on context
- Provides specific recommendations - Gives actionable advice
Usage Examples
Basic LLM Analysis
Combined Analysis
The LLM Analyzer helps reduce false positives by understanding code context, such as distinguishing between test data and real credentials.
Next Steps
PatternScanner
Pattern-based detection
How It Works
Understand the dual-layer approach

