pub struct PolicyDecision {
pub ecosystem: String,
pub package: String,
pub version: String,
pub decision: String,
pub reason: String,
pub verdict_id: Option<String>,
pub policy_rule_id: Option<String>,
pub error: Option<String>,
}Expand description
Per-package decision returned from /v1/policy/preview or
embedded in audit entries.
Fields§
§ecosystem: String§package: String§version: String§decision: StringALLOW | DENY | WARN | INSUFFICIENT_DATA | RISK_ACCEPTANCE_REQUIRED
reason: StringCLEANLIB-666: the /v1/policy/preview wire names this reasoning
(verbs::PolicyPreviewResult.reasoning); scan/audit surfaces use reason.
Alias reads both so the same struct parses every producer.
verdict_id: Option<String>§policy_rule_id: Option<String>CLEANLIB-666: /v1/policy/preview names the matched rule matched_rule_id
on the wire; other surfaces use policy_rule_id. Alias reads both.
error: Option<String>CLEANLIB-616: set when this coordinate could NOT be evaluated — a per-package
scan error, or a chunk that failed/returned no result (mirrors
ScanResult.error). Lets --output json distinguish a NEVER-EVALUATED
coordinate from one that was evaluated and warned: both surface as a WARN
decision, but only the unevaluated one carries error. None (and
omitted from JSON) on an evaluated coordinate.
Trait Implementations§
Source§impl Clone for PolicyDecision
impl Clone for PolicyDecision
Source§fn clone(&self) -> PolicyDecision
fn clone(&self) -> PolicyDecision
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more