feat(queries): query IAM DB Cluster Auth Not Enabled implemented for terraform/aws and cloudFormation/aws#7667
Merged
Merged
Conversation
…us complete boolean logic update
…_Update--cloudformation/aws
…dformation/aws' of https://github.com/cx-andre-pereira/kics into AST-40783--FN_CloudFormation_Boolean_Logic_Update--cloudformation/aws
…_Update--cloudformation/aws
…_Update--cloudformation/aws
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 19562607 | Triggered | Generic Password | 5cbea1a | assets/queries/common/passwords_and_secrets/test/positive53.json | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
Contributor
cx-artur-ribeiro
suggested changes
Aug 22, 2025
cx-artur-ribeiro
left a comment
Contributor
There was a problem hiding this comment.
Hey Ricardo, some quality of life changes and a typo 😄.
Please refer to my comments.
cx-artur-ribeiro
approved these changes
Aug 25, 2025
cx-artur-ribeiro
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks for the changes and the unit tests addition.
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.








Closes #
Reason for Proposed Changes
iam_database_authentication_enabled/EnableIAMDatabaseAuthenticationis not defined or is set to false for CloudFormation and Terraform.Proposed Changes
For both platforms, I used the same reasoning. Two policies, one for the cases when the target field is not defined, and the other for the cases when the target field is set to false.
For both platforms, I used the same helper function called
valid_for_iam_engine_and_version_check_edited, which is a modified version of the helper functionvalid_for_iam_engine_and_version_checkfrom KICS common_lib.The helper function
valid_for_iam_engine_and_version_check_editedchecks the following points:mysql(ormysql-postgresql),postgres,aurora-postgresql, andmariadb, and there is no version defined.mysql(ormysql-postgresql),postgres, andaurora-postgresql.These verifications made on the helper function were approved by the APPSEC team in the office.
Regarding the original function present on the common_lib called
valid_for_iam_engine_and_version_check, I made a change to also support the versions "10.11" and "11.4", which was discussed with the APPSEC team and got the approval from them too.Added samples to cover all the possible scenarios.
NOTE: on the query implementation for the Terraform platform, I did not add support for modules because I didn't find any module equivalent to the resource
aws_rds_cluster.I submit this contribution under the Apache-2.0 license.