AuditSecretFilter
AgentPrism.Core.dllRedacts potential secrets from before and after payloads before
they are written to the audit trail.
public static class AuditSecretFilterInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The filter operates on property names. A case-insensitive property
containing apiKey, authorization, token, password,
or secret has its value replaced with "***", regardless of type.
The types audited today, such as McpServerDefinition, do not contain
secrets, but the filter still applies because a future type might.
Does not use reflection; it operates manually with Utf8JsonWriter and JsonDocument.
Methods
Section titled “Methods”Redact(string?)
Section titled “ Redact(string?)”Redacts secret fields in the supplied JSON text.
public static string? Redact(string? json)Parameters
Section titled “Parameters”json string?
The raw JSON text. Returns it unchanged when null.
Returns
Section titled “Returns”The redacted JSON text.