Skip to content

Commit

Permalink
Merge pull request #52 from viviengaetan/fix/junit_multiple_vulns
Browse files Browse the repository at this point in the history
[JUnit] Fix multiple vulns
  • Loading branch information
fabpot committed Jun 27, 2022
2 parents 5a963b3 + 45039a2 commit 9150955
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions security/junit.go
Expand Up @@ -24,7 +24,7 @@ type testcase struct {
XMLName xml.Name `xml:"testcase"`
Name string `xml:"name,attr"`
Classname string `xml:"classname,attr"`
Failure string `xml:"failure,omitempty"`
Failure []string `xml:"failure,omitempty"`
}

func ToJunit(vulns *Vulnerabilities) ([]byte, error) {
Expand All @@ -38,7 +38,7 @@ func ToJunit(vulns *Vulnerabilities) ([]byte, error) {
Name: fmt.Sprintf("%s (%s)", pkg, v.Version),
}
for _, a := range v.Advisories {
tc.Failure = fmt.Sprintf("%s - %s (%s)", a.CVE, a.Title, a.Link)
tc.Failure = append(tc.Failure, fmt.Sprintf("%s - %s (%s)", a.CVE, a.Title, a.Link))
}
cases = append(cases, tc)
ts.Failures++
Expand Down

0 comments on commit 9150955

Please sign in to comment.