cyberark / KubiScan

A tool to scan Kubernetes cluster for risky permissions
GNU General Public License v3.0
1.31k stars 130 forks source link

cannot run KubiScan #69

Closed kamal2222ahmed closed 1 year ago

kamal2222ahmed commented 1 year ago

Summary

Cannot run kubiscan -rr or any kubiscan command Provide brief overview and context for the discovered bug.

Steps to Reproduce

$kubiscan -rr File "/root/KubiScan/KubiScan.py", line 105 match cve_severity: ^ SyntaxError: invalid syntax

gmaran23 commented 1 year ago

I encountered the same issue when I cloned from the KibiScan repo.

Downloading from the releases seem to work though.

wget https://github.com/cyberark/KubiScan/archive/refs/tags/v1.5.zip
apt update && apt install unzip -y
unzip v1.5.zip
cd KubiScan-1.5
pip3 install -r requirements.txt
python3 KubiScan.py --help
g3rzi commented 1 year ago

Hi @kamal2222ahmed and @gmaran23 , sorry for the late response. The current version of KubiScan is 1.6 (I still didn't release it yet) but from my checks it is stable and it worked for me.

I think you received the error because match is only supported by Python 3.10.
What version of Python are you using?

Anyway, I changed the code from match and case to if else so it should work for you now.
Please check the latest current version from the GitHub page (version 1.6).