Class CveDatabase

Namespace
Kuestenlogik.Bowire.Security.Scanner
Assembly
Kuestenlogik.Bowire.Security.Scanner.dll

A loadable set of CveEntry records + version-range matching for the CVE-lookup probe (#187). Load a curated Bowire.VulnDb file with Load(string) / Parse(string), or use Seed() — a tiny built-in set of well-known server CVEs so the probe does something useful out of the box.

public sealed class CveDatabase
Inheritance
CveDatabase
Inherited Members

Constructors

CveDatabase(IReadOnlyList<CveEntry>)

public CveDatabase(IReadOnlyList<CveEntry> entries)

Parameters

entries IReadOnlyList<CveEntry>

Properties

Count

public int Count { get; }

Property Value

int

Methods

CompareVersions(string, string)

Dotted-numeric version compare (1.18.0 vs 1.20.1). Missing components count as 0; non-numeric components compare as 0 so a build suffix never makes a version look higher than a clean release.

public static int CompareVersions(string a, string b)

Parameters

a string
b string

Returns

int

Load(string)

Load a VulnDb file from disk.

public static CveDatabase Load(string path)

Parameters

path string

Returns

CveDatabase

Match(string, string)

CVEs whose product matches product and whose range contains version ([introduced, fixed)).

public IReadOnlyList<CveEntry> Match(string product, string version)

Parameters

product string
version string

Returns

IReadOnlyList<CveEntry>

Parse(string)

Parse a VulnDb document — either a bare [ … ] array or { "entries": [ … ] }.

public static CveDatabase Parse(string json)

Parameters

json string

Returns

CveDatabase

Seed()

A tiny built-in set of well-known server CVEs — enough for the probe to be useful without a curated file. A full corpus lives in the community Bowire.VulnDb repo; load it with --cve-db.

public static CveDatabase Seed()

Returns

CveDatabase