cpeutils

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareVersions

func CompareVersions(a string, b string) (int, error)

func CompareVersionsByUint64

func CompareVersionsByUint64(a, b string) (int, error)

func GetUint64FromVersion

func GetUint64FromVersion(version string) (uint64, error)

GetUint64FromVersion attempts to map period separated numeric version string to a uint64. Needs testing.

func IsParseableVersion

func IsParseableVersion(a string) bool

func Process

func Process(cpe *CPE, entries []CPEVulnerabilities) ([]string, error)

func RemoveCVEEntries

func RemoveCVEEntries(b []string, x []string) []string

func RemoveCVEEntry

func RemoveCVEEntry(b []string, xv string) []string

func RemoveDuplicatesUnordered

func RemoveDuplicatesUnordered(elements []string) []string

func Unquote

func Unquote(b string) string

Types

type CPE

type CPE struct {
	Part            string `json:"part"`
	Vendor          string `json:"vendor"`
	Product         string `json:"product"`
	Version         string `json:"version"`
	Update          string `json:"update"`
	Edition         string `json:"edition"`
	Language        string `json:"language"`
	SoftwareEdition string `json:"sw_edition"`
	TargetSoftware  string `json:"target_sw"`
	TargetHardware  string `json:"target_hw"`
	Other           string `json:"other"`
}

type CPEVulnerabilities

type CPEVulnerabilities struct {
	CPE
	CPE23URI string   `json:"cpe23Uri"` // full cpe23uri string
	Cves     []string `json:"cves"`     // associated CVEs
}

Jump to

Keyboard shortcuts

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