import type { CloudFormationStack, InlineAcknowledgement, Issue, IssueGroup, RuleContext } from '../../types/analysis.types'; import { type CdkContext } from '../loadCdkJsonContext/loadCdkJsonContext'; import { type ValidationReportFinding } from '../parseValidationReport/parseValidationReport'; type SynthesizedCdkStacks = { stacks: Record; inlineFindings: Issue[]; pathToLogicalId: Record; recommendationMapPerStack: Record>; assetSourcePaths: Record; /** * Inline acknowledgements per stack, harvested from cdk manifest * `aws:cdk:acknowledged-rules` metadata. Empty list when the user * has not called Validations.of(scope).acknowledge(...) anywhere * (or is on aws-cdk-lib < 2.252.0, which predates the API). */ acknowledgementsPerStack: Record; /** * Resolved aws-cdk-lib version from the user's project, plus a flag for * whether it emits Box-style traces (>= 2.252.0). Output formatters and * the aspect tip use this to tailor messaging; null version means the * user's CDK couldn't be detected (e.g., synth ran from a different cwd). */ cdkVersion: string | null; supportsBoxTraces: boolean; /** * The `context` block from the user's `cdk.json`. CDK feature flags * (e.g. `@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy`) and any * custom user context live here. Empty object if cdk.json was missing * or unparseable. Rules and downstream consumers can use this to * tailor findings to the project's actual CDK posture. */ cdkContext: CdkContext; /** * Per-logical-id metadata harvested from `tree.json` (construct level, * FQN, GitHub/docs URLs). Keyed by CloudFormation logical ID. Combines * with `cdkContext` to form the full `RuleContext` passed to rules. */ resourceIdMetadata: NonNullable; /** * Flattened entries from CDK's post-synth `policy-validation-report.json` * (aws-cdk-lib >= 2.251 for plugin output, >= 2.253 for unified construct * annotations). Empty when no validation plugins are registered and the * user's CDK code has no `Annotations.of(...).addError/Warning(...)` calls. * `runAnalysis` uses these to mark local findings as already-seen-at-synth * and to surface third-party / hand-rolled annotations in the report. */ validationReportFindings: ValidationReportFinding[]; }; export declare const synthesizeCdkStacks: (stackName?: string, runSynth?: boolean) => SynthesizedCdkStacks; export {};