Skip to content

Gomboc CLI Scan - Azure/Terraform - #3

Open
gomboc-ai-dev-gcp[bot] wants to merge 2 commits into
masterfrom
master-remediated-43ef10c2-c1ec-462a-9d58-c42693e01b60-2064
Open

gomboc-ai-dev-gcp[bot] wants to merge 2 commits into
masterfrom
master-remediated-43ef10c2-c1ec-462a-9d58-c42693e01b60-2064

Conversation

@gomboc-ai-dev-gcp

Copy link
Copy Markdown

This fix was produced in response to a scan request in the Gomboc Portal on the following target:

Repository Branch Directory
GC-Testing-Org/DetectionLab master Azure/Terraform
Rules with observations 18
Affected resources 6
Resource types 3
Code fixes 23
Files modified 1

A complete log of the request can be found here.

Recommendation Resources Observations
Username and Password Authentication 4 4
HTTPS 1 1
Encryption At-Rest with Provider Managed Key 1 1
Encryption At-Rest with Bespoke Service Implementation 1 1
Deletion Protection 5 5
Expiry 1 1
Prevent Public Access via Explicit Setting 1 1
Security Logs 1 1
Data Versioning 1 1
Resource Tags 2 2
Ensure Public Network Access is Disabled 1 1
Ensure 'Allow public access from any Azure service within Azure to this server' for PostgreSQL flexible server is disabled 1 1
Ensure That 'Firewalls & Networks' Is Limited to Use Selected Networks Instead of All Networks 1 1
Ensure that RDP access from the Internet is evaluated and restricted 1 1
Ensure that SSH access from the Internet is evaluated and restricted 1 1
Ensure that UDP access from the Internet is evaluated and restricted 1 1
Ensure that HTTP(S) access from the Internet is evaluated and restricted 1 1
Ensure that Only Approved Extensions Are Installed 2 2

These recommendations come from the following benchmarks

Benchmark
Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
CIS Critical Security Controls v8.1
Gomboc Best Practices NIST 2.0.0 (Azure)
NIST 2.0.0
CIS Microsoft Azure Foundations v3.0.0

View the details on Gomboc's Portal

Comment thread Azure/Terraform/main.tf
source_address_prefixes = var.ip_whitelist
destination_address_prefix = "*"
}
tags = "null"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.165 Recommended applying Resource Tags:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
account_replication_type = "LRS"
account_tier = "Standard"
min_tls_version = "TLS1_2"
infrastructure_encryption_enabled = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.214 Recommended applying Encryption At-Rest with Provider Managed Key:
    • Gomboc Best Practices NIST 2.0.0 (Azure)
    • NIST 2.0.0

Comment thread Azure/Terraform/main.tf
account_tier = "Standard"
min_tls_version = "TLS1_2"
infrastructure_encryption_enabled = true
allow_nested_items_to_be_public = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.215 Recommended applying Ensure 'Allow public access from any Azure service within Azure to this server' for PostgreSQL flexible server is disabled:
    • CIS Microsoft Azure Foundations v3.0.0
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
min_tls_version = "TLS1_2"
infrastructure_encryption_enabled = true
allow_nested_items_to_be_public = false
public_network_access_enabled = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.216 Recommended applying Ensure 'Allow public access from any Azure service within Azure to this server' for PostgreSQL flexible server is disabled:
    • CIS Microsoft Azure Foundations v3.0.0
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
infrastructure_encryption_enabled = true
allow_nested_items_to_be_public = false
public_network_access_enabled = false
https_traffic_only_enabled = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.217 Recommended applying HTTPS:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)

Comment thread Azure/Terraform/main.tf
allow_nested_items_to_be_public = false
public_network_access_enabled = false
https_traffic_only_enabled = true
tags = "null"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.218 Recommended applying Resource Tags:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
https_traffic_only_enabled = true
tags = "null"
blob_properties {
versioning_enabled = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.220 Recommended applying Data Versioning:
    • Gomboc Best Practices NIST 2.0.0 (Azure)
    • NIST 2.0.0

Comment thread Azure/Terraform/main.tf
blob_properties {
versioning_enabled = true
delete_retention_policy {
permanent_delete_enabled = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.222 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
}
queue_properties {
logging {
read = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.227 Recommended applying Security Logs:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)

Comment thread Azure/Terraform/main.tf
queue_properties {
logging {
read = true
delete = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.228 Recommended applying Security Logs:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)

Comment thread Azure/Terraform/main.tf
logging {
read = true
delete = true
write = true

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.229 Recommended applying Security Logs:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)

Comment thread Azure/Terraform/main.tf
write = true
}
minute_metrics {
retention_policy_days = "30"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.232 Recommended applying Expiry:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)

Comment thread Azure/Terraform/main.tf
vm_size = "Standard_DS1_v2"

delete_os_disk_on_termination = true
delete_os_disk_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.245 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
tags = {
role = "logger"
}
delete_data_disks_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.311 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
vm_size = "Standard_D1_v2"

delete_os_disk_on_termination = true
delete_os_disk_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.421 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
tags = {
role = "dc"
}
delete_data_disks_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.468 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
vm_size = "Standard_D1_v2"

delete_os_disk_on_termination = true
delete_os_disk_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.500 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
tags = {
role = "wef"
}
delete_data_disks_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.548 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
vm_size = "Standard_D1_v2"

delete_os_disk_on_termination = true
delete_os_disk_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.581 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
tags = {
role = "win10"
}
delete_data_disks_on_termination = false

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.629 Recommended applying Deletion Protection:
    • Gomboc Best Practices CIS Critical Security Controls v8.1 (Azure)
    • CIS Critical Security Controls v8.1

Comment thread Azure/Terraform/main.tf
}
*/
resource "azurerm_storage_encryption_scope" "my_azurerm_storage_encryption_scope_azurerm_storage_account_detectionlab-storageaccount" {
storage_account_id = azurerm_storage_account.detectionlab-storageaccount.id

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.667 Recommended applying Encryption At-Rest with Bespoke Service Implementation:
    • Gomboc Best Practices NIST 2.0.0 (Azure)
    • NIST 2.0.0

Comment thread Azure/Terraform/main.tf
*/
resource "azurerm_storage_encryption_scope" "my_azurerm_storage_encryption_scope_azurerm_storage_account_detectionlab-storageaccount" {
storage_account_id = azurerm_storage_account.detectionlab-storageaccount.id
source = "Microsoft.Storage"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • l.668 Recommended applying Encryption At-Rest with Bespoke Service Implementation:
    • Gomboc Best Practices NIST 2.0.0 (Azure)
    • NIST 2.0.0

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.

0 participants