logo

Database

Json Yaml Insecure Http Port

Description

Detects when Kubernetes API server is configured to expose an insecure HTTP port (non-TLS). This allows unencrypted communication with the API server, potentially exposing sensitive cluster management operations to network attacks and unauthorized access.

Weakness:

332 - Use of insecure channel - Source code

Category: Information Collection

Detection Strategy

    Inspect Kubernetes configuration files/manifests for API server settings

    Check if 'spec' section contains configuration for insecure HTTP port

    Report vulnerability if insecure port is enabled through port configurations

    Flag configurations that allow non-TLS connections to the API server

Vulnerable code example

apiVersion: v1
kind: Service
metadata:
  name: app-service
spec:
  selector:
    app: myapp
  ports:...

✅ Secure code example

apiVersion: v1
kind: Service
metadata:
  name: app-service
  labels:
    app.kubernetes.io/name: myapp    # Use standard K8s labeling convention
spec:
  type: ClusterIP                    # Explicitly define internal cluster access only...