/** * Constants and safe-path configuration for the TOCTOU race-condition check. */ /** * Recipe-config shape for toctou-race-condition. Project-specific safe-paths * belong in a recipe's `checks.config['toctou-race-condition']` block. */ export interface TocTouConfig extends Record { /** * Additional path patterns where TOCTOU is not a concern. Each entry is * compiled to a case-insensitive RegExp via `new RegExp(entry, 'i')`. */ additionalSafeTOCTOUPaths?: readonly string[]; } /** Patterns that indicate proper atomic update handling */ export declare const ATOMIC_PATTERNS: RegExp[]; /** Paths where TOCTOU is typically not a concern */ export declare const SAFE_TOCTOU_PATHS: RegExp[]; export declare function isReadMethod(methodName: string): boolean; export declare function isUpdateMethod(methodName: string): boolean; export declare function isDrizzleAtomicWriteMethod(methodName: string): boolean; export declare const KIND_READ_SHARED: "read-shared"; export declare const KIND_UPDATE_SHARED: "update-shared"; export declare const KIND_READ_LOCAL: "read-local"; export declare const KIND_UPDATE_LOCAL: "update-local"; /** Compile recipe-provided string entries to case-insensitive RegExp values. */ export declare function buildEffectiveSafePaths(): readonly RegExp[]; /** Check if a file path is in a safe TOCTOU context. */ export declare function isSafeToctouPath(filePath: string, safePaths: readonly RegExp[]): boolean; /** Check if content has atomic patterns */ export declare function hasAtomicPatterns(content: string): boolean; //# sourceMappingURL=toctou-race-condition-constants.d.ts.map