Install TruffleHog in the pre-commit hook environment - #14
Open
kkraus14 wants to merge 16 commits into
Open
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Author
|
/ok to test ffdb38b |
kkraus14
marked this pull request as ready for review
July 30, 2026 15:19
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
hooks/trufflehog.shlauncher and its per-user cache with alanguage: pythonsecret-scan-trufflehoghook that invokestrufflehog filesystem --results=verified --fail --no-updatedirectly. The public hook ID and default scan options remain unchanged.hooks/trufflehog, which uses supportedsetup.cfgconfiguration andsetuptools-download==1.1.0to select, SHA-256-verify, and install the matching official TruffleHogv3.95.9archive for Linux, macOS, and Windows on x86_64 and ARM64.setup.pyonly marks the locally built wheel as platform-specific.setuptools>=70.1without an upper ceiling. A fresh warning-fatal hook installation resolves the releasedsetuptools-downloadwheel cleanly, so no warning suppression is needed.pre-commit try-repo . --all-files. This is the repository's manifest-driven dogfood path: it discovers and runs the published default-stage hooks from the current checkout on all six supported OS/architecture pairs.Why
This moves binary lifecycle management into pre-commit's isolated environment and removes the developer-side Bash/Git Bash/MSYS, curl/wget, tar, SHA utility, system TruffleHog, and external cache requirements. The downloaded executable is owned by the hook environment and is removed by
pre-commit clean.Review focus
try-reposmoke covers the current manifest and treats Python warnings as errors.Validation
pre-commit validate-config .pre-commit-config.yamlpre-commit validate-manifest .pre-commit-hooks.yamlPIP_NO_CACHE_DIR=1 PYTHONWARNINGS=error PRE_COMMIT_HOME=<temporary directory> pre-commit try-repo . --all-filesPIP_NO_CACHE_DIR=1 PRE_COMMIT_HOME=<temporary directory> pre-commit run --all-files --show-diff-on-failuregit diff --check