Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

GCP code review #504

wants to merge 3 commits into from

Conversation

mikeurbanski1
Copy link

No description provided.

Copy link

@bridgecrew bridgecrew bot left a 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
Copy link

@bridgecrew bridgecrew bot Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
enabled = false
enabled = true
HIGH   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" {
Copy link

@bridgecrew bridgecrew bot Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH   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" {
Copy link

@bridgecrew bridgecrew bot Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIGH   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

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