Skip to content

Commit 853e1e8

Browse files
authored
Support exclude regexes, excludewords, and entropy filters for custom detectors (#3860)
* Simple implementation of exclude regexes, stopwords, and entropy checks for customdetectors * better name * readme blurb and example * link
1 parent 9ecaf07 commit 853e1e8

File tree

6 files changed

+1639
-25
lines changed

6 files changed

+1639
-25
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,10 @@ TruffleHog will send a JSON POST request containing the regex matches to a
656656
configured webhook endpoint. If the endpoint responds with a `200 OK` response
657657
status code, the secret is considered verified.
658658

659+
Custom Detectors support a few different filtering mechanisms: entropy, regex targeting the entire match, regex targeting the captured secret,
660+
and excluded word lists checked against the secret (captured group if present, entire match if capture group is not present). Note that if
661+
your custom detector has multiple `regex` set (in this example `hogID`, and `hogToken`), then the filters get applied to each regex. [Here](examples/generic_with_filters.yml) is an example of a custom detector using these filters.
662+
659663
**NB:** This feature is alpha and subject to change.
660664

661665
## Regex Detector Example
@@ -749,6 +753,8 @@ with HTTPServer(('', 8000), Verifier) as server:
749753
pass
750754
```
751755

756+
757+
752758
## :mag: Analyze
753759

754760
TruffleHog supports running a deeper analysis of a credential to view its permissions and the resources it has access to.

0 commit comments

Comments
 (0)