/** * Copyright (c) 2025 Ofri Peretz * Licensed under the MIT License. Use of this source code is governed by the * MIT license that can be found in the LICENSE file. */ /** * ESLint Rule: no-cryptojs-weak-random * Detects crypto-js WordArray.random() which was insecure pre-3.2.1 * CWE-338: Use of Cryptographically Weak Pseudo-Random Number Generator * * CVE-2020-36732: crypto-js < 3.2.1 used Math.random() for crypto operations * @see https://nvd.nist.gov/vuln/detail/CVE-2020-36732 */ import type { TSESLint } from '@interlace/eslint-devkit'; type MessageIds = 'weakRandom' | 'useNativeRandom'; export interface Options { /** Allow in test files. Default: false */ allowInTests?: boolean; } type RuleOptions = [Options?]; export declare const noCryptojsWeakRandom: TSESLint.RuleModule & { name: string; }; export type { Options as NoCryptojsWeakRandomOptions };