/** * 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-weak-cipher-algorithm * Detects use of weak cipher algorithms (DES, 3DES, RC4, Blowfish) * CWE-327: Use of a Broken or Risky Cryptographic Algorithm * * @see https://cwe.mitre.org/data/definitions/327.html */ import type { TSESLint } from '@interlace/eslint-devkit'; type MessageIds = 'weakCipherAlgorithm' | 'useAes256Gcm' | 'useChaCha20'; export interface Options { /** Additional weak ciphers to detect. Default: [] */ additionalWeakCiphers?: string[]; /** Allow weak ciphers in test files. Default: false */ allowInTests?: boolean; } type RuleOptions = [Options?]; export declare const noWeakCipherAlgorithm: TSESLint.RuleModule & { name: string; }; export type { Options as NoWeakCipherAlgorithmOptions };