trivy icon indicating copy to clipboard operation
trivy copied to clipboard

Kubernetes Scanning with Gitlab CI

Open sherifkayad opened this issue 3 years ago • 3 comments

Hello,

Currently using the command below:

trivy k8s -n MY_NAMESPACE all --report all --format template --template '@gitlab-ci.tpl'

Yields the following error:

FATAL   unable to write results: unknown format "template". Use "json" or "table"

Is it possible to maybe add a Gitlab CI Template or the instructions how the scan of a whole cluster and posting a report to Gitlab-CI could be made possible?

sherifkayad avatar Nov 28 '22 17:11 sherifkayad

https://github.com/aquasecurity/trivy/issues/2661

Format template is not supported yet for Kubernetes scanning

empeekdev avatar Dec 05 '22 13:12 empeekdev

This issue is stale because it has been labeled with inactivity.

github-actions[bot] avatar Feb 04 '23 00:02 github-actions[bot]

Keeping this one alive

sherifkayad avatar Feb 04 '23 07:02 sherifkayad

This issue is stale because it has been labeled with inactivity.

github-actions[bot] avatar Apr 06 '23 00:04 github-actions[bot]

Keep alive

sherifkayad avatar Apr 06 '23 06:04 sherifkayad

@chen-keinan is it possible to refactor the code such that the output flag is just using the trivy one? there will be more improvements to output formatting soon and we want all the scanners in trivy to benefit from it

itaysk avatar Apr 07 '23 17:04 itaysk

I don't think it is easy to use the trivy output implementation because the result of Kubernetes scanning has a different structure.

knqyf263 avatar May 10 '23 15:05 knqyf263

Would it be possible to enable the template output, if --scanners vuln is configured?

jkroepke avatar Oct 30 '23 14:10 jkroepke