-
Notifications
You must be signed in to change notification settings - Fork 4k
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
chore(cli): fix security related changes integ test #8274
Conversation
The test was passing because (1) the stack contained an incorrect service principal and (2) `--require-approval` was set to `never` by default. This means that the stack was actually deployed but failed, making the test pass. Corrected the service principal, added an expectation to ensure that the stack did not deploy and removed the `--require-approval` CLI option during this test.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch! I really appreciate the detailed commit body outlining why this test was succeeding despite the conditions not being met and mitigating it.
@@ -39,6 +39,7 @@ export interface ShellOptions extends child_process.SpawnOptions { | |||
|
|||
export interface CdkCliOptions extends ShellOptions { | |||
options?: string[]; | |||
neverRequireApproval?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer if we could avoid the negation in the name (i.e. prefer requireApproval).
In this case its closely tied to the flag we want to set so I don't mind it
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
following on from #8274 where a broken integ test that never ran was fixed. A different test for the IAM diff was verifying previously incorrect service principal and we missed updating the expectation. This fixes up the expectations to align to the changes made in #8274 and uses the corrected service principal (ec2.amazonaws.com). ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
The test was passing because (1) the stack contained an incorrect service principal
and (2)
--require-approval
was set tonever
by default. This means that the stackwas actually deployed but failed, making the test pass.
Corrected the service principal, added an expectation to ensure that the stack
did not deploy and removed the
--require-approval
CLI option during this test.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license