Skip to content

Commit

Permalink
fix vuln status enum related tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <[email protected]>
  • Loading branch information
wagoodman committed Jan 8, 2025
1 parent 0628d7e commit f145540
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions pkg/process/v6/transformers/github/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestGetVulnerability(t *testing.T) {
ModifiedDate: internal.ParseTime("2024-02-08T22:48:31Z"),
PublishedDate: internal.ParseTime("2024-01-30T20:56:46Z"),
WithdrawnDate: nil,
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "GHSA-2wgc-48g2-cj5w",
Description: "vantage6 has insecure SSH configuration for node and server containers",
Expand Down Expand Up @@ -130,7 +130,7 @@ func TestGetVulnerability(t *testing.T) {
ModifiedDate: internal.ParseTime("2024-03-21T17:48:19Z"),
PublishedDate: internal.ParseTime("2023-06-13T18:30:39Z"),
WithdrawnDate: internal.ParseTime("2023-06-28T23:54:39Z"),
Status: string(grypeDB.VulnerabilityRejected),
Status: grypeDB.VulnerabilityRejected,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "GHSA-3x74-v64j-qc3f",
Description: "Withdrawn Advisory: CraftCMS Server-Side Template Injection vulnerability",
Expand Down Expand Up @@ -172,7 +172,7 @@ func TestGetVulnerability(t *testing.T) {
ModifiedDate: internal.ParseTime("2023-01-09T05:03:39Z"),
PublishedDate: internal.ParseTime("2020-07-27T19:55:52Z"),
WithdrawnDate: nil,
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "GHSA-vc9j-fhvv-8vrf",
Description: "Remote Code Execution in scratch-vm",
Expand Down Expand Up @@ -273,7 +273,7 @@ func TestGetVulnerability(t *testing.T) {
ModifiedDate: nil,
PublishedDate: nil,
WithdrawnDate: internal.ParseTime("2022-01-31T14:32:09Z"),
Status: string(grypeDB.VulnerabilityRejected),
Status: grypeDB.VulnerabilityRejected,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "GHSA-6cwv-x26c-w2q4",
Description: "Low severity vulnerability that affects notebook",
Expand Down Expand Up @@ -304,7 +304,7 @@ func TestGetVulnerability(t *testing.T) {
Version: "1",
DateCaptured: &now,
},
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "GHSA-p5wr-vp8g-q5p4",
Description: "Moderate severity vulnerability that affects Plone",
Expand Down
20 changes: 10 additions & 10 deletions pkg/process/v6/transformers/nvd/transform_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2018, 7, 5, 13, 52, 30, 627000000, time.UTC)),
PublishedDate: timeRef(time.Date(2018, 5, 24, 14, 29, 0, 390000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2018-5487",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -138,7 +138,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2020, 3, 31, 2, 15, 12, 667000000, time.UTC)),
PublishedDate: timeRef(time.Date(2018, 8, 20, 20, 29, 1, 347000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2018-1000222",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -226,7 +226,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2018, 5, 23, 14, 41, 49, 73000000, time.UTC)),
PublishedDate: timeRef(time.Date(2018, 4, 17, 20, 29, 0, 410000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2018-10189",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -309,7 +309,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2016, 11, 28, 19, 50, 59, 600000000, time.UTC)),
PublishedDate: timeRef(time.Date(2016, 11, 22, 17, 59, 0, 180000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2015-8978",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -368,7 +368,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2022, 9, 3, 3, 34, 19, 933000000, time.UTC)),
PublishedDate: timeRef(time.Date(2022, 3, 10, 17, 47, 45, 383000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2022-26488",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -475,7 +475,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2023, 9, 29, 15, 55, 24, 533000000, time.UTC)),
PublishedDate: timeRef(time.Date(2022, 2, 18, 20, 15, 17, 583000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2022-0543",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -570,7 +570,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2021, 12, 10, 19, 57, 6, 357000000, time.UTC)),
PublishedDate: timeRef(time.Date(2021, 5, 27, 19, 15, 7, 880000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2020-10729",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -661,7 +661,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2023, 8, 26, 2, 25, 42, 957000000, time.UTC)),
PublishedDate: timeRef(time.Date(2023, 8, 22, 22, 15, 8, 460000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2023-38733",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -749,7 +749,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2023, 12, 14, 10, 15, 7, 947000000, time.UTC)),
PublishedDate: timeRef(time.Date(2023, 11, 9, 17, 15, 8, 757000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2023-45283",
Assigners: []string{"[email protected]"},
Expand Down Expand Up @@ -860,7 +860,7 @@ func TestTransform(t *testing.T) {
Provider: expectedProvider("nvd"),
ModifiedDate: timeRef(time.Date(2023, 12, 14, 10, 15, 7, 947000000, time.UTC)),
PublishedDate: timeRef(time.Date(2023, 11, 9, 17, 15, 8, 757000000, time.UTC)),
Status: string(grypeDB.VulnerabilityActive),
Status: grypeDB.VulnerabilityActive,
BlobValue: &grypeDB.VulnerabilityBlob{
ID: "CVE-2023-45283",
Assigners: []string{"[email protected]"},
Expand Down

0 comments on commit f145540

Please sign in to comment.