pub struct Redaction {
pub credential_findings: Vec<CredentialFinding>,
pub redacted_payload: Option<String>,
}Expand description
Optional credential-redaction artefacts attached to an AuditEntry.
Populated when the gateway’s policy engine ran the credential scanner
(Stage 6 of PolicyEngine::evaluate) and produced at least one finding.
Both fields default to empty / None, matching the legacy code path that
constructs entries without scanner output. Redaction::default() passed
to AuditEntry::new_with_lineage_and_redaction produces a hash
identical to AuditEntry::new_with_lineage with the same base fields,
preserving backward compatibility.
§Security invariant
Neither field stores the raw secret value. credential_findings holds
only the CredentialKind, byte offset,
and the [REDACTED:<kind>] label (CredentialFinding’s end field is
#[serde(skip)]). redacted_payload holds the sanitised payload returned
by ScanResult::redact where every match has been replaced with its
[REDACTED:<kind>] label.
§Feature gating
Gated on std because CredentialFinding
lives in the std-only scanner module. no_std + alloc builds compile
AuditEntry without redaction support.
Fields§
§credential_findings: Vec<CredentialFinding>All credential / PII findings detected by the scanner. Empty when the scanner found nothing.
redacted_payload: Option<String>The redacted version of the action payload (raw secret bytes replaced
with [REDACTED:<kind>] labels). None when no findings were produced.
Trait Implementations§
impl Eq for Redaction
impl StructuralPartialEq for Redaction
Auto Trait Implementations§
impl Freeze for Redaction
impl RefUnwindSafe for Redaction
impl Send for Redaction
impl Sync for Redaction
impl Unpin for Redaction
impl UnsafeUnpin for Redaction
impl UnwindSafe for Redaction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.