View Source SensitiveData.Redactors.Stacktrace (Sensitive Data v0.1.0)
Functions for redacting stack traces.
Tip
You typically won't need to concern yourself with functions in this module, as
SensitiveData.exec/2
,SensitiveData.Wrapper.from/2
, and friends, will use safe redaction implementations by default.
Summary
Functions
Redacts the argument list in the stack trace.
Functions
Redacts the argument list in the stack trace.
Example
iex(1)> stacktrace =
...(1)> try do
...(1)> Map.get("SOME SECRET", :some_key)
...(1)> rescue
...(1)> _ -> __STACKTRACE__
...(1)> end
iex(2)> true = match?([{Map, :get, ["SOME SECRET", :some_key, nil], _} | _], stacktrace)
iex(3)> [_first_list | rest] = stacktrace
iex(4)> redacted_stacktrace = SensitiveData.Redactors.Stacktrace.strip(stacktrace)
iex(5)> true = match?([{Map, :get, 3, _} | ^rest], redacted_stacktrace)