界: Environment

本節包括原始程式碼之外的所有內容,但對於建立中產品的安全性仍至關重要。由於此領域所涵蓋的問題與原始程式碼沒有直接關係,因此我們將其與其他領域分開。

GCP Terraform Misconfiguration: GKE Cluster Node Auto-Repair Disabled

Abstract
Terraform 組態停用了 GKE 節點集區的節點自動修復。
Explanation
每個雲端服務的安全性功能都是專為防止或減輕已知威脅而設計的。若故意或不小心停用這些功能,就無法提供任何保護。

依預設,如果 GKE 節點在指定時間範圍內重複報告健全狀況不良的狀態,GKE 就會啟動該節點的修復過程。停用節點自動修復會導致可能執行關鍵任務工作負載、並處於健全狀況不良的節點無法及時自動更換。

範例 1:以下 Terraform 組態透過將 management 區塊中的 auto_repair 設為 false,來停用節點集區的自動修復功能。

resource "google_container_node_pool" "node-pool-demo" {
...
management {
auto_repair = false
...
}
...
}
References
[1] HashiCorp google_container_node_pool
[2] Google Cloud Auto-repairing nodes
[3] Standards Mapping - CIS Google Kubernetes Engine Benchmark Recommendation 5.5.2
[4] Standards Mapping - FIPS200 CM
[5] Standards Mapping - NIST Special Publication 800-53 Revision 4 SI-2 Flaw Remediation (P1)
[6] Standards Mapping - NIST Special Publication 800-53 Revision 5 SI-2 Flaw Remediation
[7] Standards Mapping - OWASP API 2023 API8 Security Misconfiguration
[8] Standards Mapping - OWASP Top 10 2017 A9 Using Components with Known Vulnerabilities
[9] Standards Mapping - OWASP Top 10 2021 A06 Vulnerable and Outdated Components
[10] Standards Mapping - Payment Card Industry Data Security Standard Version 3.2.1 Requirement 6.2
[11] Standards Mapping - Payment Card Industry Data Security Standard Version 4.0 Requirement 6.3.3
[12] Standards Mapping - Payment Card Industry Data Security Standard Version 4.0.1 Requirement 6.3.3
[13] Standards Mapping - Payment Card Industry Software Security Framework 1.0 Control Objective 10.2 - Threat and Vulnerability Management
[14] Standards Mapping - Payment Card Industry Software Security Framework 1.1 Control Objective 10.2 - Threat and Vulnerability Management
[15] Standards Mapping - Payment Card Industry Software Security Framework 1.2 Control Objective 10.2 - Threat and Vulnerability Management, Control Objective C.1.6 - Web Software Components & Services
desc.structural.hcl.gcp_terraform_misconfiguration_gke_cluster_node_auto_repair_disabled