View Source SensitiveData.Redaction (Sensitive Data v0.1.0)
Utilities for redacting information from exceptions and stack traces.
Summary
Types
A function responsible for redacting exceptions.
A function responsible for redacting a stacktrace.
Types
@type exception_redactor() :: redactor(Exception.t())
A function responsible for redacting exceptions.
The function must return a redacted version of the provided exception.
If this function fails, redaction will fall back to
SensitiveData.Redactors.Exception.drop/1
.
Beware
If you use a custom exception redaction strategy, you must ensure it won't leak sensitive information for any possible exception provided as the argument.
Bear in mind you must handle not only standard Elixir exceptions and those from your code base, but also any exception that may be raised by any dependency.
@type redactor(type) :: (original :: type -> redacted :: type)
@type stacktrace_redactor() :: redactor(Exception.stacktrace())
A function responsible for redacting a stacktrace.
The function must return a redacted version of the provided stack trace.
If this function fails, redaction will fall back to
SensitiveData.Redactors.Stacktrace.strip/1
.
Beware
If you use a custom stack trace redaction strategy, you must ensure it won't leak sensitive data under any circumstances.