trufflehog pre-commit hook scans web/node_modules #14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally filed by @coilysiren on 2026-05-21T08:57:29Z - https://github.com/coilysiren/repo-recall/issues/232
Symptom
The
trufflehogpre-commit hook scansweb/node_modules/and fails on benign example URIs and README tokens shipped inside@types/nodeandjson5. It surfaced while committing #228 right aftermake web-installpopulatedweb/node_modules/- 11 unverified results, 94 MB / 9349 chunks scanned, all from third-party node deps.Why it matters
node_modulesis gitignored, so nothing from it can ever be committed. Scanning it is pure noise: it slows the hook and the false positives train operators to ignore trufflehog output. Workaround today isrm -rf web/node_modulesbefore every commit, which is silly.Fix
Scope the trufflehog hook to tracked / staged files, or add an exclude for
node_modules/(and likelydist/,target/). Check.pre-commit-config.yamlfor the hook'sargs/excludepattern.