/**
 * XSS 防护配置
 */
export interface XSSConfig {
    /**
     * 是否允许 HTML 标签
     */
    allowHTML?: boolean;
    /**
     * 允许的 HTML 标签列表
     */
    allowedTags?: string[];
    /**
     * 允许的 HTML 属性列表
     */
    allowedAttributes?: string[];
}
/**
 * 敏感数据标识（扩展列表）
 */
export declare const SENSITIVE_FIELDS: readonly ["password", "pwd", "passwd", "token", "secret", "key", "apiKey", "apikey", "api_key", "accessToken", "access_token", "refreshToken", "refresh_token", "authorization", "auth", "cookie", "session", "sessionId", "session_id", "creditCard", "credit_card", "cardNumber", "card_number", "cvv", "cvc", "ssn", "socialSecurityNumber", "social_security_number", "phone", "phoneNumber", "phone_number", "mobile", "email", "emailAddress", "email_address", "privateKey", "private_key", "secretKey", "secret_key", "apiSecret", "api_secret"];
/**
 * 安全工具类
 */
export declare class SecurityUtils {
    /**
     * 清理 HTML，防止 XSS 攻击
     */
    static sanitizeHTML(html: string, config?: XSSConfig): string;
    /**
     * 清理文本内容（移除所有 HTML 标签）
     */
    static sanitizeText(text: string): string;
    /**
     * 检查字符串是否包含潜在的危险内容
     */
    static containsDangerousContent(text: string): boolean;
    /**
     * 验证 URL 是否安全
     */
    static isSafeUrl(url: string): boolean;
    /**
     * 检查字段名是否为敏感字段
     */
    static isSensitiveField(fieldName: string): boolean;
    /**
     * 检查值是否包含敏感信息（基于模式匹配）
     */
    static containsSensitiveData(value: string): boolean;
    /**
     * 生成 CSP（Content Security Policy）头
     */
    static generateCSP(config?: {
        defaultSrc?: string[];
        scriptSrc?: string[];
        styleSrc?: string[];
        imgSrc?: string[];
        connectSrc?: string[];
        fontSrc?: string[];
        frameSrc?: string[];
        allowUnsafeInline?: boolean;
        allowUnsafeEval?: boolean;
    }): string;
    /**
     * 转义 HTML 特殊字符
     */
    static escapeHTML(text: string): string;
    /**
     * 验证输入是否安全
     */
    static validateInput(input: unknown): {
        safe: boolean;
        sanitized?: string;
        reason?: string;
    };
    /**
     * 深度脱敏处理（递归处理嵌套对象）
     */
    static deepSanitize(data: unknown, maxDepth?: number, currentDepth?: number): unknown;
}
//# sourceMappingURL=security.d.ts.map