pub struct GuardPolicyIdentity {
pub build_identity: String,
pub detector_digest: String,
pub suppression_digest: String,
pub keyhogignore_digest: String,
pub config_digest: String,
pub decode_policy_version: u32,
pub source_policy_digest: String,
pub guard_schema_version: u32,
pub report_semantics_version: u32,
}Expand description
Every input capable of changing findings or coverage, bound into one
canonical identity. A mismatch makes existing attestations ineligible
immediately and transitions the root to GuardRootState::StalePolicy.
Adding a new behavior-affecting setting MUST add a field here or explicitly classify it as presentation-only. The identity coverage test fails until the field is added.
Fields§
§build_identity: StringGit commit SHA the binary was built from, or "unknown".
detector_digest: StringEffective detector corpus digest (BLAKE3, hex).
suppression_digest: StringSuppression file digest (BLAKE3, hex), or empty if no suppressions.
keyhogignore_digest: String.keyhogignore.toml rule-filter digest (BLAKE3, hex), or empty.
config_digest: StringResolved CLI/TOML/default scan configuration digest (BLAKE3, hex).
decode_policy_version: u32Decode/preprocessing policy version.
source_policy_digest: StringMaximum file size and source exclusion policy digest (BLAKE3, hex).
guard_schema_version: u32Guard state schema version (GUARD_SCHEMA_VERSION).
report_semantics_version: u32Report semantics version where it affects reusable clean status.
Implementations§
Source§impl GuardPolicyIdentity
impl GuardPolicyIdentity
Sourcepub fn short_digest(&self) -> Result<String, Error>
pub fn short_digest(&self) -> Result<String, Error>
Short hex digest of the full identity for status display (first 12 hex chars of a BLAKE3 hash over the canonical serialization).
Sourcepub fn is_compatible_with(&self, other: &GuardPolicyIdentity) -> bool
pub fn is_compatible_with(&self, other: &GuardPolicyIdentity) -> bool
Whether two identities are compatible for attestation reuse.
Trait Implementations§
Source§impl Clone for GuardPolicyIdentity
impl Clone for GuardPolicyIdentity
Source§fn clone(&self) -> GuardPolicyIdentity
fn clone(&self) -> GuardPolicyIdentity
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for GuardPolicyIdentity
impl Debug for GuardPolicyIdentity
Source§impl<'de> Deserialize<'de> for GuardPolicyIdentity
impl<'de> Deserialize<'de> for GuardPolicyIdentity
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>,
impl Eq for GuardPolicyIdentity
Source§impl Hash for GuardPolicyIdentity
impl Hash for GuardPolicyIdentity
Source§impl PartialEq for GuardPolicyIdentity
impl PartialEq for GuardPolicyIdentity
Source§impl Serialize for GuardPolicyIdentity
impl Serialize for GuardPolicyIdentity
impl StructuralPartialEq for GuardPolicyIdentity
Auto Trait Implementations§
impl Freeze for GuardPolicyIdentity
impl RefUnwindSafe for GuardPolicyIdentity
impl Send for GuardPolicyIdentity
impl Sync for GuardPolicyIdentity
impl Unpin for GuardPolicyIdentity
impl UnsafeUnpin for GuardPolicyIdentity
impl UnwindSafe for GuardPolicyIdentity
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more