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

Update big_data.tf #619

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

Update big_data.tf #619

wants to merge 2 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 infrastructure configuration errors in this PR ⬇️

@@ -18,6 +18,26 @@ resource google_sql_database_instance "master_instance" {
}
}

resource google_sql_database_instance "master_instance2" {
Copy link

@bridgecrew bridgecrew bot Jan 19, 2022

Choose a reason for hiding this comment

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

HIGH   Ensure Cloud SQL database instances are not publicly accessible
    Resource: google_sql_database_instance.master_instance2 | 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

🎉   Fixed by commit aa8180a - Update terraform/gcp/big_data.tf

@@ -18,6 +18,26 @@ resource google_sql_database_instance "master_instance" {
}
}

resource google_sql_database_instance "master_instance2" {
Copy link

@bridgecrew bridgecrew bot Jan 19, 2022

Choose a reason for hiding this comment

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

Suggested change
resource google_sql_database_instance "master_instance2" {
resource google_sql_database_instance "master_instance2" {
}
HIGH   Ensure incoming connections to Cloud SQL database instances use SSL
    Resource: google_sql_database_instance.master_instance2 | 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

🎉   Fixed by commit aa8180a - Update terraform/gcp/big_data.tf

}
Copy link

@bridgecrew bridgecrew bot Jan 19, 2022

Choose a reason for hiding this comment

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

CRITICAL   Ensure GCP BigQuery dataset is not publicly accessible
    Resource: google_bigquery_dataset.dataset | ID: BC_GCP_GENERAL_7

Description

Dataset-level permissions help determine which users, groups, and service accounts are allowed to access tables, views, and table data in a specific BigQuery dataset. You can configure BigQuery permissions at a higher level in the Cloud IAM resource hierarchy. Your configurations are inherited and based on the IAM structure you select to apply.

We recommend you ensure private datasets remain private by avoiding the All Authenticated Users option which gives all Google account holders access to the dataset, and makes the dataset public.

Benchmarks

  • NIST-800-53 AC-3
  • ISO27001 A.8.2.3, A.14.1.3

🎉   Fixed by commit aa8180a - Update terraform/gcp/big_data.tf

Copy link

@prisma-cloud-devsecops prisma-cloud-devsecops bot left a comment

Choose a reason for hiding this comment

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

Prisma Cloud has found infrastructure configuration errors in this PR ⬇️

@@ -18,6 +18,26 @@ resource google_sql_database_instance "master_instance" {
}
}

resource google_sql_database_instance "master_instance2" {

Choose a reason for hiding this comment

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

HIGH   Cloud SQL database instances are publicly accessible
    Resource: google_sql_database_instance.master_instance2 | 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
Dependent Resources

Calculating...

}
}
backup_configuration {
enabled = false

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   Cloud SQL database instances do not have backup configuration enabled
    Resource: google_sql_database_instance.master_instance2 | 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
Dependent Resources

Calculating...

}

Choose a reason for hiding this comment

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

HIGH   GCP BigQuery dataset is publicly accessible
    Resource: google_bigquery_dataset.dataset | ID: BC_GCP_GENERAL_7

Description

Dataset-level permissions help determine which users, groups, and service accounts are allowed to access tables, views, and table data in a specific BigQuery dataset. You can configure BigQuery permissions at a higher level in the Cloud IAM resource hierarchy. Your configurations are inherited and based on the IAM structure you select to apply.

We recommend you ensure private datasets remain private by avoiding the All Authenticated Users option which gives all Google account holders access to the dataset, and makes the dataset public.

Benchmarks

  • NIST-800-53 AC-3
  • ISO27001 A.8.2.3, A.14.1.3
Dependent Resources

Calculating...

@@ -18,6 +18,26 @@ resource google_sql_database_instance "master_instance" {
}
}

resource google_sql_database_instance "master_instance2" {

Choose a reason for hiding this comment

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

HIGH   Incoming connections to Cloud SQL database instances do not use SSL
    Resource: google_sql_database_instance.master_instance2 | 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
Dependent Resources

Calculating...

Co-authored-by: bridgecrew[bot] <60663194+bridgecrew[bot]@users.noreply.github.com>
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.

2 participants