/**
 * GitHub Action Types
 *
 * Types for the Vaspera Hardening GitHub Action.
 *
 * @module action/types
 */
/**
 * Severity threshold for failing the action
 */
export const SEVERITY_LEVELS = {
    critical: 5,
    high: 4,
    medium: 3,
    low: 2,
    info: 1,
    none: 0,
};
/**
 * Check if findings exceed the fail threshold
 */
export function exceedsThreshold(bySeverity, threshold) {
    if (threshold === "none")
        return false;
    const thresholdLevel = SEVERITY_LEVELS[threshold];
    for (const [severity, count] of Object.entries(bySeverity)) {
        if (count > 0 && SEVERITY_LEVELS[severity] >= thresholdLevel) {
            return true;
        }
    }
    return false;
}
//# sourceMappingURL=types.js.map