Skip to content

feat(toolkit-lib): deploy prompt prints security diff and returns template diff #437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 6, 2025

Conversation

kaizencc
Copy link
Contributor

@kaizencc kaizencc commented Apr 30, 2025

closes aws/aws-cdk#33435

Does the following:

  • sends the formatted security diff in the request response
  • returns the full diff to in the request response

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@aws-cdk-automation aws-cdk-automation requested a review from a team April 30, 2025 20:05
@github-actions github-actions bot added the p2 label Apr 30, 2025
const deployMotivation = '"--require-approval" is enabled and stack includes security-sensitive updates.';
const deployQuestion = `${deployMotivation}\nDo you wish to deploy these changes`;
const deployQuestion = `${securityDiff.formattedDiff}\n\n${deployMotivation}\nDo you wish to deploy these changes`;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't have a good way of testing this because formatted diff has a bunch of bold/underlined/colored words so it's hard to unit test

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run stripAnsi over it

Signed-off-by: github-actions <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented May 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.18%. Comparing base (632de3f) to head (438f098).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #437   +/-   ##
=======================================
  Coverage   79.18%   79.18%           
=======================================
  Files          54       54           
  Lines        6912     6912           
  Branches      772      772           
=======================================
  Hits         5473     5473           
  Misses       1421     1421           
  Partials       18       18           
Flag Coverage Δ
suite.unit 79.18% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mrgrain
Copy link
Contributor

mrgrain commented May 5, 2025

Approved but leaving @kaizencc opportunity to improve test.

@kaizencc kaizencc temporarily deployed to integ-approval May 5, 2025 20:28 — with GitHub Actions Inactive
@kaizencc kaizencc enabled auto-merge May 5, 2025 20:29
Signed-off-by: github-actions <[email protected]>
@kaizencc kaizencc added this pull request to the merge queue May 6, 2025
Merged via the queue into main with commit 366e284 May 6, 2025
20 checks passed
@kaizencc kaizencc deleted the conroy/deploydiff1 branch May 6, 2025 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Diff and security diff during deploy
4 participants