Documentation ¶
Index ¶
- Constants
- func ValidateID(cveID string) error
- type CVE
- type Client
- func (c *Client) CheckID(cve string) error
- func (c *Client) CopyToTemp(cve string) (file *os.File, err error)
- func (c *Client) CreateEmptyMap(cve string) (file *os.File, err error)
- func (c *Client) Delete(cve string) error
- func (c *Client) EntryExists(cveID string) (bool, error)
- func (c *Client) Write(cve, mapPath string) error
- type ClientImplementation
- type ClientOptions
Constants ¶
View Source
const ( Bucket = release.TestBucket Directory = "/release/cve/" // Regexp to check CVE IDs CVEIDRegExp = `^CVE-\d{4}-\d+$` )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CVE ¶
type CVE struct { ID string `json:"id" yaml:"id"` // CVE ID, eg CVE-2019-1010260 Title string `json:"title" yaml:"title"` // Title of the vulnerability Description string `json:"description" yaml:"description"` // Description text of the vulnerability TrackingIssue string `json:"issue" yaml:"issue"` // Link to the vulnerability tracking issue (url, optional) CVSSVector string `json:"vector" yaml:"vector"` // Full CVSS vector string, CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:H/A:H CVSSScore float32 `json:"score" yaml:"score"` // Numeric CVSS score (eg 6.2) CVSSRating string `json:"rating" yaml:"rating"` // Severity bucket (eg Medium) CalcLink string `json:"calclink,omitempty" yaml:"calclink,omitempty"` // Link to the CVE calculator (automatic) LinkedPRs []int `json:"pullrequests"` // List of linked PRs (to remove them from the release notes doc) }
CVE Information of a linked CVE vulnerability
func (*CVE) ReadRawInterface ¶
ReadRawInterface populates the CVE data struct from the raw array as returned by the YAML parser
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CopyToTemp ¶
CopyToTemp copies a CVE entry into a temporary local file
func (*Client) CreateEmptyMap ¶
CreateEmptyMap creates a new, empty CVE data map
func (*Client) EntryExists ¶
List return a list iof existing CVE entries
type ClientImplementation ¶
type ClientImplementation interface { CheckBucketPath(string, *ClientOptions) error CheckBucketWriteAccess(*ClientOptions) error DeleteFile(string, *ClientOptions) error CopyFile(string, string, *ClientOptions) error CheckID(string) error CopyToTemp(string, *ClientOptions) (*os.File, error) ValidateCVEMap(string, string, *ClientOptions) error CreateEmptyFile(string, *ClientOptions) (*os.File, error) EntryExists(string, *ClientOptions) (bool, error) }
type ClientOptions ¶
Click to show internal directories.
Click to hide internal directories.