import { z } from 'zod';
import type { Evidence } from '../types.js';
/**
 * Vulnerability severity levels per FedRAMP
 */
export declare const VULNERABILITY_SEVERITIES: readonly ["critical", "high", "moderate", "low"];
export type VulnerabilitySeverity = (typeof VULNERABILITY_SEVERITIES)[number];
/**
 * Scan types supported by ConMon
 */
export declare const SCAN_TYPES: readonly ["vulnerability", "configuration", "container", "web-application", "database", "operating-system"];
export type ScanType = (typeof SCAN_TYPES)[number];
/**
 * Assessment types
 */
export declare const ASSESSMENT_TYPES: readonly ["monthly-scan", "quarterly-assessment", "annual-assessment", "penetration-test", "incident-triggered", "significant-change"];
export type AssessmentType = (typeof ASSESSMENT_TYPES)[number];
/**
 * Vulnerability finding from scans
 */
export interface VulnerabilityFinding {
    /** Unique identifier */
    id: string;
    /** Scanner that detected this */
    scannerId: string;
    /** Scanner finding ID */
    scannerFindingId: string;
    /** CVE ID if applicable */
    cveId?: string;
    /** CWE ID if applicable */
    cweId?: string;
    /** Title of the vulnerability */
    title: string;
    /** Detailed description */
    description: string;
    /** Severity level */
    severity: VulnerabilitySeverity;
    /** CVSS score (0-10) */
    cvssScore?: number;
    /** CVSS vector */
    cvssVector?: string;
    /** Affected asset */
    affectedAsset: string;
    /** Affected component */
    affectedComponent?: string;
    /** First detected date */
    firstDetected: Date;
    /** Last detected date */
    lastDetected: Date;
    /** Remediation status */
    status: 'open' | 'in-progress' | 'remediated' | 'false-positive' | 'risk-accepted';
    /** Remediation deadline based on FedRAMP requirements */
    remediationDeadline: Date;
    /** Days overdue (negative if not yet due) */
    daysOverdue: number;
    /** Associated POA&M ID if tracked */
    poamId?: string;
    /** Related control IDs */
    relatedControls: string[];
    /** Remediation guidance */
    remediationGuidance?: string;
    /** Plugin/check ID from scanner */
    pluginId?: string;
    /** Port if network vulnerability */
    port?: number;
    /** Protocol if network vulnerability */
    protocol?: string;
}
export declare const vulnerabilityFindingSchema: z.ZodObject<{
    id: z.ZodString;
    scannerId: z.ZodString;
    scannerFindingId: z.ZodString;
    cveId: z.ZodOptional<z.ZodString>;
    cweId: z.ZodOptional<z.ZodString>;
    title: z.ZodString;
    description: z.ZodString;
    severity: z.ZodEnum<["critical", "high", "moderate", "low"]>;
    cvssScore: z.ZodOptional<z.ZodNumber>;
    cvssVector: z.ZodOptional<z.ZodString>;
    affectedAsset: z.ZodString;
    affectedComponent: z.ZodOptional<z.ZodString>;
    firstDetected: z.ZodDate;
    lastDetected: z.ZodDate;
    status: z.ZodEnum<["open", "in-progress", "remediated", "false-positive", "risk-accepted"]>;
    remediationDeadline: z.ZodDate;
    daysOverdue: z.ZodNumber;
    poamId: z.ZodOptional<z.ZodString>;
    relatedControls: z.ZodArray<z.ZodString, "many">;
    remediationGuidance: z.ZodOptional<z.ZodString>;
    pluginId: z.ZodOptional<z.ZodString>;
    port: z.ZodOptional<z.ZodNumber>;
    protocol: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id?: string;
    status?: "open" | "in-progress" | "remediated" | "risk-accepted" | "false-positive";
    port?: number;
    title?: string;
    description?: string;
    severity?: "low" | "high" | "critical" | "moderate";
    protocol?: string;
    relatedControls?: string[];
    poamId?: string;
    scannerId?: string;
    scannerFindingId?: string;
    cveId?: string;
    cweId?: string;
    cvssScore?: number;
    cvssVector?: string;
    affectedAsset?: string;
    affectedComponent?: string;
    firstDetected?: Date;
    lastDetected?: Date;
    remediationDeadline?: Date;
    daysOverdue?: number;
    remediationGuidance?: string;
    pluginId?: string;
}, {
    id?: string;
    status?: "open" | "in-progress" | "remediated" | "risk-accepted" | "false-positive";
    port?: number;
    title?: string;
    description?: string;
    severity?: "low" | "high" | "critical" | "moderate";
    protocol?: string;
    relatedControls?: string[];
    poamId?: string;
    scannerId?: string;
    scannerFindingId?: string;
    cveId?: string;
    cweId?: string;
    cvssScore?: number;
    cvssVector?: string;
    affectedAsset?: string;
    affectedComponent?: string;
    firstDetected?: Date;
    lastDetected?: Date;
    remediationDeadline?: Date;
    daysOverdue?: number;
    remediationGuidance?: string;
    pluginId?: string;
}>;
/**
 * Vulnerability scan result
 */
