Generate a Kubescape report
Kubescape offers two scanning methods: scanning repositories/file systems or scanning K8S clusters. We'll use the Bitnami Kubescape docker image in both cases.
This is a typical Helm charts repository scan. We'll need to configure the Kubescape image with an external volume to generate the output file. Other than that, the command uses the following parameters:
docker run --rm -it -v /tmp:/output \
bitnami/kubescape:3.0.3 oss-assessment \
https://github.com/Telefonica/helm-charts/tree/master \
--output /output/telefonica.json
The Kubescape CLI will scan the default Kubernetes context, but we'll need to pass those parameters to the Kubescape docker image for the oss assessment.
docker run --rm -it -v /tmp:/output -v $HOME/.kube:/.kube \
bitnami/kubescape:3.0.3 oss-assessment \
--kubeconfig /.kube/config \
--kube-context content-platform \
--include-namespaces kafka \
-o /output/content-platform-kafka.json