From 103ec5d30ca737ec375f185537442d2efae8871c Mon Sep 17 00:00:00 2001 From: Alex Goodman Date: Wed, 8 Jan 2025 17:22:53 -0500 Subject: [PATCH] use v6 vuln status enum Signed-off-by: Alex Goodman --- grype/db/v6/affected_package_store_test.go | 2 +- grype/db/v6/models.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grype/db/v6/affected_package_store_test.go b/grype/db/v6/affected_package_store_test.go index 26bfe2d5aa0..5c06f1b252c 100644 --- a/grype/db/v6/affected_package_store_test.go +++ b/grype/db/v6/affected_package_store_test.go @@ -1112,7 +1112,7 @@ func testDistro1AffectedPackage2Handle() *AffectedPackageHandle { }, Vulnerability: &VulnerabilityHandle{ Name: "CVE-2023-1234", - Status: string(VulnerabilityRejected), + Status: VulnerabilityRejected, PublishedDate: &now, ModifiedDate: &later, Provider: &Provider{ diff --git a/grype/db/v6/models.go b/grype/db/v6/models.go index 2a54f30a4d3..44a2ed53d3b 100644 --- a/grype/db/v6/models.go +++ b/grype/db/v6/models.go @@ -130,7 +130,7 @@ type VulnerabilityHandle struct { Name string `gorm:"column:name;not null;index"` // Status conveys the actionability of the current record - Status string `gorm:"column:status;not null;index"` + Status VulnerabilityStatus `gorm:"column:status;not null;index"` // PublishedDate is the date the vulnerability record was first published PublishedDate *time.Time `gorm:"column:published_date;index"`