DataDog / KubeHound

Tool for building Kubernetes attack paths
https://kubehound.io
Apache License 2.0
761 stars 43 forks source link

Local Dump Clustername Error #271

Open p4pentest opened 1 month ago

p4pentest commented 1 month ago

Hi, I am struggling to get the offline dump run with the latest version (Also same issue with last couple of releases).

I am trying to do a local dump and I keep getting the invalid cluster name error: FATA[20:41:49] dump core: create dumper: create dump result: Invalid clustername: "kubernetes-admin@kubernetes"

I tried updating the username to something without the "-" character (For example "kubernetesadmin@kubernetes") but still get the same error. I tried the previous Kubehound release versions and seems like the offline local dump works fine till v1.3.2 and then every version after that has this issue.

image

I am using the below: Kubehound Release: v1.5.1 and previous OS: Linux kali 6.8.11-amd64 #1 SMP PREEMPT_DYNAMIC Kali 6.8.11-1kali2 (2024-05-30) x86_64 GNU/Linux Kubectl: Client Version: v1.31.1, Kustomize Version: v5.4.2

jt-dd commented 1 month ago

Hello @p4pentest ,

Thanks for reporting the issue. We check the name of the cluster name with a regexp which does not include the @ symbol yet. Will push a fix today and new release.

p4pentest commented 1 month ago

Hi, thanks for the prompt response!

I am not 100% sure if "@" is the problem here. I tried couple of changes and to me it seemed like "-" is the problem. But yeah I am happy to test it if you can share an updated version. For reference, I was testing the "dump local" against a fresh k8s installation, so pretty much everything is default.

jt-dd commented 2 weeks ago

Can you confirm the issue has been fixed in v1.5.3 ?