#1034·pino

Feature Request: Make paths parameter optional for redaction

Author: seprichCreated May 31, 2021Updated Jul 23, 2026

Currently the paths parameter under the redact object is mandatory. This creates a problem in many applications where the developers cannot guarantee where in the object tree a sensitive information may appear. For example if application code catches and logs an error there can be many places from where errors are thrown and sensitive information may appear under unpredictable object paths which we cannot know before deploying to production.

On the other hand if we use a function for the censor parameter, it could analyze the value e.g. by matching with regexp and could return either the uncensored original value or some '[redacted]' string if only this function could be applied to all leaf nodes of the object tree without having to use that paths parameter guestimate.

Current redact system allows sensitive data to slip into logs too easily and for applications where security considerations are paramount this may be a "deal breaker" for using this lib.