GKE PodSecurityPolicy controller is disabled Affecting Kubernetes (Container) Engine service in Google


Severity

0.0
low
0
10
Severity Framework
Snyk CCSS
Rule category
Containers/ Best Practices

Is your environment affected by this misconfiguration?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
Frameworks
CIS-Controls
  • Snyk IDSNYK-CC-00419
  • creditSnyk Research Team

Description

The Pods cannot be constrained with PodSecurityPolicies, which increases the security management overhead.

How to fix?

Set pod_security_policy_config.enabled attribute to true.

Example Configuration

resource "google_container_cluster" "allowed" {
  provider = google-beta
  name     = "my-gke-cluster"
  location = "us-central1"
  initial_node_count       = 1
  node_config{
    disk_size_gb = 10
  }
  pod_security_policy_config {
    enabled = true
  }
}