/** * Code-aware detector that finds sensitive data inside string literals and comments. * * Scans source code for string literals and comments across common languages, * then runs the standard regex detector on the extracted text to find PII * that would otherwise be missed by scanning raw code. */ import { DetectedEntity } from "../types.js"; import { BaseDetector } from "./base.js"; import { RegexDetector } from "./regex.js"; /** * Detects sensitive data embedded in source code strings and comments. * * Extracts string literals and comments from code, then runs PII detection * on the extracted text. Entity positions are mapped back to the original * source positions. */ export declare class CodeDetector implements BaseDetector { readonly name = "code"; private _inner; constructor(inner?: RegexDetector); detect(text: string): DetectedEntity[]; /** Extract string literals and comments from code. */ private _extractSpans; private _coveredOverlaps; }