Documentation
¶
Overview ¶
Package tools describes the external command-line scanners Draugr orchestrates and detects whether they are installed. It backs `draugr doctor` — an explicit preflight so a missing tool is reported up front with an install hint, instead of surfacing as a buried "executable file not found" error mid-scan.
Detection only ever reads the environment (looks on PATH, runs a version probe). It never downloads or installs anything — provisioning is a separate, opt-in step.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LookPathFunc ¶
LookPathFunc resolves a binary name to a path (defaults to exec.LookPath).
type Status ¶
type Status struct {
Tool Tool
Found bool
Path string
Version string
// Err is set when the tool was found but the version probe failed (non-fatal).
Err error
}
Status is the outcome of detecting a Tool.
type Tool ¶
type Tool struct {
// Binary is the executable name looked up on PATH, e.g. "trivy".
Binary string
// VersionArgs prints the tool's version, e.g. ["--version"]. Empty skips the probe.
VersionArgs []string
// InstallHint tells the user how or where to install the tool when it's missing.
InstallHint string
}
Tool describes an external executable a scanner shells out to.