/** * @module @arcis/node/sanitizers/nosql * NoSQL injection prevention (MongoDB operators) */ /** * Checks if a key is a dangerous MongoDB operator. * * @param key - The key to check * @returns True if the key is a MongoDB operator * * @example * isDangerousNoSqlKey('$gt') // true * isDangerousNoSqlKey('name') // false */ export declare function isDangerousNoSqlKey(key: string): boolean; /** * Recursively checks if an object contains dangerous MongoDB operators. * * @param obj - The object to check * @param maxDepth - Maximum recursion depth (default: 10) * @returns True if dangerous operators found */ export declare function detectNoSqlInjection(obj: unknown, maxDepth?: number): boolean; /** * Detects a MongoDB operator appearing in a STRING value. * * detectNoSqlInjection only inspects object keys. But operators also * arrive as strings: `?user[$ne]=1` reaches the handler as the literal * `$ne` before any object is built, and mongo-shell payloads like * `$where: '1==1'` are plain strings. This is the string-level check * used by block-mode scanThreats, matching Python's `_NOSQL_DETECT`. * * @param input - The string to check * @returns True if a NoSQL operator token is present * * @example * detectNoSqlString("$where: 'this.a==1'") // true * detectNoSqlString("$invoice total") // false ($in not a token here) */ export declare function detectNoSqlString(input: string): boolean; /** * Get list of all MongoDB operators considered dangerous. * Useful for documentation or custom validation. * * @returns Array of dangerous operator strings */ export declare function getDangerousOperators(): string[]; //# sourceMappingURL=nosql.d.ts.map