feat(terraform): Add new checks for GCP and Azure #7223
+162
−0
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.
Description
This PR introduces two new security checks to Checkov:
These checks are based on modern security best practices and help prevent common misconfigurations.
New/Edited policies
GCP - CKV_GCP_99: Ensure Memorystore for Redis is not exposed to public internet
Description: This policy checks that Google Cloud Memorystore for Redis instances are not configured with
connect_mode = "DIRECT_PEERING"
, which would expose them to the public internet. Exposing in-memory data stores to the public can lead to unauthorized access and data breaches.Fix: Set the
connect_mode
toPRIVATE_SERVICE_ACCESS
.Azure - CKV_AZURE_101: Ensure that Threat Detection is enabled for SQL Database
Description: This policy ensures that Azure SQL databases have threat detection enabled. Threat detection is a critical security feature that identifies and alerts on potential security threats, such as SQL injection attacks.
Fix: Enable the
threat_detection_policy
on theazurerm_sql_database
resource.Checklist: