MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / untrusted_reason

Method untrusted_reason

atomic-repository/src/git_binding/trust.rs:120–132  ·  view source on GitHub ↗

Explain why provenance is untrusted, when it is.

(&self)

Source from the content-addressed store, hash-verified

118impl BindingTrustEvaluation {
119 /// Explain why provenance is untrusted, when it is.
120 pub fn untrusted_reason(&self) -> Option<UntrustedReason> {
121 if self.provenance_trusted() {
122 return None;
123 }
124 if !self.signature_valid {
125 return Some(UntrustedReason::SignatureInvalid);
126 }
127 match self.signer_trust {
128 SignerTrust::Revoked => Some(UntrustedReason::SignerRevoked),
129 SignerTrust::Unknown => Some(UntrustedReason::SignerUnknown),
130 SignerTrust::Trusted => Some(UntrustedReason::ContentUnverified),
131 }
132 }
133}
134
135#[cfg(test)]

Callers

nothing calls this directly

Calls 1

provenance_trustedMethod · 0.80

Tested by

no test coverage detected