Closed JnMik closed 4 years ago
Hey @JnMik, Thank you for reporting !
I will check it and update you when it will be solved. I think I know what will solve it but it will need to wait for after 4.12 because I am presenting demos of this tool and I don't want to add fixes that might affect the demos.
Sorry for the delay,
I saw that the problem is in this here:
https://github.com/cyberark/KubiScan/blob/c20370a15d6082f701dcf8de5c52820663c45416/engine/utils.py#L333
This is because we are not handling the case where pod.spec.volumes
is None
.
I was able to reproduce it with this YAML:
apiVersion: v1
kind: Pod
metadata:
name: super-user-pod
spec:
containers:
- image: busybox:1.28
imagePullPolicy: IfNotPresent
name: redis
resources: {}
securityContext:
capabilities:
add:
- SYS_ADMIN
dnsPolicy: ClusterFirst
enableServiceLinks: true
restartPolicy: Always
automountServiceAccountToken: false
I can now work on solution for this and I will update.
I tested it and it works :) If you still having issues, reopen this case.
Hello !
Here's the commands I used that triggered the error
python3 /KubiScan/KubiScan.py -ho $KUBERNETES_ENDPOINT:$PORT -t /token -c /ca.crt -rp
orpython3 /KubiScan/KubiScan.py -ho $KUBERNETES_ENDPOINT:$PORT -t /token -c /ca.crt -pp
Not sure if this happen with the other commands because when I run them they actually returning a result.
Cheers !