fix: show diff when requesting approval for any-change#1255
Merged
aws-cdk-automation merged 1 commit intomainfrom Mar 26, 2026
Merged
Conversation
…n --require-approval is set to any-change, the deploy confirmation\nprompt only showed the security diff which is empty when there are no\nIAM changes. This meant users were asked to approve changes they\ncouldn't see.\n\nNow the full stack diff is shown when there are no security changes,\nso users can always see what they are approving.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1255 +/- ##
==========================================
- Coverage 87.92% 87.92% -0.01%
==========================================
Files 73 73
Lines 10331 10333 +2
Branches 1394 1395 +1
==========================================
+ Hits 9084 9085 +1
- Misses 1221 1222 +1
Partials 26 26
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
rix0rrr
approved these changes
Mar 26, 2026
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.
When
--require-approvalis set toany-change, the deploy confirmation prompt only included the security diff in its message. Since non-security changes don't produce a security diff, users were asked to approve changes without being able to see what those changes are. This makes the approval step useless because a human cannot make an informed decision without seeing the diff.The fix ensures that when there are no security-related changes, the full stack diff is shown instead. When there are security changes, the behavior remains unchanged and the security diff is displayed as before. The motivation text in the prompt has also been updated to accurately reflect whether the approval is for security-sensitive changes or general changes.
This is fixed in both the CLI (
aws-cdk) and the programmatic toolkit (toolkit-lib), which had slightly different but equally broken implementations.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license