-
Notifications
You must be signed in to change notification settings - Fork 321
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
fix(query): update ebs not optimized queries #5020
fix(query): update ebs not optimized queries #5020
Conversation
- Add a list of optimized queries by default on `common.json`; - Add a function on `common.rego` to check if instance type is listed on optimized by default instance's list; - Add this check to ebs optimizes rules on terraform, ansible and cloud formation; - Add new test files to validate cases where instance type is optimized by default; - Fix some minor errors; For this fix is important to note there is an explanation which documentation was used to decide what is default value for instance type. Signed-off-by: Felipe Avelar <[email protected]>
Scan submitted to Checkmarx |
Signed-off-by: Felipe Avelar <[email protected]>
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.
Hello, @lipeavelar! So glad to see you here ❤️ We miss you a lot!
Thank you so much for continuing to contribute! I hope you are doing well!
Signed-off-by: Felipe Avelar <[email protected]>
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.
@lipeavelar , sorry for noticing just now, but I think we should check if the field ebs optimized
is set to false when there is no instance type with ebs optimized by default.
As mentioned in the documentation, "There is no need to enable EBS optimization and no effect if you disable EBS optimization".
I left some suggestions. The sample applies to the Terraform query.
assets/queries/cloudFormation/aws/ec2_not_ebs_optimized/query.rego
Outdated
Show resolved
Hide resolved
false Signed-off-by: Felipe Avelar <[email protected]>
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.
LGTM 🚀
Closes #4968
Proposed Changes
common.json
;common.rego
to check if instance type is listed onoptimized by default instance's list;
formation;
by default;
For this fix is important to note there is an explanation which
documentation was used to decide what is default value for instance
type.
Signed-off-by: Felipe Avelar [email protected]
I submit this contribution under the Apache-2.0 license.