redacting secrets
See original GitHub issueI am interested in integrating a library that optionally redacts-secrets from log messages. Perhaps something like - https://www.npmjs.com/package/redact-secrets.
Wondering if there is an appetite for a PR of this nature?
One way to accomplish this today is to do something like this. However, this is harder to do when the output format is not an object.
const redact = require('redact-secrets')('[REDACTED]');
const winston = require('winston');
winston.configure({
transports: [
new (winston.transports.File)({
filename: 'somefile.log',
json: false,
prettyPrint: (json) => JSON.stringify(redact.map(json), null, 2)
})
]
});
This proposal would apply this internally before the log message is serialized, make it’s application more reliable. Thoughts?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:5 (1 by maintainers)
Top Results From Across the Web
redact-secrets - npm
Deeply iterate over an object and redact secret values by replacing them with a predefined string. Latest version: 1.0.0, last published: 6 ...
Read more >watson/redact-secrets: Deeply iterate over an object ... - GitHub
Deeply iterate over an object and redact secret values by replacing them with a predefined string - GitHub - watson/redact-secrets: Deeply ...
Read more >Secret redaction | Databricks on AWS
Learn how redaction protects Databricks secrets from accidental display and how to ensure proper control of secrets.
Read more >1.15.4.8 Redacting credentials - Concourse CI
4.8 Redacting credentials. Concourse can be configured to automatically redact credentials from build output like so: CONCOURSE_ENABLE_REDACT_SECRETS=true. This ...
Read more >Stop pixelating! New tool reveals the secrets of "redacted ...
New tool reveals the secrets of "redacted" documents. Imagine you want to publish online an image of a document, but there are parts...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In
winston@3.0.0
you can implement this using a custom format. Please consider upgrading.This doesn’t work for me for some reason, there is no output when adding the redact formatter