Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Redact detected secrets from files (Rewriting them) #3545

Open
Azathothas opened this issue Nov 1, 2024 · 0 comments
Open

[FR] Redact detected secrets from files (Rewriting them) #3545

Azathothas opened this issue Nov 1, 2024 · 0 comments

Comments

@Azathothas
Copy link

Hi,
I couldn't find an option to auto redact detected secrets from logfiles.
Example: My build script generates a log: "${TEMP_LOG}", I had like to use trufflehog to redact all detected secrets with ***** or another string.

Currently, I have to do something like:

trufflehog filesystem "${TEMP_LOG}" --no-fail --no-update --json 2>/dev/null | jq -r '.Raw' | sed '/{/d' | xargs -I "{}" sh -c 'echo "{}" | tr -d " \t\r\f\v"' | xargs -I "{}" sed "s/{}/ /g" -i "${TEMP_LOG}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant