Repository navigation
Conversation
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
Fixes property-presence handling for retention and schema validation when resource properties are conditional, intrinsic, or macro-owned.
The change makes
SemanticModel::property_absence_scenariosthe shared source of truth for reachable top-level property absence:Fn::Transformbranches are unknown rather than absent because a macro can supply the property.PropertiesFn::Ifbranches are evaluated independently.Conditionor are unsatisfiable are ignored.AWS::NoValuebranches still produce I3013.Properties: !Ref AWS::NoValueis rejected with F3012 becausePropertiesmust be an object; it does not cascade into I3013 or required-property findings.Propertiesvalue, so that case stays unknown rather than producing F3012.property_can_be_absentbuiltin keeps its existing signature and missing-resource behavior.Related issue
None.
Validation behavior changes
Before this change,
DynamicQueueingood/E3505_unresolved_dynamic_and_covering.yamlproduced I3013 even though its entirePropertiesobject comes fromAWS::Include. CloudFormation evaluates the included object during processing, so offline validation cannot prove thatMessageRetentionPeriodis absent. See theAWS::Includetransform documentation.After this change:
DynamicQueueI3013 finding is removed.PropertiesAWS::NoValuereferences inintegration/ref-no-value.yaml(IamRole2andCloudFront1).AWS::NoValue; and a resource-level macro counterexample.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.