import type { JsonValue } from './canonical-model'; export type Severity = 'critical' | 'high' | 'medium' | 'low' | 'info' | 'unknown'; /** Read-only original observations, not a GPO execution order or effective endpoint state. */ export type PolicySourceDeviationField = 'operation' | 'data' | 'typeCode' | 'value'; export interface PolicySourceEvidence { id: string; backupKey?: string; backupInstanceId?: string; gpoId?: string; nativeBackupId?: string; sourceReference: string; sequence?: number; values: JsonValue[]; /** Presentation of a retained current comparison, never endpoint effectiveness. */ baselineRelation?: 'aligned' | 'conflicting' | 'review'; /** Per retained value, fields proven different from every current baseline variant; value is the safe whole-value fallback. */ deviationFields?: PolicySourceDeviationField[][]; /** Per retained collection value, configured members absent from every current baseline variant. */ deviationItems?: string[][]; } export interface RecordField { label: string; value: string; index: number; } export interface FindingRecord { id: string; /** Stable database identity of the projected canonical finding occurrence. */ findingOccurrenceId?: string; /** Stable database identity shared by occurrences of the same finding. */ findingDefinitionId?: string; /** Exact source scope for native report metrics; never inferred from display names. */ scanRunId?: string; importFileId?: string; /** Presentation-only provenance of Fail comparisons, using the Processing tile's exact backup identity. */ policyFailingBackupSources?: Array<{ id: string; label: string }>; policySourceEvidence?: PolicySourceEvidence[]; /** Individual baseline memberships of one rolled-up technical policy setting. */ policyBaselineLabels?: string[]; /** Original row identities allow earlier baseline-specific notes to remain readable. */ policyReviewMembers?: Array<{ id: string; baseline: string }>; index: number; title: string; fields: RecordField[]; filled: RecordField[]; meta: RecordField[]; sourceFile?: string; sourceSheet?: string; /** * Der Bericht markiert diese Zeile selbst als die konkret ausgewertete * (z. B. CIS-CAT: `