diff --git a/docs/kb/KHV007.md b/docs/kb/KHV007.md new file mode 100644 index 0000000..99b56d5 --- /dev/null +++ b/docs/kb/KHV007.md @@ -0,0 +1,20 @@ +--- +id: KHV007 +title: Specific Access to Kubernetes API +categories: [Access Risk] +--- + +# KHV007 - Specific Access to Kubernetes API + +## Issue description + +kube-hunter was able to perform the action specified by the reported vulnerability (check the report for more information). This may or may not be a problem, depending on your cluster setup and preferences. + +## Remediation + +Review the RBAC permissions to Kubernetes API server for the anonymous and default service account. + +## References + +- [Using RBAC Authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) +- [KHV005 - Access to Kubernetes API]({{ site.baseurl }}{% link kb/KHV005.md %}) \ No newline at end of file diff --git a/src/modules/hunting/apiserver.py b/src/modules/hunting/apiserver.py index 31df27b..e520f31 100644 --- a/src/modules/hunting/apiserver.py +++ b/src/modules/hunting/apiserver.py @@ -41,7 +41,7 @@ class ApiInfoDisclosure(Vulnerability, Event): name +=" using service account token" else: name +=" as anonymous user" - Vulnerability.__init__(self, KubernetesCluster, name=name, category=InformationDisclosure) + Vulnerability.__init__(self, KubernetesCluster, name=name, category=InformationDisclosure, vid="KHV007") self.evidence = evidence class ListPodsAndNamespaces(ApiInfoDisclosure):