feat(config-audit): export WEIGHTS from severity.mjs (v5 F3 prep)

Promote WEIGHTS const to named export with Object.freeze for downstream
use in scoring.mjs (severity-weighted scoreByArea, F3).

Tests: +2 cases asserting WEIGHTS shape.
This commit is contained in:
Kjell Tore Guttormsen 2026-05-01 06:16:28 +02:00
commit e5efc2ff64
2 changed files with 15 additions and 2 deletions

View file

@ -11,7 +11,7 @@ export const SEVERITY = Object.freeze({
info: 'info',
});
const WEIGHTS = { critical: 25, high: 10, medium: 4, low: 1, info: 0 };
export const WEIGHTS = Object.freeze({ critical: 25, high: 10, medium: 4, low: 1, info: 0 });
/**
* Calculate a 0-100 risk score from severity counts.