Back to catalog

Kubernetes Dashboard Deployed

No violationsstackroxlowdeploy

Alert on the presence of the Kubernetes dashboard service

Rationale
The Kubernetes dashboard can be used to gain external access to a cluster, or to obtain additional access once inside.
Remediation
Modify your cluster configuration to disable the Kubernetes dashboard service if it is not in use. In Google Kubernetes Engine (GKE), you can execute: gcloud container clusters update --update-addons=KubernetesDashboard=DISABLED [cluster-name]
CategoriesSecurity Best Practices
Compliance mappingsView coverage →
DORA EU 2022/2554
Art. 9.2
ISO/IEC 27001 2022
A.8.9
NIST SP 800-53 rev. 5
CM-2
PCI DSS 4.0
2.2.1

Generated artifacts

3 of 5 targets supported
kubernetes-dashboard-deployed.yaml
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
  name: kubernetes-dashboard-deployed
  annotations:
    policies.kyverno.io/title: Kubernetes Dashboard Deployed
    policies.kyverno.io/category: Security Best Practices
    policies.kyverno.io/severity: low
    policies.kyverno.io/description: Alert on the presence of the Kubernetes dashboard service
    policies.kyverno.io/remediation: "Modify your cluster configuration to disable the Kubernetes dashboard service if it is not in use. In Google Kubernetes Engine (GKE), you can execute: gcloud container clusters update --update-addons=KubernetesDashboard=DISABLED [cluster-name]"
    policies.kyverno.io/rationale: The Kubernetes dashboard can be used to gain external access to a cluster, or to obtain additional access once inside.
    policies.io/source: stackrox
    policies.io/source-id: 0ac267ae-9128-42c7-b15e-0e926844aa2f
spec:
  validationFailureAction: Audit
  background: true
  rules:
    - name: kubernetes-dashboard-deployed
      match:
        any:
          - resources:
              kinds:
                - Pod
      validate:
        message: 'Policy "Kubernetes Dashboard Deployed" violated: Alert on the presence of the Kubernetes dashboard service'
        deny:
          conditions:
            all:
              - key: "{{ request.object.spec.containers[].image }}"
                operator: AnyIn
                value:
                  - "*r/.*kubernetesui/dashboard.**"
IR (canonical)
{
  "id": "0ac267ae-9128-42c7-b15e-0e926844aa2f",
  "name": "Kubernetes Dashboard Deployed",
  "description": "Alert on the presence of the Kubernetes dashboard service",
  "rationale": "The Kubernetes dashboard can be used to gain external access to a cluster, or to obtain additional access once inside.",
  "remediation": "Modify your cluster configuration to disable the Kubernetes dashboard service if it is not in use. In Google Kubernetes Engine (GKE), you can execute: gcloud container clusters update --update-addons=KubernetesDashboard=DISABLED [cluster-name]",
  "severity": "low",
  "categories": [
    "Security Best Practices"
  ],
  "lifecycle": [
    "deploy"
  ],
  "eventSource": "none",
  "scope": [],
  "exclusions": [],
  "enforcement": {
    "failBuild": false
  },
  "expression": {
    "op": "criterion",
    "field": "image-remote",
    "values": [
      "r/.*kubernetesui/dashboard.*"
    ],
    "valuesOp": "or",
    "negate": false
  },
  "disabled": false
}
Original StackRox JSON
{
  "id": "0ac267ae-9128-42c7-b15e-0e926844aa2f",
  "name": "Kubernetes Dashboard Deployed",
  "description": "Alert on the presence of the Kubernetes dashboard service",
  "rationale": "The Kubernetes dashboard can be used to gain external access to a cluster, or to obtain additional access once inside.",
  "remediation": "Modify your cluster configuration to disable the Kubernetes dashboard service if it is not in use. In Google Kubernetes Engine (GKE), you can execute: gcloud container clusters update --update-addons=KubernetesDashboard=DISABLED [cluster-name]",
  "disabled": false,
  "categories": [
    "Security Best Practices"
  ],
  "lifecycleStages": [
    "DEPLOY"
  ],
  "eventSource": "NOT_APPLICABLE",
  "exclusions": [],
  "scope": [],
  "severity": "LOW_SEVERITY",
  "enforcementActions": [],
  "policySections": [
    {
      "sectionName": "",
      "policyGroups": [
        {
          "fieldName": "Image Remote",
          "booleanOperator": "OR",
          "negate": false,
          "values": [
            {
              "value": "r/.*kubernetesui/dashboard.*"
            }
          ]
        }
      ]
    }
  ],
  "notifiers": [],
  "lastUpdated": null,
  "SORTName": "",
  "SORTLifecycleStage": "",
  "SORTEnforcement": false,
  "policyVersion": "1.1",
  "mitreAttackVectors": [],
  "criteriaLocked": true,
  "mitreVectorsLocked": true,
  "isDefault": true,
  "source": "IMPERATIVE"
}