/** * Built-in rule catalog — the single source of truth for every detection rule * shipped in vlayer. It is DERIVED from the scanners (and the AI rules), never a * hand-maintained parallel list: each entry traces back to a real rule * definition in `src/scanners/*` or `src/ai/rules`. * * Three forms of built-in rules are folded in here: * 1. Exported pattern arrays (e.g. PHI_PATTERNS, ALL_*_PATTERNS). * 2. Inline rule arrays that live in a scanner's index.ts (ACCESS_CONTROL_ISSUES, * RETENTION_ISSUES, SECURITY_PATTERNS, WEAK_CRYPTO_PATTERNS, * MISSING_ENCRYPTION_PATTERNS). * 3. Scanners that build findings inline with dynamic per-finding ids. The * audit scanner exposes an explicit metadata array of its STABLE rule * families (AUDIT_RULES) — fixed ids only. (Encryption now carries a stable * `id` on every pattern, so each distinct check is listed individually.) * * The category of a rule is ALWAYS the owning scanner's canonical `.category` * (the AI rules are normalized from their short tokens). A module-load * validation gate asserts every category is one of the five canonical tokens * from `schema.ts`, permanently preventing category drift. */ import { type Category } from './schema.js'; export { type Category }; export type CatalogSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info'; export interface CatalogRule { id: string; category: Category; severity: CatalogSeverity; title: string; description: string; recommendation?: string; hipaaReference?: string; source: 'pattern' | 'ai'; scanner: string; } /** The complete built-in rule catalog. Built and validated once at module load. */ export declare const RULE_CATALOG: CatalogRule[]; /** Return every catalog rule. */ export declare function getAllRules(): CatalogRule[]; /** Return the catalog rules belonging to a single canonical category. */ export declare function getRulesByCategory(category: Category): CatalogRule[]; /** Return a per-category rule count keyed by all five canonical categories. */ export declare function getCategoryCounts(): Record; //# sourceMappingURL=catalog.d.ts.map