pub struct TierClassification {
pub tier: DangerTier,
pub reason: String,
pub payload_url: Option<String>,
}Expand description
Classification result. tier is the load-bearing field; reason and
payload_url exist so the renderer can show the operator why a
command escalated, and so the inline content reviewer can fetch the
payload it needs the user to read before exec.
Fields§
§tier: DangerTier§reason: StringShort structured rationale: "curl piped to bash",
"sudo escalates the entire program", "git push to feature branch".
Stable enough that the renderer can pattern-match; English enough that
it can show verbatim under the approval prompt.
payload_url: Option<String>URL the inline reviewer should fetch and display before the friction
gesture is enabled. Set when the ArbitraryExec escalation comes from
a curl|wget … | <interp> pipeline (or process-/command-substitution
variant) and the URL is a literal argument to the fetcher.
Trait Implementations§
Source§impl Clone for TierClassification
impl Clone for TierClassification
Source§fn clone(&self) -> TierClassification
fn clone(&self) -> TierClassification
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TierClassification
impl Debug for TierClassification
Source§impl<'de> Deserialize<'de> for TierClassification
impl<'de> Deserialize<'de> for TierClassification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TierClassification
Source§impl PartialEq for TierClassification
impl PartialEq for TierClassification
Source§impl Serialize for TierClassification
impl Serialize for TierClassification
impl StructuralPartialEq for TierClassification
Auto Trait Implementations§
impl Freeze for TierClassification
impl RefUnwindSafe for TierClassification
impl Send for TierClassification
impl Sync for TierClassification
impl Unpin for TierClassification
impl UnsafeUnpin for TierClassification
impl UnwindSafe for TierClassification
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more