export interface ScanResult {
    /** Unique scan ID */
    id: string;
    /** Type of scan */
    scanType: ScanType;
    /** Scanner used */
    scannerId: string;
    /** Scanner name */
    scannerName: string;
    /** Scanner version */
    scannerVersion: string;
    /** Scan start time */
    startTime: Date;
    /** Scan end time */
    endTime: Date;
    /** Duration in seconds */
    durationSeconds: number;
    /** Scan scope/targets */
    targets: string[];
    /** Total hosts/assets scanned */
    totalTargets: number;
    /** Findings from scan */
    findings: VulnerabilityFinding[];
    /** Finding counts by severity */
    findingCounts: Record<VulnerabilitySeverity, number>;
    /** Scan status */
    status: 'completed' | 'failed' | 'partial';
    /** Error message if failed */
    errorMessage?: string;
    /** Credentials used (obfuscated) */
    credentialType?: string;
    /** Scan policy/profile used */
    scanPolicy?: string;
    /** Raw scan report reference */
    rawReportRef?: string;
}
export declare const scanResultSchema: z.ZodObject<{
    id: z.ZodString;
    scanType: z.ZodEnum<["vulnerability", "configuration", "container", "web-application", "database", "operating-system"]>;
    scannerId: z.ZodString;
    scannerName: z.ZodString;
    scannerVersion: z.ZodString;
    startTime: z.ZodDate;
    endTime: z.ZodDate;
    durationSeconds: z.ZodNumber;
    targets: z.ZodArray<z.ZodString, "many">;
    totalTargets: z.ZodNumber;
    findings: z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        scannerId: z.ZodString;
        scannerFindingId: z.ZodString;
        cveId: z.ZodOptional<z.ZodString>;
        cweId: z.ZodOptional<z.ZodString>;
        title: z.ZodString;
        description: z.ZodString;
        severity: z.ZodEnum<["critical", "high", "moderate", "low"]>;
        cvssScore: z.ZodOptional<z.ZodNumber>;
        cvssVector: z.ZodOptional<z.ZodString>;
        affectedAsset: z.ZodString;
        affectedComponent: z.ZodOptional<z.ZodString>;
        firstDetected: z.ZodDate;
        lastDetected: z.ZodDate;
        status: z.ZodEnum<["open", "in-progress", "remediated", "false-positive", "risk-accepted"]>;
        remediationDeadline: z.ZodDate;
        daysOverdue: z.ZodNumber;
        poamId: z.ZodOptional<z.ZodString>;
        relatedControls: z.ZodArray<z.ZodString, "many">;
        remediationGuidance: z.ZodOptional<z.ZodString>;
        pluginId: z.ZodOptional<z.ZodString>;
        port: z.ZodOptional<z.ZodNumber>;
        protocol: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        id?: string;
        status?: "open" | "in-progress" | "remediated" | "risk-accepted" | "false-positive";
        port?: number;
        title?: string;
        description?: string;
        severity?: "low" | "high" | "critical" | "moderate";
        protocol?: string;
        relatedControls?: string[];
        poamId?: string;
        scannerId?: string;
        scannerFindingId?: string;
        cveId?: string;
        cweId?: string;
        cvssScore?: number;
        cvssVector?: string;
        affectedAsset?: string;
        affectedComponent?: string;
        firstDetected?: Date;
        lastDetected?: Date;
        remediationDeadline?: Date;
        daysOverdue?: number;
        remediationGuidance?: string;
        pluginId?: string;
    }, {
        id?: string;
        status?: "open" | "in-progress" | "remediated" | "risk-accepted" | "false-positive";
        port?: number;
        title?: string;
        description?: string;
        severity?: "low" | "high" | "critical" | "moderate";
        protocol?: string;
        relatedControls?: string[];
        poamId?: string;
        scannerId?: string;
        scannerFindingId?: string;
        cveId?: string;
        cweId?: string;
        cvssScore?: number;
        cvssVector?: string;
        affectedAsset?: string;
        affectedComponent?: string;
        firstDetected?: Date;
        lastDetected?: Date;
        remediationDeadline?: Date;
        daysOverdue?: number;
        remediationGuidance?: string;
        pluginId?: string;
    }>, "many">;
    findingCounts: z.ZodObject<{
        critical: z.ZodNumber;
        high: z.ZodNumber;
        moderate: z.ZodNumber;
        low: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        low?: number;
        high?: number;
        critical?: number;
        moderate?: number;
    }, {
        low?: number;
        high?: number;
        critical?: number;
        moderate?: number;
    }>;
    status: z.ZodEnum<["completed", "failed", "partial"]>;
    errorMessage: z.ZodOptional<z.ZodString>;
    credentialType: z.ZodOptional<z.ZodString>;
    scanPolicy: z.ZodOptional<z.ZodString>;
    rawReportRef: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    id?: string;
    status?: "partial" | "failed" | "completed";
    errorMessage?: string;
    startTime?: Date;
    endTime?: Date;
    findings?: {
        id?: string;
        status?: "open" | "in-progress" | "remediated" | "risk-accepted" | "false-positive";
        port?: number;
        title?: string;
        description?: string;
        severity?: "low" | "high" | "critical" | "moderate";
        protocol?: string;
        relatedControls?: string[];
        poamId?: string;
        scannerId?: string;
        scannerFindingId?: string;
        cveId?: string;
        cweId?: string;
        cvssScore?: number;
        cvssVector?: string;
        affectedAsset?: string;
        affectedComponent?: string;
        firstDetected?: Date;
        lastDetected?: Date;
        remediationDeadline?: Date;
        daysOverdue?: number;
        remediationGuidance?: string;
        pluginId?: string;
    }[];
    durationSeconds?: number;
    credentialType?: string;
    targets?: string[];
    scannerId?: string;
    scanType?: "database" | "configuration" | "vulnerability" | "container" | "web-application" | "operating-system";
    scannerName?: string;
    scannerVersion?: string;
    totalTargets?: number;
    findingCounts?: {
        low?: number;
        high?: number;
        critical?: number;
        moderate?: number;
    };
    scanPolicy?: string;
    rawReportRef?: string;
}, {
    id?: string;
    status?: "partial" | "failed" | "completed";
    errorMessage?: string;
    startTime?: Date;
    endTime?: Date;
    findings?: {
        id?: string;
        status?: "open" | "in-progress" | "remediated" | "risk-accepted" | "false-positive";
        port?: number;
        title?: string;
        description?: string;
        severity?: "low" | "high" | "critical" | "moderate";
        protocol?: string;
        relatedControls?: string[];
        poamId?: string;
        scannerId?: string;
        scannerFindingId?: string;
        cveId?: string;
        cweId?: string;
        cvssScore?: number;
        cvssVector?: string;
        affectedAsset?: string;
        affectedComponent?: string;
        firstDetected?: Date;
        lastDetected?: Date;
        remediationDeadline?: Date;
        daysOverdue?: number;
        remediationGuidance?: string;
        pluginId?: string;
    }[];
    durationSeconds?: number;
    credentialType?: string;
    targets?: string[];
    scannerId?: string;
    scanType?: "database" | "configuration" | "vulnerability" | "container" | "web-application" | "operating-system";
    scannerName?: string;
    scannerVersion?: string;
    totalTargets?: number;
    findingCounts?: {
        low?: number;
        high?: number;
        critical?: number;
        moderate?: number;
    };
    scanPolicy?: string;
    rawReportRef?: string;
}>;
/**
 * Scheduled assessment
 */
