UNPKG

cdk-insights

Version:

AWS CDK security and cost analysis tool with AI-powered insights

56 lines (55 loc) 1.5 kB
import type { Issue, ServiceName } from '../../types/analysis.types'; export type OutputFormat = 'json' | 'table' | 'markdown' | 'summary'; export interface AnalyzeCommandArgs { stackName?: string; ci?: boolean; withIssue?: boolean; output?: string; all?: boolean; services?: string[]; format?: string; yes?: boolean; reset?: boolean; failOnCritical?: boolean; ruleFilter?: string[]; github?: boolean; } /** Project-level user configuration */ export interface UserConfig { failOnCritical?: boolean; stackName?: string; output?: OutputFormat; services?: ServiceName[]; redact?: boolean; withIssue?: boolean; summaryOnly?: boolean; synth?: boolean; ruleFilter?: string[]; [key: string]: unknown; } export interface AnalysisSuccess { status: 'success'; redactedId: string; resourceKey: string; remappedIssues: Issue[]; resourceName?: string; } export interface AnalysisTimeout { status: 'timeout'; redactedId: string; } export interface AnalysisFailure { status: 'fail'; redactedId: string; error: unknown; } export interface AnalysisSkipped { status: 'skipped'; redactedId: string; } export type ResourceAnalysisResult = AnalysisSuccess | AnalysisTimeout | AnalysisFailure | AnalysisSkipped; export interface ErrorHandlerParams { analysisError: unknown; redactedId: string; } export type ErrorHandler = (params: ErrorHandlerParams) => ResourceAnalysisResult;