/** * QA360 Security Redactor * Automatically redacts sensitive information from logs and reports */ export type RedactReplacement = string | ((match: string) => string); export interface RedactRule { name: string; pattern: RegExp; replacement: RedactReplacement; description: string; enabled?: boolean; } export interface RedactorOptions { enabledRules?: string[]; customRules?: RedactRule[]; preserveLength?: boolean; } export declare class SecurityRedactor { static readonly DEFAULT_RULES: RedactRule[]; private rules; private options; constructor(options?: RedactorOptions); /** * Apply a single redaction rule */ private applyRule; /** * Redact sensitive information from text */ redact(text: string): string; /** * Redact sensitive information from object */ redactObject(obj: any): any; /** * Check if a key is sensitive */ private isSensitiveKey; /** * Redact a sensitive value */ private redactValue; /** * Check if a string looks like a secret */ private static looksLikeSecret; /** * Get list of active redaction rules */ getActiveRules(): RedactRule[]; /** * Add custom redaction rule */ addRule(rule: RedactRule): void; /** * Remove redaction rule by name */ removeRule(name: string): boolean; /** * Create redactor for logs */ static forLogs(): SecurityRedactor; /** * Create redactor for reports */ static forReports(): SecurityRedactor; /** * Create redactor for debugging (more permissive) */ static forDebug(): SecurityRedactor; }