BREAKING: migrate to a new JSON schema (#782)

* feat: introduce a new JSON schema

* test: update

* chore(mod): update fanal

* refactor: add a comment

* test(report): fix

* refactor(writer): add omitempty

* refactor: replace url

* test(scanner): fix
This commit is contained in:
Teppei Fukuda
2021-06-08 18:03:24 +03:00
committed by GitHub
parent 097b8d4881
commit e362843705
16 changed files with 171 additions and 85 deletions

View File

@@ -62,14 +62,16 @@ func TestReportWriter_JSON(t *testing.T) {
jsonWritten := bytes.Buffer{}
jw.Output = &jsonWritten
inputResults := report.Results{
{
Target: "foojson",
Vulnerabilities: tc.detectedVulns,
inputResults := report.Report{
Results: report.Results{
{
Target: "foojson",
Vulnerabilities: tc.detectedVulns,
},
},
}
err := report.WriteResults("json", &jsonWritten, nil, inputResults, "", false)
err := report.Write("json", &jsonWritten, nil, inputResults, "", false)
assert.NoError(t, err)
writtenResults := report.Results{}