-
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): fix false positive for rds backup_retention_period not set #5902
fix(query): fix false positive for rds backup_retention_period not set #5902
Conversation
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.
Hi @patrickpichler
Thank you so much for your amazing contribution!
I would like only to request one change:
- in
positive_expected_result.json
change thefileName
, on line 12, frompositive3.tf
topositive2.tf
The query is failing in unit tests due to being expected a result in positive3.tf
that does not exist
@@ -3,45 +3,6 @@ package Cx | |||
import data.generic.common as common_lib | |||
import data.generic.terraform as tf_lib | |||
|
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 again, @patrickpichler! Thank you for another contribution!
In addition to Miguel's suggestion, do you mind also updating the Ansible query, please?
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've adjusted the Ansible query. I will squash commits later into one, when everything is working 🙂
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.
Thank you so much 🚀
@cxMiguelSilva the tests are still failing with
Do you have any idea? |
Hi @patrickpichler, to run E2E tests and pass all tests you should run the npm mock server to correctly test the CIS Descriptions. You can find the docs here |
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 🚀
Thansk @cxMiguelSilva 🤦 |
Since the there is a default value for `backup_retention_period`, the query reported a false positive if the field was not set. This has been fixed. Closes Checkmarx#5882
1083aa9
to
c444d90
Compare
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
Since the there is a default value for
backup_retention_period
, the query reported a false positive if the field was not set. This has been fixed.Closes #5882
Proposed Changes
I submit this contribution under the Apache-2.0 license.