export type CweProvenance = 'analyser' | 'evolith-eslint-map'; export type CweMapConfidence = 'exact' | 'broad'; export interface EslintCweMapEntry { readonly ruleId: string; readonly cwe: number; readonly cweName: string; readonly confidence: CweMapConfidence; } export interface EslintCweMapDocument { readonly entries?: readonly EslintCweMapEntry[]; readonly thresholdDependent?: readonly string[]; } export interface EslintCweMap { readonly size: number; readonly reach: readonly number[]; entriesFor(ruleId: string): readonly EslintCweMapEntry[]; isThresholdDependent(ruleId: string): boolean; } export declare function buildEslintCweMap(raw: unknown): EslintCweMap; export declare function isEslintDriver(driverName: unknown): boolean; export interface AttributedCwes { readonly analyser: readonly number[]; readonly mapped: readonly EslintCweMapEntry[]; readonly all: readonly number[]; readonly provenance?: CweProvenance; } export declare function attributeCwes(ruleId: string, analyserCwes: readonly number[], map?: EslintCweMap): AttributedCwes; export declare function withAttributedCwes(result: unknown, cwes: readonly number[]): unknown; export declare function describeMapProvenance(mappedFindings: number, broadFindings: number, thresholdFindings: number): string;