107 const std::string&
worker_path() const noexcept {
return worker_path_; }
110 std::string worker_path_;
ScanResult scan(const std::string &bundle_path, int timeout_ms=5000) const
Scan a single bundle in a child process.
const std::string & worker_path() const noexcept
Accessor for the resolved worker path (mostly for diagnostics).
Definition isolated_scanner.hpp:107
IsolatedPluginScanner(std::string worker_path)
Construct with the path to the pulp-scan-worker binary that will be exec'd for each scan.
Definition isolated_scanner.hpp:99
Bounded event contracts shared by host ingress and graph-authored nodes.
Definition anticipation_eligibility.hpp:9
std::string find_scan_worker(std::string_view explicit_path={})
Locate the pulp-scan-worker binary for isolated scanning.
ScanStatus
Outcome of an isolated scan attempt.
Definition isolated_scanner.hpp:51
@ Crash
Worker terminated abnormally (signal / non-zero code with no JSON).
Definition isolated_scanner.hpp:53
@ FormatError
Worker rejected the bundle (exit code 3 — extension not recognized).
Definition isolated_scanner.hpp:58
@ WorkerMissing
The configured worker_path doesn't exist or can't be exec'd.
Definition isolated_scanner.hpp:62
@ Timeout
Worker exceeded the per-scan timeout.
Definition isolated_scanner.hpp:56
@ ProtocolError
The worker exited 0 but its stdout could not be trusted: it exceeded the capture limit or a line did ...
Definition isolated_scanner.hpp:65
@ NotPlugin
Worker ran cleanly but emitted no descriptor (the file at path was not a plugin we can scan).
Definition isolated_scanner.hpp:60
@ Ok
Definition baked_graph_processor.hpp:156
Definition isolated_scanner.hpp:73
ScanStatus status
Definition isolated_scanner.hpp:74
std::string error_message
Human-readable error explanation (stderr tail, "timeout", or "worker not found").
Definition isolated_scanner.hpp:89
std::optional< PluginInfo > descriptor
The first descriptor, populated only when status == Ok.
Definition isolated_scanner.hpp:77
std::vector< PluginInfo > descriptors
Every descriptor the worker emitted, in bundle order, populated only when status == Ok.
Definition isolated_scanner.hpp:82
int exit_code
Worker exit status (raw OS exit code, or -1 if it never started / was signal-killed).
Definition isolated_scanner.hpp:85