cpeutils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 5 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 NormalizeCPEString added in v0.9.2

func NormalizeCPEString(s string) string

NormalizeCPEString normalizes a CPE string for deduplication purposes.

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