import type { CustomRuleDefinition } from '../../rules/customRules.types'; import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, RuleContext, ServiceName, Severity } from '../../types/analysis.types'; import type { ConstructMetadata } from './solutionConstructs/loadConstructMetadata'; export type AnalysisStatistics = { totalResources: number; analyzedResources: number; totalFindings: number; findingsBySeverity: Record; findingsByService: Record; analysisTimeMs: number; servicesAnalyzed: string[]; }; export declare const loadCloudFormationTemplate: (templatePath: string) => CloudFormationStack; export type StaticAnalysisOptions = { /** Services to analyze (defaults to all) */ selectedServices?: ServiceName[]; /** Solutions construct registry for pattern detection */ solutionsRegistry?: Record; /** Whether to deduplicate findings (default: true) */ deduplicateFindings?: boolean; /** Whether to include statistics in result (default: false) */ includeStatistics?: boolean; /** User-defined custom rules to evaluate */ customRules?: CustomRuleDefinition[]; /** * Optional context passed to rules that opt in. Lets rules adapt * their behaviour based on construct level (L1/L2/L3) and the user's * cdk.json feature flags. Rules that don't use it work unchanged. */ ruleContext?: RuleContext; }; export type StaticAnalysisResultWithStats = { findings: AnalysisResults; statistics: AnalysisStatistics; }; export declare const runStaticAnalysis: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, selectedServices?: ServiceName[], solutionsRegistry?: Record, customRules?: CustomRuleDefinition[], ruleContext?: RuleContext) => AnalysisResults; export declare const runStaticAnalysisWithOptions: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, options?: StaticAnalysisOptions) => StaticAnalysisResultWithStats; export type BatchAnalysisResult = { results: Record; aggregateStatistics: AnalysisStatistics; perStackStatistics: Record; }; export declare const runBatchStaticAnalysis: (cloudformationTemplates: Record, createFinding: CreateFindingFunction, selectedServices?: ServiceName[], solutionsRegistry?: Record) => Record; export declare const runBatchStaticAnalysisWithOptions: (cloudformationTemplates: Record, createFinding: CreateFindingFunction, options?: StaticAnalysisOptions) => BatchAnalysisResult; /** * Get a summary string from analysis statistics */ export declare const formatStatisticsSummary: (stats: AnalysisStatistics) => string;