Skip to main content

Overview

The PatternScanner class performs regex-based pattern detection to identify hardcoded secrets, PII, and other privacy issues.

Constructor

Example:

Methods

scanContent(filePath, content)

Scans file content for privacy issues using regex patterns.
Parameters:
  • filePath (string): Path to the file being scanned
  • content (string): File content to scan
Returns: Array of Finding objects Example:

Detection Patterns

The PatternScanner uses these regex patterns:

Usage Examples

Basic Pattern Scanning

Custom Pattern Detection

Next Steps

LLMAnalyzer

AI-powered contextual analysis

Detection Methods

Learn about detection patterns