/**
 * False Positive Filter
 *
 * Context-aware filtering to reduce false positives from scanners.
 * Analyzes code context, semantic patterns, and historical data.
 *
 * @module scanners/fp-filter
 */
import type { DeterministicFinding } from "./types.js";
/**
 * Context information for filtering decisions
 */
export interface FPFilterContext {
    /** File-level context */
    codeContext: {
        isTestFile: boolean;
        isGeneratedCode: boolean;
        isThirdPartyVendored: boolean;
        isMockFile: boolean;
        isFixtureFile: boolean;
        isExampleFile: boolean;
    };
    /** Semantic context from code analysis */
    semanticContext: {
        hasValidation: boolean;
        hasEncoding: boolean;
        isSanitized: boolean;
        isConstant: boolean;
        isEnvironmentVariable: boolean;
    };
    /** Historical FP data */
    historicalContext: {
        previousFPs: string[];
        ruleAccuracy: number;
        suppressions: string[];
    };
}
/**
 * Result of filtering decision
 */
export interface FilterResult {
    /** Whether to filter out this finding */
    filter: boolean;
    /** Reason for filtering (if filtered) */
    reason?: string;
    /** Confidence in the filtering decision (0-100) */
    confidence: number;
    /** Suggested action */
    suggestion?: "suppress" | "review" | "confirm";
}
/**
 * Analyze file path to determine code context
 */
export declare function analyzeFilePath(filePath: string): FPFilterContext["codeContext"];
/**
 * Analyze code content for semantic context
 */
export declare function analyzeCodeContext(projectPath: string, finding: DeterministicFinding): Promise<FPFilterContext["semanticContext"]>;
/**
 * Determine if a finding should be filtered as a false positive
 */
export declare function shouldFilter(finding: DeterministicFinding, context: FPFilterContext): FilterResult;
/**
 * Filter findings and return filtered results with reasons
 */
export declare function filterFindings(projectPath: string, findings: DeterministicFinding[], options?: {
    historicalData?: Map<string, {
        fpRate: number;
        suppressions: string[];
    }>;
    minConfidence?: number;
}): Promise<{
    filtered: DeterministicFinding[];
    removed: Array<{
        finding: DeterministicFinding;
        reason: string;
        confidence: number;
    }>;
    stats: {
        total: number;
        kept: number;
        filtered: number;
        byReason: Record<string, number>;
    };
}>;
/**
 * Get suggested suppressions for a finding
 */
export declare function getSuppressSuggestion(finding: DeterministicFinding, context: FPFilterContext): {
    suppressionComment: string;
    inlineSuppress: string;
    fileSuppress: string;
};
//# sourceMappingURL=fp-filter.d.ts.map