UNPKG

@ordojs/security

Version:

Security package for OrdoJS with XSS, CSRF, and injection protection

37 lines 1.11 kB
/** * SQL Injection Prevention * Provides comprehensive protection against SQL injection attacks */ import type { SqlInjectionPattern } from './types'; export declare class SqlInjectionPrevention { private static readonly SQL_INJECTION_PATTERNS; /** * Validates input for SQL injection patterns */ static validateInput(input: string): { isValid: boolean; threats: SqlInjectionPattern[]; }; /** * Sanitizes input by removing or escaping SQL injection patterns */ static sanitizeInput(input: string, options?: { strict?: boolean; }): string; /** * Creates a parameterized query-safe version of input */ static createSafeParameter(input: any): any; /** * Validates and sanitizes multiple inputs */ static validateAndSanitizeInputs(inputs: Record<string, any>): { isValid: boolean; threats: Array<{ field: string; threats: SqlInjectionPattern[]; }>; sanitizedInputs: Record<string, any>; }; } //# sourceMappingURL=sql-injection-prevention.d.ts.map