-
Notifications
You must be signed in to change notification settings - Fork 31
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
GCP code review #504
base: master
Are you sure you want to change the base?
GCP code review #504
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.
Bridgecrew has found 3 infrastructure configuration errors in this PR ⬇️
} | ||
} | ||
backup_configuration { | ||
enabled = false |
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.
enabled = false | |
enabled = true |
Ensure all Cloud SQL database instance have backup configuration enabled
Resource: google_sql_database_instance.master_instance | ID: BC_GCP_GENERAL_6
Description
Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL and SQL Server. It offers data encryption at rest and in transit, Private connectivity with VPC and user-controlled network access with firewall protection. Backups provide a way to restore a Cloud SQL instance to recover lost data or recover from a problem with your instance.We recommend you enable automated backups for instances that contain data of high importance.
Benchmarks
- ISO27001 A.12.3.1
- CIS GCP V1.1 6.7
@@ -0,0 +1,19 @@ | |||
resource google_sql_database_instance "master_instance" { |
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.
Ensure all Cloud SQL database instance requires all incoming connections to use SSL
Resource: google_sql_database_instance.master_instance | ID: BC_GCP_GENERAL_5
Description
Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL and SQL Server. It offers data encryption at rest and in transit, Private connectivity with VPC and user-controlled network access with firewall protection. Cloud SQL creates a server certificate automatically when a new instance is created.We recommend you enforce all connections to use SSL/TLS.
Benchmarks
- CIS GCP V1.1 6.4
@@ -0,0 +1,19 @@ | |||
resource google_sql_database_instance "master_instance" { |
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.
Ensure that Cloud SQL database Instances are not open to the world
Resource: google_sql_database_instance.master_instance | ID: BC_GCP_NETWORKING_4
How to Fix
resource "google_compute_network" "private_network" {
provider = google-beta
name = "private-network"
}
resource "google_compute_global_address" "private_ip_address" {
provider = google-beta
name = "private-ip-address"
purpose = "VPC_PEERING"
address_type = "INTERNAL"
prefix_length = 16
network = google_compute_network.private_network.id
}
Description
Cloud SQL is a fully managed relational database service for MySQL, PostgreSQL, and SQL Server. It offers data encryption at rest and in transit, Private connectivity with VPC and user-controlled network access with firewall protection.It is possible to configure Cloud SQL to have a public IPv4 address. This means your cluster can accept connections from specific IP addresses, or a range of addresses, by adding authorized addresses to your instance. We do not recommend this option.
We recommend you ensure Cloud SQL Database Instances are not publicly accessible, to help secure against attackers scanning the internet in search of public databases.
Benchmarks
- NIST-800-53 CA-3
- CIS GCP V1.1 6.5
No description provided.