/**
 * Credential Leak Detection — Layer 6
 *
 * Detects credentials, secrets, and sensitive tokens accidentally
 * persisted in AI agent memory writes. Supports known API key formats,
 * generic secrets, private keys, connection strings, environment
 * variable patterns, and high-entropy string heuristics.
 */
import { type CredentialPattern, type CredentialType, type CredentialSeverity } from './patterns.js';
export interface CredentialFinding {
    type: CredentialType;
    provider?: string;
    confidence: number;
    severity: CredentialSeverity;
    /** Redacted version showing first/last 4 chars */
    match: string;
    /** Char offset in content */
    position: number;
    action: 'blocked' | 'warned' | 'logged';
}
export interface CredentialScanResult {
    leaked: boolean;
    findings: CredentialFinding[];
    redactedContent?: string;
}
export interface CredentialDetectionConfig {
    enabled: boolean;
    blockOnCritical: boolean;
    blockOnHigh: boolean;
    warnOnMedium: boolean;
    customPatterns: CredentialPattern[];
    allowlist: string[];
}
export declare const DEFAULT_CREDENTIAL_CONFIG: CredentialDetectionConfig;
/**
 * Scan content for credential leaks.
 *
 * Checks known API key formats, generic secrets, private keys,
 * connection strings, env variable patterns, and high-entropy strings.
 *
 * @param content - The text content to scan
 * @param config - Optional credential detection configuration
 * @returns Scan result with findings and optional redacted content
 */
export declare function scanForCredentials(content: string, config?: Partial<CredentialDetectionConfig>): CredentialScanResult;
/**
 * Replace all detected secrets in content with [REDACTED-{type}] placeholders.
 * Useful for agents that want to store memory but strip the secrets.
 */
export declare function redactCredentials(content: string, config?: Partial<CredentialDetectionConfig>): string;
export type { CredentialPattern, CredentialType, CredentialSeverity } from './patterns.js';
export { shannonEntropy, checkHighEntropy } from './entropy.js';
export { ALL_CREDENTIAL_PATTERNS } from './patterns.js';
