Skip to content

Commit

Permalink
🐛 Fix check for dashboard in k8s.deployment (#274)
Browse files Browse the repository at this point in the history
Do not try to check k8s.pod for k8s.deployment.

Fixes the underlying issue for
mondoohq/cnspec#817

Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker authored Oct 6, 2023
1 parent 2bba650 commit 9e7338d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/mondoo-kubernetes-security.mql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7035,8 +7035,8 @@ queries:
impact: 40
mql: |
k8s.deployment.podSpec["containers"].none( _["image"].contains("kubernetes-dashboard") || _["image"].contains("kubernetesui") )
k8s.deployment.labels["app"] == null || k8s.pod.labels["app"] != "kubernetes-dashboard"
k8s.deployment.labels["k8s-app"] == null || k8s.pod.labels["k8s-app"] != "kubernetes-dashboard"
k8s.deployment.labels["app"] == null || k8s.deployment.labels["app"] != "kubernetes-dashboard"
k8s.deployment.labels["k8s-app"] == null || k8s.deployment.labels["k8s-app"] != "kubernetes-dashboard"
docs:
desc: |
The Kubernetes dashboard allows browsing through cluster resources such as workloads, configmaps and secrets. In 2019 Tesla was hacked because their Kubernetes dashboard was publicly exposed. This allowed the attackers to extract credentials and deploy Bitcoin miners on the cluster.
Expand Down

0 comments on commit 9e7338d

Please sign in to comment.