cvss-0.1: Common Vulnerability Scoring System.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Security.CVSS

Description

This module provides a CVSS parser and utility functions adapted from https://www.first.org/cvss/v3.1/specification-document

Synopsis

Type

data CVSS Source #

Parsed CVSS string obtained with parseCVSS.

Instances

Instances details
Show CVSS Source # 
Instance details

Defined in Security.CVSS

Methods

showsPrec :: Int -> CVSS -> ShowS #

show :: CVSS -> String #

showList :: [CVSS] -> ShowS #

data CVSSVersion Source #

The CVSS version.

Instances

Instances details
Eq CVSSVersion Source # 
Instance details

Defined in Security.CVSS

data Rating Source #

CVSS Rating obtained with cvssScore

Constructors

None 
Low 
Medium 
High 
Critical 

Instances

Instances details
Enum Rating Source # 
Instance details

Defined in Security.CVSS

Show Rating Source # 
Instance details

Defined in Security.CVSS

Eq Rating Source # 
Instance details

Defined in Security.CVSS

Methods

(==) :: Rating -> Rating -> Bool #

(/=) :: Rating -> Rating -> Bool #

Ord Rating Source # 
Instance details

Defined in Security.CVSS

Parser

parseCVSS :: Text -> Either CVSSError CVSS Source #

Parse a CVSS string.

Helpers

cvssVectorString :: CVSS -> Text Source #

Format the CVSS back to its original string.

cvssVectorStringOrdered :: CVSS -> Text Source #

Format the CVSS to the prefered ordered vector string.

cvssScore :: CVSS -> (Rating, Float) Source #

Compute the base score.

cvssInfo :: CVSS -> [Text] Source #

Explain the CVSS metrics.