2024-05-26 04:52:23 +00:00
|
|
|
id: kubernetes-code-env
|
|
|
|
info:
|
|
|
|
name: Kubernetes Cluster Validation
|
|
|
|
author: princechaddha
|
|
|
|
severity: info
|
|
|
|
description: |
|
|
|
|
Checks if kubernetes CLI is set up and all necessary tools are installed on the environment.
|
|
|
|
reference:
|
|
|
|
- https://kubernetes.io/
|
2024-06-18 12:04:45 +00:00
|
|
|
tags: cloud,devops,kubernetes,k8s,k8s-cluster-security
|
2024-05-26 04:52:23 +00:00
|
|
|
|
|
|
|
self-contained: true
|
|
|
|
code:
|
|
|
|
- engine:
|
|
|
|
- sh
|
|
|
|
- bash
|
|
|
|
source: |
|
|
|
|
kubectl version
|
|
|
|
|
|
|
|
extractors:
|
|
|
|
- type: regex
|
|
|
|
internal: true
|
|
|
|
name: server_version
|
|
|
|
group: 1
|
|
|
|
regex:
|
|
|
|
- 'Server Version:\s*(v[0-9]+\.[0-9]+\.[0-9]+)'
|
|
|
|
|
|
|
|
- type: dsl
|
|
|
|
dsl:
|
|
|
|
- '"kubectl is successfully connected to the Kubernetes API Server Version: " + server_version'
|
2024-06-25 11:14:32 +00:00
|
|
|
# digest: 490a0046304402202ea803bac221808c48698a2289e0aaa46ca09e452a4e4de0c913e63fde782cf4022032c41ffef97ff3963c2e8c1ea22764bcab0a6258bdb93e32f4318234c842f24c:922c64590222798bb761d5b6d8e72950
|