Skip to content

Commit

Permalink
feat: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
chen-keinan committed Jun 23, 2021
1 parent 915b0b3 commit a999515
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion osv/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestGenerate(t *testing.T) {
Commit: "commit",
Context: []string{"issue-a", "issue-b"},
},
CVEMetadata:&report.CVEMeta{ID: "CVE-2020-1234"},
CVEMetadata: &report.CVEMeta{ID: "CVE-2020-1234"},
}

want := []Entry{
Expand Down
5 changes: 2 additions & 3 deletions report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ type Links struct {
type CVEMeta struct {
ID string `yaml:",omitempty"`
CWE string `yaml:",omitempty"`
Description string `yaml:",omitempty"`
CVSSMeta *CVSS `yaml:",omitempty"`
Description string `yaml:",omitempty"`
CVSSMeta *CVSS `yaml:",omitempty"`
}
type CVSS struct {
Version string `yaml:",omitempty"`
Expand Down Expand Up @@ -65,4 +65,3 @@ type Report struct {
Links Links `yaml:",omitempty"`
CVEMetadata *CVEMeta `yaml:"cve_metadata,omitempty"`
}

2 changes: 1 addition & 1 deletion report/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ func cvssV2SeverityByScore(score float32) string {
case score >= 7.0 && score <= 10.0:
return "High"
default:
return "None"
return ""
}
}

0 comments on commit a999515

Please sign in to comment.