epss

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAPIPartialFail = errors.New("an API request failed")
View Source
var ErrDecode = errors.New("Decoding Error")
View Source
var ErrEncode = errors.New("Encoding failed")
View Source
var ErrNotFound = errors.New("CVE not found in Data Store")

Functions

func Sprint

func Sprint(input []CVE) string

Types

type CSVDecoder added in v0.0.10

type CSVDecoder struct {
	// contains filtered or unexported fields
}

func NewCSVDecoder added in v0.0.10

func NewCSVDecoder(r io.Reader) *CSVDecoder

func (*CSVDecoder) Decode added in v0.0.10

func (c *CSVDecoder) Decode(store *DataStore) error

type CVE

type CVE struct {
	ID          string
	Severity    string
	Link        string
	ScoreDate   time.Time
	Probability float64
	Percentile  float64
}

type DataStore added in v0.0.10

type DataStore struct {
	// contains filtered or unexported fields
}

func NewDataStore added in v0.0.10

func NewDataStore() *DataStore

func (*DataStore) Len added in v0.0.10

func (d *DataStore) Len() int

func (*DataStore) ScoreDate added in v0.0.10

func (d *DataStore) ScoreDate() time.Time

func (*DataStore) WriteEPSS added in v0.0.10

func (d *DataStore) WriteEPSS(cves []CVE) error

type ResponseData added in v0.0.10

type ResponseData struct {
	CVE        string `json:"cve"`
	EPSS       string `json:"epss"`
	Percentile string `json:"percentile"`
	Date       string `json:"date"`
	Severity   string `json:"severity,omitempty"`
	URL        string `json:"url,omitempty"`
}

type Service

type Service struct {
	BatchSize int
	Endpoint  string
	// contains filtered or unexported fields
}

func NewEPSSService

func NewEPSSService(c *http.Client, endpoint string) *Service

func (Service) WriteCSV added in v0.0.10

func (s Service) WriteCSV(w io.Writer, url string) (int64, error)

func (Service) WriteEPSS added in v0.0.10

func (s Service) WriteEPSS(input []CVE) error

WriteEPSS will write probability and percentile scores to each element in input querying on the ID field

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL