Skip to content

Commit b077805

Browse files
fix: use base epss url
1 parent 0ff2ec6 commit b077805

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Fixed
1111

1212
- Missing `slog.Error` for KEV validations
13+
- Use base EPSS url instead of a specific date to get the latest data
1314

1415
## [0.7.0] - 2024-05-17
1516

pkg/epss/epss.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
const (
2020
dataModel = "v2023.03.01"
2121
modelDateLayout = "2006-01-02T15:04:05-0700"
22-
epssUrlTemplate = "https://epss.cyentia.com/epss_scores-%d-%s-%s.csv.gz"
22+
defaultEPSSURL = "https://epss.cyentia.com"
2323
)
2424

2525
// Data a representation of the CSV data from first API
@@ -83,13 +83,9 @@ type FetchOptions struct {
8383

8484
// DefaultFetchOptions use the default client and url for today's scores
8585
func DefaultFetchOptions() *FetchOptions {
86-
today := time.Now()
87-
year := today.Year()
88-
month := today.Format("01")
89-
day := today.Format("02")
9086
return &FetchOptions{
9187
Client: http.DefaultClient,
92-
URL: fmt.Sprintf(epssUrlTemplate, year, month, day),
88+
URL: defaultEPSSURL,
9389
}
9490
}
9591

0 commit comments

Comments
 (0)