Open mtcolman opened 1 year ago
Thanks for opening your first issue here! Be sure to follow the issue template!
thank you for the bug report @mtcolman. Will try to reproduce on my end. Are you looking into implementing a fix or should we go ahead and fix it?
@dani-santos-code thanks for getting back to me - I've now remembered that the issue was due to the labels:
release: 1.7
Needed to be changed to have quotes:
release: "1.7"
And then it worked:
kubeaudit all -f "deployment.yaml"
---------------- Results for ---------------
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-kubernetes
--------------------------------------------
-- [error] AppArmorAnnotationMissing
Message: AppArmor annotation missing. The annotation 'container.apparmor.security.beta.kubernetes.io/container-one' should be added.
Metadata:
Container: container-one
MissingAnnotation: container.apparmor.security.beta.kubernetes.io/container-one
...
...
So I think your code needs to handle if key/value pairs are incorrectly configured - i.e. it should realise it can/can't scan and then exit gracefully, rather than telling me there are no issues (when there clearly are some, as it found them when I've corrected a key/value error).
And I'd be very grateful if you could please provide the fix (as I don't know how).
ISSUE TYPE
BUG REPORT
SUMMARY
I'm testing a deployment.yaml with low/no securityContexts within, and kubeaudit is not reporting any findings.
ENVIRONMENT
tar
andmv
to/usr/local/bin
STEPS TO REPRODUCE
Use this yaml:
EXPECTED RESULTS
I expected a lot of results of missing securityContexts and security related settings
ACTUAL RESULTS
ADDIITONAL INFO
A similar test with a pod manifest worked as follows: