Discrepancy between JUnit and GitLab SAST templates #8508
Unanswered
jackwhelpton
asked this question in
Q&A
Replies: 1 comment
-
Hello @jackwhelpton So you can create plugin for this template. Regards, Dmitriy |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
We were previously running the
misconfig
scanner using the JUnit template:As expected, this includes misconfigurations as failed tests. In order to combine results from other (non-Trivy) analyzers, we want to migrate this to use GitLab's SAST format. I expected this to be as simple as:
but this doesn't work
Desired Behavior
The GitLab template should present the issues found using the
misconfig
scanner; the same issues that are present in the JUnit output, just in a different format.Actual Behavior
The results are empty.
The reason can be seen by examining the two templates. Whilst the JUnit one combines Vulnerabilities, Secrets, Misconfigs and Licenses:
https://github.com/aquasecurity/trivy/blob/main/contrib/junit.tpl
The GitLab template only looks at Vulnerabilities:
https://github.com/aquasecurity/trivy/blob/main/contrib/gitlab.tpl
Happy to work on an MR for this if there's interest and it has a chance of being accepted.
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Output Format
Template
Mode
Standalone
Debug Output
Operating System
Windows, WSL (Ubuntu), CI (Trivy docker image)
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions