From ca41a28641c99e8b4a8c6025a0c6e49a8ce62b65 Mon Sep 17 00:00:00 2001 From: fabio Date: Mon, 13 Jan 2025 01:13:58 -0500 Subject: [PATCH] chore(secret): add reported issues related to secrets in junit template (#8193) --- contrib/junit.tpl | 10 ++++++++++ docs/docs/configuration/reporting.md | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/contrib/junit.tpl b/contrib/junit.tpl index 27b654b7b049..b351f62bb43e 100644 --- a/contrib/junit.tpl +++ b/contrib/junit.tpl @@ -44,5 +44,15 @@ {{- end }} +{{- if .Secrets }} + {{- $secrets := len .Secrets }} + {{ range .Secrets }} + + {{ escapeXML .Match }} + + {{- end }} + +{{- end }} + {{- end }} diff --git a/docs/docs/configuration/reporting.md b/docs/docs/configuration/reporting.md index c515753e9d17..c6ddc1727a71 100644 --- a/docs/docs/configuration/reporting.md +++ b/docs/docs/configuration/reporting.md @@ -415,8 +415,8 @@ If Trivy is installed using rpm then default templates can be found at `/usr/loc |:----------------:|:---------:| | Vulnerability | ✓ | | Misconfiguration | ✓ | -| Secret | | -| License | | +| Secret | ✓ | +| License | ✓ | In the following example using the template `junit.tpl` XML can be generated. ```