export interface ScheduledAssessment {
    /** Unique ID */
    id: string;
    /** Assessment type */
    type: AssessmentType;
    /** Title */
    title: string;
    /** Description */
    description: string;
    /** Scheduled date */
    scheduledDate: Date;
    /** Actual completion date */
    completedDate?: Date;
    /** Status */
    status: 'scheduled' | 'in-progress' | 'completed' | 'overdue' | 'cancelled';
    /** Responsible party */
    responsibleParty: string;
    /** 3PAO involvement required */
    requires3PAO: boolean;
    /** 3PAO organization if applicable */
    thirdPartyAssessor?: string;
    /** Controls to assess */
    controlsInScope: string[];
    /** Deliverables expected */
    deliverables: string[];
    /** Associated documents */
    documents: string[];
    /** Notes */
    notes?: string;
    /** Recurrence pattern */
    recurrence?: {
        frequency: 'monthly' | 'quarterly' | 'annually';
        dayOfMonth?: number;
        monthOfYear?: number;
    };
}
export declare const scheduledAssessmentSchema: z.ZodObject<{
    id: z.ZodString;
    type: z.ZodEnum<["monthly-scan", "quarterly-assessment", "annual-assessment", "penetration-test", "incident-triggered", "significant-change"]>;
    title: z.ZodString;
    description: z.ZodString;
    scheduledDate: z.ZodDate;
    completedDate: z.ZodOptional<z.ZodDate>;
    status: z.ZodEnum<["scheduled", "in-progress", "completed", "overdue", "cancelled"]>;
    responsibleParty: z.ZodString;
    requires3PAO: z.ZodBoolean;
    thirdPartyAssessor: z.ZodOptional<z.ZodString>;
    controlsInScope: z.ZodArray<z.ZodString, "many">;
    deliverables: z.ZodArray<z.ZodString, "many">;
    documents: z.ZodArray<z.ZodString, "many">;
    notes: z.ZodOptional<z.ZodString>;
    recurrence: z.ZodOptional<z.ZodObject<{
        frequency: z.ZodEnum<["monthly", "quarterly", "annually"]>;
        dayOfMonth: z.ZodOptional<z.ZodNumber>;
        monthOfYear: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        frequency?: "monthly" | "quarterly" | "annually";
        dayOfMonth?: number;
        monthOfYear?: number;
    }, {
        frequency?: "monthly" | "quarterly" | "annually";
        dayOfMonth?: number;
        monthOfYear?: number;
    }>>;
}, "strip", z.ZodTypeAny, {
    id?: string;
    type?: "significant-change" | "monthly-scan" | "quarterly-assessment" | "annual-assessment" | "penetration-test" | "incident-triggered";
    status?: "completed" | "cancelled" | "scheduled" | "overdue" | "in-progress";
    title?: string;
    description?: string;
    notes?: string;
    scheduledDate?: Date;
    controlsInScope?: string[];
    completedDate?: Date;
    responsibleParty?: string;
    requires3PAO?: boolean;
    thirdPartyAssessor?: string;
    deliverables?: string[];
    documents?: string[];
    recurrence?: {
        frequency?: "monthly" | "quarterly" | "annually";
        dayOfMonth?: number;
        monthOfYear?: number;
    };
}, {
    id?: string;
    type?: "significant-change" | "monthly-scan" | "quarterly-assessment" | "annual-assessment" | "penetration-test" | "incident-triggered";
    status?: "completed" | "cancelled" | "scheduled" | "overdue" | "in-progress";
    title?: string;
    description?: string;
    notes?: string;
    scheduledDate?: Date;
    controlsInScope?: string[];
    completedDate?: Date;
    responsibleParty?: string;
    requires3PAO?: boolean;
    thirdPartyAssessor?: string;
    deliverables?: string[];
    documents?: string[];
    recurrence?: {
        frequency?: "monthly" | "quarterly" | "annually";
        dayOfMonth?: number;
        monthOfYear?: number;
    };
}>;
/**
 * ConMon configuration
 */
