Open QuinnBast opened 1 month ago
@QuinnBast can you provide some information on your repo, as I cannot reproduce locally
I tested it with just an empty directory and it worked, so it must have something to do with one of the files in my repository. I've narrowed it down by testing each directory in our repo one at a time.
The issue comes from our infra folder (which contains all our k8s yamls, ansible playbooks, and helm charts. Specifically, it fails when trying to scan our kubernetes
directory which contains these sub-directories:
$ ls -l
total 32
-rwxr-xr-x. 1 almalinux almalinux 2500 Aug 19 14:41 add_argo_clusters.sh
drwxr-xr-x. 3 almalinux almalinux 18 Jul 3 13:57 argocd
drwxr-xr-x. 5 almalinux almalinux 63 Sep 19 10:44 backend
drwxr-xr-x. 2 almalinux almalinux 108 Sep 4 14:33 build
-rwxr-xr-x. 1 almalinux almalinux 277 Aug 7 09:48 build_all_manifests.sh
-rwxr-xr-x. 1 almalinux almalinux 271 Aug 7 09:48 build_app_manifest.sh
drwxr-xr-x. 5 almalinux almalinux 63 Sep 9 08:55 cert-manager
drwxr-xr-x. 4 almalinux almalinux 50 Sep 19 10:44 cloudnative-pg
-rw-r--r--. 1 almalinux almalinux 694 Aug 19 14:41 copy_latest_images.sh
-rw-r--r--. 1 almalinux almalinux 120 Sep 19 10:44 deployment_order.txt
drwxr-xr-x. 4 almalinux almalinux 50 Sep 19 10:44 elastic-stack
drwxr-xr-x. 5 almalinux almalinux 63 Sep 27 11:42 frontend
-rwxr-xr-x. 1 almalinux almalinux 428 Aug 19 14:41 get_latest_image_name.py
drwxr-xr-x. 5 almalinux almalinux 82 Sep 27 11:42 getMapServer
drwxr-xr-x. 5 almalinux almalinux 63 Sep 6 16:30 ingress-nginx
drwxr-xr-x. 5 almalinux almalinux 63 Sep 6 16:56 k8ssandra-operator
drwxr-xr-x. 4 almalinux almalinux 50 Aug 7 09:48 kafdrop
drwxr-xr-x. 5 almalinux almalinux 63 Sep 6 16:54 kafka
drwxr-xr-x. 5 almalinux almalinux 63 Sep 6 16:57 keycloak
drwxr-xr-x. 4 almalinux almalinux 50 Aug 7 09:48 kube-prometheus-stack
drwxr-xr-x. 4 almalinux almalinux 50 Aug 7 09:48 metallb
-rwxr-xr-x. 1 almalinux almalinux 364 Aug 7 09:48 registry_name.py
-rwxr-xr-x. 1 almalinux almalinux 454 Aug 19 14:41 sync_argo.sh
drwxr-xr-x. 4 almalinux almalinux 50 Aug 7 09:48 topolvm
Each one of these directories is a kustomize
deployment with various environment overlays.
If manually I run each of these directories/files through kubescape with kubescape scan <somePath>
, most work, however, the one that fails is kube-prometheus-stack
. Running kubescape against a few of the deployments takes like 5-10 minutes, however kube-prometheus-stack
throws the stack trace seen above.
One thing to note is that I have the helm charts from these repositories already pulled down before running kubescape, so it's likely that kubescape is scanning the entire helm charts. However - this should not be too crazy, it's not like these helm charts are GBs big or anything...
Description
When attempting to scan my whole repository with
kubescape scan .
, the process fails with an exception.Environment
OS:
Almalinux 9
Version:v3.0.17
Steps To Reproduce
curl -s https://raw.githubusercontent.com/kubescape/kubescape/master/install.sh | /bin/bash
cd
into my git repokubescape scan .
Expected behavior
Expect the scan to complete
Actual Behavior
The CLI throws an exception:
Additional context
Even if I run with
-l debug
I get the same output as above. Other scans work, likekubescape scan
against a k8s cluster, orkubescape scan image
.