Skip to content

Commit a999515

Browse files
committed
feat: fix test
1 parent 915b0b3 commit a999515

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Diff for: osv/json_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func TestGenerate(t *testing.T) {
4343
Commit: "commit",
4444
Context: []string{"issue-a", "issue-b"},
4545
},
46-
CVEMetadata:&report.CVEMeta{ID: "CVE-2020-1234"},
46+
CVEMetadata: &report.CVEMeta{ID: "CVE-2020-1234"},
4747
}
4848

4949
want := []Entry{

Diff for: report/report.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ type Links struct {
2727
type CVEMeta struct {
2828
ID string `yaml:",omitempty"`
2929
CWE string `yaml:",omitempty"`
30-
Description string `yaml:",omitempty"`
31-
CVSSMeta *CVSS `yaml:",omitempty"`
30+
Description string `yaml:",omitempty"`
31+
CVSSMeta *CVSS `yaml:",omitempty"`
3232
}
3333
type CVSS struct {
3434
Version string `yaml:",omitempty"`
@@ -65,4 +65,3 @@ type Report struct {
6565
Links Links `yaml:",omitempty"`
6666
CVEMetadata *CVEMeta `yaml:"cve_metadata,omitempty"`
6767
}
68-

Diff for: report/utils.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ func cvssV2SeverityByScore(score float32) string {
4242
case score >= 7.0 && score <= 10.0:
4343
return "High"
4444
default:
45-
return "None"
45+
return ""
4646
}
4747
}

0 commit comments

Comments
 (0)