export interface ConMonConfig {
    /** Organization name */
    organizationName: string;
    /** System name */
    systemName: string;
    /** FedRAMP authorization level */
    authorizationLevel: 'low' | 'moderate' | 'high';
    /** ATO date */
    atoDate: Date;
    /** ATO expiration date */
    atoExpirationDate: Date;
    /** Remediation timeframes (days) */
    remediationTimeframes: {
        critical: number;
        high: number;
        moderate: number;
        low: number;
    };
    /** Scanner configurations */
    scanners: ScannerConfig[];
    /** Notification settings */
    notifications: {
        enabled: boolean;
        emailRecipients: string[];
        slackWebhook?: string;
        scanCompletionNotify: boolean;
        overdueNotify: boolean;
        overdueDaysThreshold: number;
    };
}
/**
 * Scanner configuration
 */
export interface ScannerConfig {
    /** Scanner ID */
    id: string;
    /** Scanner name */
    name: string;
    /** Scanner type */
    type: 'nessus' | 'qualys' | 'rapid7' | 'tenable' | 'openvas' | 'custom';
    /** API endpoint */
    apiEndpoint?: string;
    /** Scan types this scanner handles */
    scanTypes: ScanType[];
    /** Scan schedule */
    schedule?: {
        frequency: 'daily' | 'weekly' | 'monthly';
        dayOfWeek?: number;
        dayOfMonth?: number;
        hour: number;
        minute: number;
    };
    /** Is scanner active */
    active: boolean;
}
/**
 * FedRAMP required remediation timeframes (in days)
 */
