Serilog.Enrichers.Sensitive
Serilog.Enrichers.Sensitive copied to clipboard
Exceptions are not masked
This is not something that can be easily fixed in an enricher, but would require changes to the sinks being used. Exceptions are immutable but might contain sensitive data anywhere in the message or stack trace. It might be possible to recursively mask exceptions using reflection, but it doesn't sound like a good or safe solution. What I ended up doing was to simply rewrite the sinks I use to have them mask the serialized LogEvents.
As an example, a database constraint might contain a value, e.g. an email address, which, when violated, isn't handled by this enricher.
Any ideas?