Skip to content

Commit

Permalink
✨ Make Vuln ID field lower case in raw results (#1761)
Browse files Browse the repository at this point in the history
* case sensitive ID

* updates
  • Loading branch information
laurentsimon authored Mar 25, 2022
1 parent 2bbbce7 commit 8150ab0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions cron/format/json.raw.schema
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
"items": {
"type": "object",
"properties": {
"ID": {
"id": {
"type": "string"
}
},
"required": [
"ID"
"id"
]
}
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/json.raw.schema
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
"items": {
"type": "object",
"properties": {
"ID": {
"id": {
"type": "string"
}
},
"required": [
"ID"
"id"
]
}
},
Expand Down
14 changes: 7 additions & 7 deletions pkg/json_raw_results.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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{}
Expand Down

0 comments on commit 8150ab0

Please sign in to comment.