feat(core): synthesized templates validate against a comprehensive default rule set#38135
Open
kaizencc wants to merge 9 commits into
Open
feat(core): synthesized templates validate against a comprehensive default rule set#38135kaizencc wants to merge 9 commits into
kaizencc wants to merge 9 commits into
Conversation
…synthesis Adds a built-in validation plugin that uses the `@aws/cloudformation-validate` package (WASM-based CloudFormation linter) to validate synthesized templates against schema rules, best-practice checks, and misconfiguration detection. The plugin is gated behind the `@aws-cdk/core:validateAgainstDefaultRules` feature flag (off by default, recommended: true). When enabled, all stack templates are validated during synthesis and violations appear in the policy validation report. Users can also instantiate `DefaultValidationPlugin` directly with custom Rego or Guard rules for additional validation beyond the built-in rule set.
Contributor
|
PRs without a linked issue will receive lower priority for review and merging. Please update the description to follow the PR template and include a line like |
aws-cdk-automation
previously requested changes
Jun 12, 2026
kaizencc
commented
Jun 12, 2026
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
pkglint requires third-party attribution entries in the NOTICE file for all bundled dependencies.
aws-cdk-automation
previously requested changes
Jun 15, 2026
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
…ngs when flag unconfigured The plugin now runs unconditionally. When the feature flag @aws-cdk/core:validateAgainstDefaultRules is explicitly set to true, violations are treated as errors and fail synthesis. When unconfigured, violations are downgraded to warnings and a nudge message is printed suggesting users opt in.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CloudFormationValidatePluginclass that wraps@aws/cloudformation-validate(WASM-based CloudFormation linter) to validate synthesized templates against schema rules, best-practice checks, and misconfiguration detection[Warning] CloudFormation Validate found issues in your templates (reported as warnings). Set context key "@aws-cdk/core:validateAgainstDefaultRules" to true to turn these into errors.CloudFormationValidatePlugindirectly with custom Rego or Guard rulesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license