Skip to content

Update PreCommit.md with audit mode details #4280

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joeleonjr
Copy link
Contributor

Description:

Some users new to adding the TH pre-commit hook want to test the hook without enforcement (meaning the commit won't be blocked by the presence of a secret). This PreCommit.md update instructs users to: (1) remove the --fail flag, (2) pipe stderr to /dev/null so that the non-secret details aren't outputted to console. This effectively means the pre-commit hook will always pass, but any verified or unknown secrets will be outputted to console.

I verified this works with global built-in git hooks, the pre-commit framework and husky.

The alternative would be to add an --audit flag to the CLI. While a simple change, I think providing instructions on how to use the existing flags is sufficient given the user base for this feature isn't particularly huge.

@joeleonjr joeleonjr requested a review from a team as a code owner June 30, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants