trivy config junit output missing location information #8773
Replies: 3 comments 2 replies
-
Hi @internetstaff ! I'll take a look. |
Beta Was this translation helpful? Give feedback.
-
@aquasecurity/trivy Do you know which JUnit standard our template is based on? I tried to find the schema in the official documentation in hopes of finding attribute support for specifying the location of the issue, but was unsuccessful. I found several issues in the junit repository with schema definition requests junit-team/junit5#2625 junit-team/junit5#373. Should we just add the location information to the message as was done in |
Beta Was this translation helpful? Give feedback.
-
Track #8790 |
Beta Was this translation helpful? Give feedback.
-
Description
We're trying to migrate from tfsec to trivy. We're on Gitlab, and have it parsing tfsec's junit output as test failures to fail pipelines.
This works great: we get a description of the problem and a source location (filename + line number).
Using
trivy config
with the junit output, we get the failures and a description, but the failure element is missing any location information - it just has a description of the problem instead.Example with tfsec:
Example with trivy:
We're currently working around this by adding the
gitlab-codequality
template, which does include specific locations that are parsed by Gitlab. We have to rely on the junit output to fail the pipeline, and the codequality output to provide useful output. :)Desired Behavior
Junit failures contain specific location information parseable by Gitlab
Actual Behavior
Junit failures only have a description.
Reproduction Steps
Target
Filesystem
Scanner
Misconfiguration
Output Format
Template
Mode
Standalone
Debug Output
Operating System
Fedora Linux
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions