/**
 * SARIF 2.1.0 output for ShieldCortex findings.
 *
 * Phase 15b — turns X-Ray / audit / mcp-scan findings into a SARIF 2.1.0
 * document so they surface in GitHub Code Scanning (the Security tab).
 *
 * Lives in the xray layer (its `index.ts` already re-exports the other
 * formatters) but is shape-agnostic: it accepts BOTH the xray `XRayFinding`
 * and the audit `AuditFinding` via a single internal normaliser, so the SARIF
 * builder never branches on the source shape.
 *
 * Spec: https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html
 */
import type { XRayFinding } from './types.js';
import type { AuditFinding } from '../audit/types.js';
export type SarifLevel = 'error' | 'warning' | 'note' | 'none';
export interface SarifRule {
    id: string;
    name?: string;
    shortDescription?: {
        text: string;
    };
    helpUri?: string;
}
export interface SarifArtifactLocation {
    uri: string;
}
export interface SarifRegion {
    startLine: number;
}
export interface SarifPhysicalLocation {
    artifactLocation: SarifArtifactLocation;
    region?: SarifRegion;
}
export interface SarifLogicalLocation {
    fullyQualifiedName: string;
    kind?: string;
}
export interface SarifLocation {
    physicalLocation?: SarifPhysicalLocation;
    logicalLocations?: SarifLogicalLocation[];
}
export interface SarifResult {
    ruleId: string;
    level: SarifLevel;
    message: {
        text: string;
    };
    locations?: SarifLocation[];
}
export interface SarifDriver {
    name: string;
    version: string;
    informationUri: string;
    rules: SarifRule[];
}
export interface SarifRun {
    tool: {
        driver: SarifDriver;
    };
    results: SarifResult[];
}
export interface SarifLog {
    $schema: string;
    version: '2.1.0';
    runs: SarifRun[];
}
export interface ToSarifOptions {
    /** Tool version recorded in tool.driver.version. Resolved from package.json when omitted. */
    version?: string;
    /** Base directory to make file URIs relative to (defaults to process.cwd()). */
    baseDir?: string;
}
/**
 * Build a SARIF 2.1.0 log from a list of findings (either shape).
 * Rules are deduped into `tool.driver.rules` by ruleId.
 */
export declare function toSarif(findings: (XRayFinding | AuditFinding)[], options?: ToSarifOptions): SarifLog;
