Skip to content

Instantly share code, notes, and snippets.

@divolgin
Last active February 19, 2019 20:59
Show Gist options
  • Save divolgin/19f68143fdc94db14b3c2cb4b2b498d4 to your computer and use it in GitHub Desktop.
Save divolgin/19f68143fdc94db14b3c2cb4b2b498d4 to your computer and use it in GitHub Desktop.
specs:
- meta.redact:
scrubs:
# This will scrub env variables from container stdout files
- regex: '(?i)((?:username|password_?=))(\").*(\")([\s\n\r\t]*)'
replace: '${1}${2}***SCRUBBED***${3}${4}'
# This will scrub env variables from container/service JSON files
- regex: '(?i)((?:password_?=))(\\\").*(\\\"\")(,?)([\s\n\r\t]*)'
replace: '${1}${2}***SCRUBBED***${3}${4}${5}'
# This will scrub command lines from ps output (specifically the java command)
- regex: '(?i)((?:username=|password=))\S*( -)'
replace: '${1}***SCRUBBED***${2}'
output_dir: redacted_1/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment