From 576d4d907b20a53e4a593526f8bae2a1cb12a6e0 Mon Sep 17 00:00:00 2001 From: daynewlee Date: Fri, 6 Dec 2024 10:58:04 -0600 Subject: [PATCH] epss: remove extraneous check Signed-off-by: daynewlee --- enricher/epss/epss.go | 6 ++---- enricher/epss/epss_test.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/enricher/epss/epss.go b/enricher/epss/epss.go index 494b61124..87fd37a60 100644 --- a/enricher/epss/epss.go +++ b/enricher/epss/epss.go @@ -30,6 +30,8 @@ var ( _ driver.EnrichmentUpdater = (*Enricher)(nil) ) +// EPSSItem represents a single entry in the EPSS feed, containing information +// about a CVE's Exploit Prediction Scoring System (EPSS) score and percentile. type EPSSItem struct { ModelVersion string `json:"modelVersion"` Date string `json:"date"` @@ -99,10 +101,6 @@ func (e *Enricher) Configure(ctx context.Context, f driver.ConfigUnmarshaler, c func (e *Enricher) FetchEnrichment(ctx context.Context, prevFingerprint driver.Fingerprint) (io.ReadCloser, driver.Fingerprint, error) { ctx = zlog.ContextWithValues(ctx, "component", "enricher/epss/Enricher/FetchEnrichment") - if e.feedPath == "" || !strings.HasSuffix(e.feedPath, ".gz") { - return nil, "", fmt.Errorf("invalid baseURL path: %q must be non-empty and end with '.gz'", e.feedPath) - } - out, err := tmp.NewFile("", "epss.") if err != nil { return nil, "", err diff --git a/enricher/epss/epss_test.go b/enricher/epss/epss_test.go index 2f75bc721..042a6711c 100644 --- a/enricher/epss/epss_test.go +++ b/enricher/epss/epss_test.go @@ -15,10 +15,10 @@ import ( "testing" "github.com/google/go-cmp/cmp" + "github.com/quay/zlog" "github.com/quay/claircore" "github.com/quay/claircore/libvuln/driver" - "github.com/quay/zlog" ) func TestConfigure(t *testing.T) {