/** * 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-toctou-vulnerability * Detects Time-of-Check-Time-of-Use vulnerabilities * CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition * * @see https://cwe.mitre.org/data/definitions/367.html * @see https://owasp.org/www-community/vulnerabilities/TOCTOU_Race_Condition */ import type { TSESLint } from '@interlace/eslint-devkit'; type MessageIds = 'toctouVulnerability' | 'useAtomicOperations' | 'useFsPromises' | 'addProperLocking'; export interface Options { /** Ignore in test files. Default: true */ ignoreInTests?: boolean; /** File system methods to check. Default: ['fs.existsSync', 'fs.statSync', 'fs.accessSync'] */ fsMethods?: string[]; } type RuleOptions = [Options?]; export declare const noToctouVulnerability: TSESLint.RuleModule & { name: string; }; export {};