import { ValidationRule } from '../interfaces'; import { PresetOptions } from './types'; /** * Creates a STRICT preset with maximum security restrictions (bank-grade) * * Blocks: * - All eval-like constructs (eval, Function constructor) * - All loops (configurable via options) * - All async/await (configurable via options) * - Dangerous identifiers (eval, Function, process, require, etc.) * - Constructor chain access (.constructor property) * - Prototype manipulation (__proto__, Object.setPrototypeOf) * - Global object access (window, globalThis, this, global) * - Reflection APIs (Reflect.*) * - Meta-programming APIs (Object.getOwnPropertyDescriptor, etc.) * * Enforces: * - Required function calls (if specified) * - Strict argument validation (if specified) * - Unreachable code detection * * Protection against: * - ✅ All vm2 CVEs (2023-29017, 2023-30547, 2023-32313, 2023-37466) * - ✅ isolated-vm escape vectors * - ✅ node-vm sandbox escapes * - ✅ Constructor chain exploits * - ✅ Prototype pollution attacks * * @param options - Optional customization for the preset * @returns Array of configured validation rules * * @example * ```typescript * // Maximum security (bank-grade) * const rules = createStrictPreset(); * * // Strict with required API calls * const rules = createStrictPreset({ * requiredFunctions: ['callTool'], * functionArgumentRules: { * callTool: { minArgs: 2, expectedTypes: ['string', 'object'] } * } * }); * * // Strict but allow for loops * const rules = createStrictPreset({ * allowedLoops: { allowFor: true, allowForOf: true } * }); * ``` */ export declare function createStrictPreset(options?: PresetOptions): ValidationRule[];