Stop excluding the trufflehog lob detector - #6920
Merged
Merged
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
This PR re-enables the
lobdetector in the secret scanning workflow, now that the false positive it was excluded for has been fixed upstream.Reverts the exclusion added in #6674.
Follow-up to the trufflesecurity/trufflehog v3.97.0 release and pin by:
Motivation
#6674 disabled the detector because eight ordinary pytest names on
mainwere reported as verified secrets. Two upstream bugs combined to cause it, and trufflesecurity/trufflehog#5188, released in v3.97.0 and pulled in by #6902, fixes both.The pattern no longer matches identifiers:
Requiring 35 lowercase hex characters rules out every name of the form
test_<words>, since those contain letters outside[a-f]and underscores. Checking the two patterns against the eight names listed in #6674 confirms it: all eight match the old one, none match the new one.The
403handling no longer treats a Cloudflare block as proof of a live key either. It now decodes the response body and only reports a key as verified for thebilling_address_requiredandfeature_limit_reachederror codes, so the HTML403that Cloudflare returns to TruffleHog's hardcoded user agent, which was what made these findings verified, now fails to decode and is not a verification.Solution
Scanning the full history of
mainwith the currently pinned scanner and no exclusions at all reports nothing:That is 3426 commits, the same scope as our weekly full-history sweep. The harness was sanity-checked against a synthetic key of the shape the new pattern accepts, which the detector does report, so the clean result reflects the detector running and finding nothing rather than the detector being inactive.
Changes
lobfrom--exclude-detectorsNote
#6921 removes
postgresfrom the same list. The two touch the same line, so whichever merges second needs a rebase, and at that point--exclude-detectorsbecomes empty and should be dropped along with the comment introducing it.Note
Low Risk
CI-only change that widens secret scanning with an upstream fix validated on full repo history; no application or auth logic is touched.
Overview
Re-enables TruffleHog’s
lobdetector in the secret-leaks workflow by dropping it from--exclude-detectors, so scans again cover Lob API keys alongside the existingpostgresexclusion.The workflow comment that explained excluding
lobbecause pytest names looked like keys is removed, since upstream TruffleHog v3.97.0 (already pinned in this file) tightened the key pattern and fixed verification behavior that caused those false positives.Reviewed by Cursor Bugbot for commit a278820. Bugbot is set up for automated code reviews on this repo. Configure here.