pub struct Redaction {
pub credential_findings: Vec<CredentialFinding>,
pub redacted_payload: Option<String>,
}Expand description
Optional credential-redaction artefacts produced by a credential-scanner pass.
Populated when an enforcement layer ran the CredentialScanner
and produced at least one finding. Both fields default to empty / None,
matching the legacy code path that constructs audit entries without scanner
output. Redaction::default() carries no findings, so consumers can treat it
as “scan was clean / not run” without special-casing.
§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.
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.