/** * Scan Image Tool - Standardized Implementation * * Scans Docker images for security vulnerabilities * Uses standardized helpers for consistency */ import type { ToolContext } from '../../core/context'; import { type Result } from '../../types'; import { type ScanImageParams } from './schema'; /** * Actionable fix recommendation that groups related vulnerabilities */ export interface FixAction { type: 'UPGRADE_PACKAGE'; action: string; current: string; recommended: string; package: string; vulnerabilitiesFixed: number; severityCounts: { critical: number; high: number; medium: number; low: number; negligible: number; unknown: number; }; vulnerabilityIds: string[]; } export interface ScanImageResult { /** * Natural language summary for user display. * 1-3 sentences describing the scan outcome, vulnerability counts, and recommendations. * @example "🔒 Security scan failed. Found 142 vulnerabilities (2 critical, 5 high, 12 medium). 1 remediation recommendation available." */ summary?: string; success: boolean; scanner: string; /** * The Docker context used for this scan. * Only set when a specific context was requested. */ context?: string; recommendedActions?: FixAction[]; remediationGuidance?: Array<{ vulnerability: string; recommendation: string; severity?: string; example?: string; }>; vulnerabilities: { critical: number; high: number; medium: number; low: number; negligible: number; unknown: number; total: number; }; vulnerabilityDetails?: Array<{ id: string; severity: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW' | 'NEGLIGIBLE' | 'UNKNOWN'; package: string; version: string; description: string; fixedVersion?: string; }>; scanTime: string; passed: boolean; } /** * Scan image handler - direct execution without wrapper */ declare function handleScanImage(params: ScanImageParams, context: ToolContext): Promise>; /** * Scan image tool */ export declare const scanImage: typeof handleScanImage; declare const _default: import("../../types").Tool; severity: import("zod").ZodOptional, import("zod").ZodEnum<["low", "medium", "high", "critical"]>]>>; scanType: import("zod").ZodDefault>; scanner: import("zod").ZodDefault>; context: import("zod").ZodOptional; enableAISuggestions: import("zod").ZodDefault; aiEnhancementOptions: import("zod").ZodOptional>; focus: import("zod").ZodDefault>; confidence: import("zod").ZodDefault; maxSuggestions: import("zod").ZodDefault; includeExamples: import("zod").ZodDefault; }, "strip", import("zod").ZodTypeAny, { mode: "analysis" | "suggestions" | "fixes"; focus: "security" | "performance" | "best-practices" | "all"; confidence: number; maxSuggestions: number; includeExamples: boolean; }, { mode?: "analysis" | "suggestions" | "fixes" | undefined; focus?: "security" | "performance" | "best-practices" | "all" | undefined; confidence?: number | undefined; maxSuggestions?: number | undefined; includeExamples?: boolean | undefined; }>>; }, "strip", import("zod").ZodTypeAny, { scanner: "trivy" | "snyk" | "grype" | "osv"; imageId: string; scanType: "config" | "vulnerability" | "all"; enableAISuggestions: boolean; severity?: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | "high" | "medium" | "low" | "critical" | undefined; context?: string | undefined; workspacePath?: string | undefined; aiEnhancementOptions?: { mode: "analysis" | "suggestions" | "fixes"; focus: "security" | "performance" | "best-practices" | "all"; confidence: number; maxSuggestions: number; includeExamples: boolean; } | undefined; }, { imageId: string; scanner?: "trivy" | "snyk" | "grype" | "osv" | undefined; severity?: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL" | "high" | "medium" | "low" | "critical" | undefined; context?: string | undefined; workspacePath?: string | undefined; scanType?: "config" | "vulnerability" | "all" | undefined; enableAISuggestions?: boolean | undefined; aiEnhancementOptions?: { mode?: "analysis" | "suggestions" | "fixes" | undefined; focus?: "security" | "performance" | "best-practices" | "all" | undefined; confidence?: number | undefined; maxSuggestions?: number | undefined; includeExamples?: boolean | undefined; } | undefined; }>, ScanImageResult>; export default _default; //# sourceMappingURL=tool.d.ts.map