nvdcommon

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package nvdcommon provides a common interface for NVD JSON and XML feeds.

Index

Constants

View Source
const TimeLayout = "2006-01-02T15:04Z"

TimeLayout is the layout of NVD CVE timestamps.

Variables

This section is empty.

Functions

This section is empty.

Types

type CVEItem

type CVEItem interface {
	CVEID() string
	Config() []LogicalTest
	ProblemTypes() []string
	CVSS20base() float64
	CVSS30base() float64
}

CVEItem is an interface that provides access to CVE data from vulnerability feed

func MergeCVEItems

func MergeCVEItems(x, y CVEItem) CVEItem

MergeCVEItems combines two CVEItems: resulted CVEItem inherits all mutually exclusive methods (e.g. CVEID()) from CVEItem x; but Configuration() call returns rule equal to x.LogicalTests AND NOT y.LogicalTests

type LogicalTest

type LogicalTest interface {
	LogicalOperator() string // "and", "or", "eq"
	NegateIfNeeded(bool) bool
	InnerTests() []LogicalTest
	MatchPlatform(platform *wfn.Attributes, requireVersion bool) bool
	CPEs() []*wfn.Attributes
}

LogicalTest describes logical test performed during matching

Jump to

Keyboard shortcuts

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