Skip to main content

Taint

Struct Taint 

Source
pub struct Taint {
Show 17 fields pub id: String, pub path: String, pub name: String, pub kind: TaintKind, pub effect: TaintEffect, pub severity: TaintSeverity, pub reason: String, pub agent_id: String, pub commit_id: String, pub created_at: DateTime<Utc>, pub expires_at: Option<DateTime<Utc>>, pub resolved_at: Option<DateTime<Utc>>, pub resolved_by: Option<String>, pub resolved_reason: Option<String>, pub resolved_proof: Option<String>, pub propagate: bool, pub metadata: TaintMetadata,
}
Expand description

A taint record. Persisted to the taints table in storage and round-tripped across the MCP / FFI / binding surfaces.

Fields§

§id: String

UUID string generated at creation.

§path: String

Path the taint applies to (e.g. /cluster/nodes/picoup2).

§name: String

Human-readable taint name (e.g. disk-pressure, crash-loop, security-review).

§kind: TaintKind

Discriminator between taint / quarantine / watch.

§effect: TaintEffect

How the pre-commit hook should behave when this taint matches an incoming write.

§severity: TaintSeverity

Advisory severity (does not change pre-commit semantics).

§reason: String

Why the taint was applied. Free-form.

§agent_id: String

Agent that applied the taint.

§commit_id: String

Commit id of the Taint / Quarantine / Watch intent commit that created this record. Empty until the commit is written (the repository patches it post-commit).

§created_at: DateTime<Utc>

When the taint was created.

§expires_at: Option<DateTime<Utc>>

Optional auto-expiry.

§resolved_at: Option<DateTime<Utc>>

Set when resolved via untaint / unquarantine / unwatch.

§resolved_by: Option<String>

Agent that resolved the taint.

§resolved_reason: Option<String>

Reason given at resolution.

§resolved_proof: Option<String>

Optional evidence (e.g. a remediation commit id) proving the issue is resolved.

§propagate: bool

When true, the taint applies to all descendant paths of path.

§metadata: TaintMetadata

Kind-specific metadata: authorized_agents for quarantines, metric / threshold / direction for watches, etc.

Implementations§

Source§

impl Taint

Source

pub fn is_active(&self, now: DateTime<Utc>) -> bool

true when the taint is currently active against now: not resolved and not yet expired.

Source

pub fn authorized_agents(&self) -> Vec<String>

Authorized-agents allowlist parsed from metadata. Applies to Quarantine kind; empty for others.

Trait Implementations§

Source§

impl Clone for Taint

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Taint

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Taint

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Taint

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Taint

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Taint

Auto Trait Implementations§

§

impl Freeze for Taint

§

impl RefUnwindSafe for Taint

§

impl Send for Taint

§

impl Sync for Taint

§

impl Unpin for Taint

§

impl UnsafeUnpin for Taint

§

impl UnwindSafe for Taint

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.