Closed mutantcornholio closed 1 year ago
Currently, there's nothing stopping us from leaking secrets to logs from the application itself.
How about something like this?
import { Logger } from "@eng-automation/js"; const logger = new Logger({...}); logger.registerSecretsToMask( process.env.GITHUB_TOKEN, process.env.GITLAB_TOKEN, process.env.MATRIX_TOKEN, ); logger.info("GITHUB_TOKEN:", process.env.GITHUB_TOKEN); // logs "GITHUB_TOKEN: [MASKED]"
Currently, there's nothing stopping us from leaking secrets to logs from the application itself.
How about something like this?