Skip to content

Commit 8150ab0

Browse files
authored
✨ Make Vuln ID field lower case in raw results (#1761)
* case sensitive ID * updates
1 parent 2bbbce7 commit 8150ab0

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

cron/format/json.raw.schema

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@
116116
"items": {
117117
"type": "object",
118118
"properties": {
119-
"ID": {
119+
"id": {
120120
"type": "string"
121121
}
122122
},
123123
"required": [
124-
"ID"
124+
"id"
125125
]
126126
}
127127
},

pkg/json.raw.schema

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@
116116
"items": {
117117
"type": "object",
118118
"properties": {
119-
"ID": {
119+
"id": {
120120
"type": "string"
121121
}
122122
},
123123
"required": [
124-
"ID"
124+
"id"
125125
]
126126
}
127127
},

pkg/json_raw_results.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,13 @@ type jsonDefaultBranchCommit struct {
9191
// TODO: check runs, etc.
9292
}
9393

94+
type jsonDatabaseVulnerability struct {
95+
// For OSV: OSV-2020-484
96+
// For CVE: CVE-2022-23945
97+
ID string `json:"id"`
98+
// TODO: additional information
99+
}
100+
94101
type jsonRawResults struct {
95102
DatabaseVulnerabilities []jsonDatabaseVulnerability `json:"database-vulnerabilities"`
96103
// List of binaries found in the repo.
@@ -151,13 +158,6 @@ func (r *jsonScorecardRawResult) addCodeReviewRawResults(cr *checker.CodeReviewD
151158
return nil
152159
}
153160

154-
type jsonDatabaseVulnerability struct {
155-
// For OSV: OSV-2020-484
156-
// For CVE: CVE-2022-23945
157-
ID string
158-
// TODO: additional information
159-
}
160-
161161
//nolint:unparam
162162
func (r *jsonScorecardRawResult) addVulnerbilitiesRawResults(vd *checker.VulnerabilitiesData) error {
163163
r.Results.DatabaseVulnerabilities = []jsonDatabaseVulnerability{}

0 commit comments

Comments
 (0)