pub struct Taint {
pub secrets: Vec<Secret>,
pub untrusted: Option<String>,
pub private: Option<String>,
pub seen: Option<String>,
pub labels: Vec<Label>,
}Expand description
What earlier calls of one session exposed it to.
Fields§
§secrets: Vec<Secret>Secret material the session read, de-duplicated by source.
untrusted: Option<String>The first untrusted content the session read (fetch docs.rs), if any.
private: Option<String>The first private data the session read other than secret material:
an agent’s or a build tool’s credentials, a decoy key, the whole
environment, a file taint.private_paths names (ADR-113).
seen: Option<String>The first output the session read that someone else may have written:
what untrusted counts, and also a forge’s issue and pull-request text
and a command’s read from a host the policy does not allow
(CompiledPolicy::output_source, ADR-057). Not a metadata tool’s
result. One part of the lethal trifecta (ADR-113).
labels: Vec<Label>Where the data the session holds came from, by source, not by text
(ADR-126): web, mcp:<server>, secret, …, each with the first call
that brought it in. Taint::label_set adds the ones the other facts
imply.
Implementations§
Source§impl Taint
impl Taint
Sourcepub fn label_set(&self) -> Vec<Label>
pub fn label_set(&self) -> Vec<Label>
Every label of the session with its source, the ones its other facts
imply included: a fold from before labels were kept, or untrusted
content the CLI added itself (file provenance), carries secrets or
untrusted reads without a label, and those count as secret,
private, untrusted and external, so no source goes unlabelled.