Skip to content

feat(terraform): Add new checks for GCP and Azure #7223

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ChananM
Copy link
Contributor

@ChananM ChananM commented Jul 1, 2025

Description

This PR introduces two new security checks to Checkov:

  • GCP (CKV_GCP_99): Ensures that Google Cloud Memorystore for Redis instances are not publicly exposed.
  • Azure (CKV_AZURE_101): Verifies that threat detection is enabled on Azure SQL databases.

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 to PRIVATE_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 the azurerm_sql_database resource.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my feature, policy, or fix is effective and works
  • New and existing tests pass locally with my changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant