File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,10 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
88## [ UNRELEASED]
99
10+ ## [ 0.7.4] - 2024-06-18
11+
1012### Fixed
1113
1214- Missing ` slog.Error ` for KEV validations
1315- Use base EPSS url instead of a specific date to get the latest data
16+ - Use a * os.File for kev and epss validation to simplify CLI runtime logic
1417
1518## [ 0.7.0] - 2024-05-17
1619
Original file line number Diff line number Diff line change @@ -52,14 +52,13 @@ var validateCmd = &cobra.Command{
5252 return nil
5353 },
5454 RunE : func (cmd * cobra.Command , args []string ) error {
55-
5655 err := gatecheck .Validate (
5756 RuntimeConfig .gatecheckConfig ,
5857 RuntimeConfig .targetFile ,
5958 args [0 ],
6059 gatecheck .WithEPSSURL (RuntimeConfig .EPSSURL .Value ().(string )),
6160 gatecheck .WithKEVURL (RuntimeConfig .KEVURL .Value ().(string )),
62- gatecheck .WithEPSSFile (RuntimeConfig .epssFile ),
61+ gatecheck .WithEPSSFile (RuntimeConfig .epssFile ), // TODO: fix this
6362 gatecheck .WithKEVFile (RuntimeConfig .kevFile ),
6463 )
6564
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package gatecheck
33import (
44 "io"
55 "net/http"
6+ "os"
67
78 "github.com/gatecheckdev/gatecheck/pkg/epss"
89 "github.com/gatecheckdev/gatecheck/pkg/kev"
@@ -15,8 +16,8 @@ type fetchOptions struct {
1516 kevClient * http.Client
1617 kevURL string
1718
18- epssFile io. Reader
19- kevFile io. Reader
19+ epssFile * os. File
20+ kevFile * os. File
2021}
2122
2223func defaultOptions () * fetchOptions {
@@ -56,15 +57,15 @@ func WithKEVURL(url string) optionFunc {
5657 }
5758}
5859
59- func WithEPSSFile (r io. Reader ) optionFunc {
60+ func WithEPSSFile (epssFile * os. File ) optionFunc {
6061 return func (o * fetchOptions ) {
61- o .epssFile = r
62+ o .epssFile = epssFile
6263 }
6364}
6465
65- func WithKEVFile (r io. Reader ) optionFunc {
66+ func WithKEVFile (kevFile * os. File ) optionFunc {
6667 return func (o * fetchOptions ) {
67- o .kevFile = r
68+ o .kevFile = kevFile
6869 }
6970}
7071
You can’t perform that action at this time.
0 commit comments