/** * @module @arcis/node/sanitizers/sanitize * Main sanitization functions that combine all sanitizers */ import type { RequestHandler } from 'express'; import type { SanitizeOptions } from '../core/types'; export declare function sanitizeString(value: string, options?: SanitizeOptions): string; /** * Sanitize an object recursively, including nested objects and arrays. * Also removes prototype pollution and NoSQL injection keys. * * @param obj - The object to sanitize * @param options - Sanitization options * @returns The sanitized object */ export declare function sanitizeObject(obj: unknown, options?: SanitizeOptions): unknown; /** Threat triple returned from scanThreats. */ export interface ThreatHit { vector: 'xss' | 'sql' | 'nosql' | 'path' | 'command' | 'prototype' | 'ssti' | 'xxe' | 'ldap' | 'xpath' | 'header' | 'deserialization'; rule: string; matchedPattern: string; } /** * Walk a value (string, array, or object) and return the first threat hit * found. Used by block-mode middleware to attribute the deny decision. * * Vector ordering matches Python's scan_threats for cross-SDK parity. */ export declare function scanThreats(data: unknown, depth?: number): ThreatHit | null; /** * Create Express middleware for request sanitization. * Sanitizes req.body, req.query, and req.params. * * @param options - Sanitization options * @returns Express middleware * * @example * app.use(createSanitizer()); * * @example * app.use(createSanitizer({ xss: true, sql: true, nosql: true })); */ export declare function createSanitizer(options?: SanitizeOptions): RequestHandler; //# sourceMappingURL=sanitize.d.ts.map