/** * SARIF 2.1.0 transport for governance findings (change: add-sarif-finding-emission). * * A pure, deterministic serialization of the classified finding stream that `openlore enforce` and * `openlore review` already compute, so the findings can ride code-scanning surfaces (per-line PR * annotations, dismissal workflows, branch-protection gates). Transport, not policy: every finding * appears regardless of its enforcement class, which is recorded as a result property, and nothing * here changes what a command prints or its exit code. * * Honesty rules: * - A finding's recorded `location` becomes a SARIF physical location only when it is a * repository-relative path; otherwise, and when no location was recorded, the result carries a * logical location named by the subject. A line is never fabricated. * - No wall-clock content: the same findings, tool version, and graph produce a byte-identical log. */ import { type ClassifiedFinding } from './mcp-handlers/enforcement-policy.js'; export declare const SARIF_SCHEMA_URI = "https://json.schemastore.org/sarif-2.1.0.json"; type SarifLevel = 'error' | 'warning' | 'note'; /** The fixed intrinsic-severity → SARIF level table. */ export declare const SARIF_LEVEL_BY_SEVERITY: Readonly>; export interface SarifInput { findings: readonly ClassifiedFinding[]; toolVersion: string; /** The call-graph digest the findings were computed against, when an index is available. */ graphFingerprint?: string; caveats?: readonly string[]; } /** Build a SARIF 2.1.0 log object from classified governance findings. Pure and deterministic. */ export declare function buildSarifLog(input: SarifInput): Record; /** The installed OpenLore version (from package.json, as the CLI reports it). */ export declare function openloreVersion(): string; /** The call-graph digest of the analyzed index at `cwd`, or undefined when none is available. */ export declare function currentGraphFingerprint(cwd: string): Promise; /** * Write a SARIF log for a command's classified findings. Never throws: a write failure is returned * as a message for the caller to report, so the command's own output and exit code are unchanged. */ export declare function writeSarifLog(path: string, cwd: string, findings: readonly ClassifiedFinding[], caveats: readonly string[]): Promise; export {}; //# sourceMappingURL=sarif.d.ts.map