llmverify
Version:
AI Output Verification Toolkit — Local-first LLM safety, hallucination detection, PII redaction, prompt injection defense, and runtime monitoring. Zero telemetry. OWASP LLM Top 10 aligned.
45 lines (44 loc) • 1.2 kB
TypeScript
/**
* PII Detection & Redaction
*
* Comprehensive PII detection with redaction utilities.
* Supports US and international formats.
*
* @module csm6/security/pii-detection
* @author Haiec
* @license MIT
*/
import { Finding } from '../../types/results';
/**
* Check for PII in content
* @param content - The content to scan
* @returns Array of findings
*/
export declare function checkPII(content: string): Finding[];
/**
* Redact all PII from content
* @param content - The content to redact
* @param replacement - Replacement string (default: [REDACTED])
* @returns Redacted content and list of redactions
*/
export declare function redactPII(content: string, replacement?: string): {
redacted: string;
redactions: Array<{
type: string;
original: string;
position: number;
}>;
piiCount: number;
};
/**
* Check if content contains any PII
* @param content - The content to check
* @returns true if PII detected
*/
export declare function containsPII(content: string): boolean;
/**
* Get PII risk score (0-1)
* @param content - The content to score
* @returns Risk score
*/
export declare function getPIIRiskScore(content: string): number;