gocvss20

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTooShortVector     = errors.New("too short vector")
	ErrInvalidMetricOrder = errors.New("invalid metric order")
	ErrInvalidMetricValue = errors.New("invalid metric value")
)

Functions

This section is empty.

Types

type CVSS20

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

CVSS20 embeds all the metric values defined by the CVSS v2.0 rev2 specification.

func ParseVector

func ParseVector(vector string) (*CVSS20, error)

ParseVector parses a CVSS v2.0 vector.

func (CVSS20) BaseScore

func (cvss20 CVSS20) BaseScore() float64

BaseScore returns the CVSS v2.0's base score.

func (CVSS20) EnvironmentalScore

func (cvss20 CVSS20) EnvironmentalScore() float64

EnvironmentalScore returns the CVSS v2.0's environmental score.

func (CVSS20) Exploitability added in v0.4.0

func (cvss20 CVSS20) Exploitability() float64

func (CVSS20) Get

func (cvss20 CVSS20) Get(abv string) (r string, err error)

func (CVSS20) Impact added in v0.4.0

func (cvss20 CVSS20) Impact() float64

func (*CVSS20) Set

func (cvss20 *CVSS20) Set(abv string, value string) error

func (CVSS20) TemporalScore

func (cvss20 CVSS20) TemporalScore() float64

TemporalScore returns the CVSS v2.0's temporal score.

func (CVSS20) Vector

func (cvss20 CVSS20) Vector() string

type ErrInvalidMetric

type ErrInvalidMetric struct {
	Abv string
}

ErrInvalidMetric is an error returned when a given metric does not exist.

func (ErrInvalidMetric) Error

func (err ErrInvalidMetric) Error() string

Jump to

Keyboard shortcuts

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