export declare const FEDRAMP_REMEDIATION_TIMEFRAMES: {
    readonly low: {
        readonly critical: 30;
        readonly high: 30;
        readonly moderate: 90;
        readonly low: 180;
    };
    readonly moderate: {
        readonly critical: 30;
        readonly high: 30;
        readonly moderate: 90;
        readonly low: 180;
    };
    readonly high: {
        readonly critical: 15;
        readonly high: 30;
        readonly moderate: 90;
        readonly low: 180;
    };
};
/**
 * FedRAMP Continuous Monitoring Service
 */
export declare class ContinuousMonitoringService {
    private config;
    private scanResults;
    private vulnerabilities;
    private assessments;
    private scanHistory;
    constructor(config: ConMonConfig);
    /**
     * Import scan results from a scanner
     */
    importScanResults(scanResult: ScanResult): void;
    /**
     * Process a vulnerability finding
     */
    private processVulnerabilityFinding;
    /**
     * Find an existing vulnerability that matches this finding
     */
    private findExistingVulnerability;
    /**
     * Update status of vulnerabilities not found in latest scan (potentially remediated)
     */
    private updateRemediatedVulnerabilities;
    /**
     * Calculate remediation deadline based on severity and FedRAMP requirements
     */
    calculateRemediationDeadline(severity: VulnerabilitySeverity, detectedDate: Date): Date;
    /**
     * Calculate days overdue (negative if not yet due)
     */
    calculateDaysOverdue(deadline: Date): number;
    /**
     * Get all vulnerabilities
     */
    getVulnerabilities(filter?: {
        severity?: VulnerabilitySeverity;
        status?: VulnerabilityFinding['status'];
        overdue?: boolean;
        asset?: string;
    }): VulnerabilityFinding[];
    /**
     * Get overdue vulnerabilities
     */
    getOverdueVulnerabilities(): VulnerabilityFinding[];
    /**
     * Update vulnerability status
     */
    updateVulnerabilityStatus(vulnId: string, status: VulnerabilityFinding['status'], poamId?: string): void;
    /**
     * Schedule an assessment
     */
    scheduleAssessment(assessment: Omit<ScheduledAssessment, 'id'>): ScheduledAssessment;
    /**
     * Get scheduled assessments
     */
    getScheduledAssessments(filter?: {
        type?: AssessmentType;
        status?: ScheduledAssessment['status'];
        startDate?: Date;
        endDate?: Date;
    }): ScheduledAssessment[];
    /**
     * Update assessment status
     */
    updateAssessmentStatus(assessmentId: string, status: ScheduledAssessment['status'], completedDate?: Date): void;
    /**
     * Schedule the next occurrence of a recurring assessment
     */
    private scheduleNextOccurrence;
    /**
     * Create standard FedRAMP assessment schedule
     */
    createStandardSchedule(): void;
    private getNextMonthlyDate;
    private getNextQuarterlyDate;
    private getNextAnnualDate;
    /**
     * Generate ConMon status report
     */
    generateStatusReport(): ConMonStatusReport;
    private getATOStatus;
    private calculateAverageVulnerabilityAge;
    private getMonthlyScansCompleted;
    private calculateScanComplianceRate;
    private generateRecommendations;
    /**
     * Collect evidence from scan results
     */
    collectScanEvidence(scanId: string): Evidence[];
}
export interface ConMonStatusReport {
    generatedAt: Date;
    systemName: string;
    authorizationLevel: 'low' | 'moderate' | 'high';
    atoStatus: 'active' | 'expiring-soon' | 'expired';
    vulnerabilitySummary: {
        total: number;
        bySeverity: Record<VulnerabilitySeverity, number>;
        overdue: number;
        averageAge: number;
    };
    scanCompliance: {
        lastScanDate?: Date;
        lastScanType?: ScanType;
        dayssinceLastScan?: number;
        monthlyScansCompleted: number;
        scanComplianceRate: number;
    };
    assessmentStatus: {
        overdueCount: number;
        upcomingAssessments: Array<{
            id: string;
            title: string;
            type: AssessmentType;
            scheduledDate: Date;
        }>;
    };
    recommendations: string[];
}
export default ContinuousMonitoringService;
//# sourceMappingURL=continuous-monitoring.d.ts.map