/** * Single source of truth for security score / grade calculation. * * Goals: * 1. Same finding counts produce the same score across scan-directory, * check-project, full-audit, and CLI output. * 2. Severity caps so a critical finding cannot ever look like a clean run * (1+ critical → max C/60, 1+ high → max B/75). * 3. Optional exponential density decay (`scoring.densityModel: "exponential"` * in .guardviberc) for projects that want resolution past density 5 * instead of the linear cliff. * * Default density formula stays linear so existing CI thresholds don't shift. */ export type DensityModel = "linear" | "exponential"; export interface ScoreOptions { /** Density curve. "linear" (default) is `100 - min(density, 5) * 20`. * "exponential" is `100 * exp(-density / 3)` — smoother, no cliff. */ densityModel?: DensityModel; } /** Severity caps applied AFTER the density-derived score. */ export declare const CRITICAL_SCORE_CAP = 60; export declare const HIGH_SCORE_CAP = 75; export declare function calculateScore(critical: number, high: number, medium: number, fileCount?: number, options?: ScoreOptions): number; export declare function scoreToGrade(score: number): string;