Files
CertScope-Public/lib/inspect/types.ts
T

22 lines
1.2 KiB
TypeScript

export type Category = "dns" | "tls" | "http";
export type Severity = "critical" | "warning" | "info" | "good";
export type CollectorStatus = "ok" | "partial" | "failed";
export type CompletenessStatus = "complete" | "partial" | "failed";
export interface ProbeError { probe: string; message: string; }
export interface CollectorMeta { status: CollectorStatus; errors: ProbeError[]; }
export interface Completeness {
status: CompletenessStatus;
complete: number;
total: number;
collectors: Record<Category, CollectorStatus>;
issues: string[];
}
export interface Finding { id:string; category:Category; severity:Severity; title:string; summary:string; evidence:string[]; remediation?:string; scoreImpact:number; }
export interface InspectionScore {
overall: number;
/** The aggregate loss from a perfect overall score, not the sum of category penalties. */
deductions: number;
categories: Record<Category, number>;
}
export interface InspectionResult { host:string; inspectedAt:string; addresses:string[]; completeness: Completeness; dns:Record<string,unknown>; tls:Record<string,unknown>; http:Record<string,unknown>; findings:Finding[]; score: InspectionScore; }