Rule Metadata

Last updated: 2024-01-15
🔴
Severity
CRITICAL
🏗️
Category
Platform & Infrastructure Security
Version
v1.0.0
Downloads
1.2K
Author: Spotter Security Team
Created: 2024-01-10
Compliance:
CIS NIST

Insecure Bind Address Set

The API server's insecure bind address should not be set, as this exposes an unauthenticated and unencrypted endpoint.

YAML Configuration

rule.yaml YAML
apiVersion: rules.spotter.dev/v1alpha1
kind: SpotterRule
metadata:
  name: spotter-platform-002
  labels:
    severity: "critical"
    category: "platform"
  annotations:
    rules.spotter.dev/title: "Insecure Bind Address Set"
    rules.spotter.dev/version: "1.0.0"
    rules.spotter.dev/cwe: "CWE-319"
    rules.spotter.dev/description: "The API server's insecure bind address should not be set, as this exposes an unauthenticated and unencrypted endpoint."
spec:
  match:
    resources:
      kubernetes:
        apiGroups:
          - ""
        versions:
          - v1
        kinds:
          - Pod
  cel: |
    has(object.spec.containers) && object.spec.containers.exists(c,
      has(c.command) && c.command.exists(cmd, cmd == "kube-apiserver") &&
      (
        (has(c.args) && c.args.exists(arg, arg.startsWith("--insecure-bind-address="))) ||
        (has(c.command) && c.command.exists(cmd, cmd.startsWith("--insecure-bind-address=")))
      )
    )
  remediation:
    manual: "Remove the `--insecure-bind-address` flag from the kube-apiserver."
  references:
    - title: "Kubernetes API Server Flags"
      url: "https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/"