Make Vuln ID field lower case in raw results (#1761)

* case sensitive ID

* updates
This commit is contained in:
laurentsimon 2022-03-24 17:24:23 -07:00 committed by GitHub
parent 2bbbce75b3
commit 8150ab0f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 11 deletions

View File

@ -116,12 +116,12 @@
"items": {
"type": "object",
"properties": {
"ID": {
"id": {
"type": "string"
}
},
"required": [
"ID"
"id"
]
}
},

View File

@ -116,12 +116,12 @@
"items": {
"type": "object",
"properties": {
"ID": {
"id": {
"type": "string"
}
},
"required": [
"ID"
"id"
]
}
},

View File

@ -91,6 +91,13 @@ type jsonDefaultBranchCommit struct {
// TODO: check runs, etc.
}
type jsonDatabaseVulnerability struct {
// For OSV: OSV-2020-484
// For CVE: CVE-2022-23945
ID string `json:"id"`
// TODO: additional information
}
type jsonRawResults struct {
DatabaseVulnerabilities []jsonDatabaseVulnerability `json:"database-vulnerabilities"`
// List of binaries found in the repo.
@ -151,13 +158,6 @@ func (r *jsonScorecardRawResult) addCodeReviewRawResults(cr *checker.CodeReviewD
return nil
}
type jsonDatabaseVulnerability struct {
// For OSV: OSV-2020-484
// For CVE: CVE-2022-23945
ID string
// TODO: additional information
}
//nolint:unparam
func (r *jsonScorecardRawResult) addVulnerbilitiesRawResults(vd *checker.VulnerabilitiesData) error {
r.Results.DatabaseVulnerabilities = []jsonDatabaseVulnerability{}