Class VulnDbCache

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

The on-disk template cache the bowire vulndb commands manage and bowire scan reads by default: ~/.bowire/vulndb, mirroring the layout of the Kuestenlogik/Bowire.VulnDb repo / release tarball — a templates/<protocol>/<name>.json tree plus the templates-index.json metadata sidecar. bowire vulndb update populates it; bowire vulndb list reads it; a template-source-less bowire scan falls back to it so operators run one update and then scan without repeating --templates.

public static class VulnDbCache
Inheritance
VulnDbCache
Inherited Members

Methods

CountTemplates(string)

Number of *.json templates under the cache's tree (0 when absent).

public static int CountTemplates(string root)

Parameters

root string

Returns

int

DefaultRoot()

The cache root — ~/.bowire/vulndb, or a temp fallback when the user-profile folder can't be resolved (headless / sandboxed CI). Mirrors the ~/.bowire/monitoring resolution used elsewhere.

public static string DefaultRoot()

Returns

string

EnumerateTemplates(string)

Enumerate the cached templates' summary rows. Prefers the index; when it's missing, walks templates/ and reads each file's identifying fields directly. Ordered by protocol then id so the list output is stable.

public static IReadOnlyList<VulnDbIndexEntry> EnumerateTemplates(string root)

Parameters

root string

Returns

IReadOnlyList<VulnDbIndexEntry>

HasTemplates(string)

True when the cache root holds a usable template tree — the templates/ directory exists and contains at least one *.json file. The scan default-resolution gate.

public static bool HasTemplates(string root)

Parameters

root string

Returns

bool

IndexPath(string)

The templates-index.json sidecar path under a cache root.

public static string IndexPath(string root)

Parameters

root string

Returns

string

ReadIndex(string)

Read the cache's templates-index.json, or null when it's absent / unparseable — the list command falls back to walking the tree so a cache populated from a bare git clone (no generated index) still lists.

public static VulnDbIndex? ReadIndex(string root)

Parameters

root string

Returns

VulnDbIndex

TemplatesDir(string)

The templates/ tree under a cache root.

public static string TemplatesDir(string root)

Parameters

root string

Returns

string