/** * Suppression and test-fixture detection for secure-dev-ai. * * Three suppression mechanisms are supported: * * 1. Line-level: append `// nosec` (or variants) to the offending line * → the finding is completely skipped * * 2. File-level: add a pragma in the first 5 lines of the file: * // secure-dev-ai: test-fixture * // nosec: intentional * → all findings in that file are downgraded to INFO * * 3. Path-based: files whose path contains well-known test directories * (fixtures/, __fixtures__/, mocks/, testdata/, stubs/, fakes/, * __tests__/, tests/, test/) * or whose name matches *.test.ts / *.spec.ts / *.fixture.ts / * *.mock.ts etc. * → all findings downgraded to INFO * * INFO findings do NOT contribute to the security score but are still visible * in the report, so developers know what intentional test data exists. */ /** * Returns true if the line ends with a `// nosec` (or equivalent) comment. * When true, the finding on that line should be skipped entirely. */ export declare function isLineSuppressed(lineContent: string): boolean; /** * Returns true if the file should be treated as intentional test data, * meaning all findings should be downgraded to INFO rather than suppressed. * * @param relPath Path relative to the project root (used for directory / name checks) * @param content Raw file content (first 5 lines inspected for pragmas) */ export declare function isTestFixtureFile(relPath: string, content: string): boolean; export type Severity = 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'INFO'; /** * When a finding is in a test fixture file, downgrade its severity to INFO * and annotate its title so it remains visible but doesn't affect the score. */ export declare function asTestFixtureFinding(finding: T): T; //# sourceMappingURL=suppressions.d.ts.map