/** * @fileoverview Context leakage detection — flags request-scoped state stored * in module or class scope that can leak between concurrent requests. */ import { type CheckViolation } from '@opensip-cli/fitness'; /** * Check: resilience/context-leakage * * Detects request context stored in module or class scope, which could cause * cross-request pollution in multi-tenant / concurrent server environments. * * Implemented as a TypeScript AST walk. The previous regex implementation flagged: * - type-only references (`SyncStrategy`), * - method-parameter types (`(ctx: SomeContext) => …`), * - module-level lazy-init metric instruments (`let counter: Counter | null = null`). * The AST rewrite eliminates those false positives by inspecting the actual * declaration shape rather than line text. */ export declare const contextLeakage: import("@opensip-cli/fitness").Check; /** * Analyze a file for request-context leakage. Exported for the FP-regression * suite (see `__tests__/context-leakage-fp.test.ts`). */ export declare function analyzeContextLeakage(content: string, filePath: string): CheckViolation[]; //# sourceMappingURL=context-leakage.d.ts.map