Skip to content

Commit

Permalink
Support exclude regexes, excludewords, and entropy filters for custom…
Browse files Browse the repository at this point in the history
… detectors (#3860)

* Simple implementation of exclude regexes, stopwords, and entropy checks for customdetectors

* better name

* readme blurb and example

* link
  • Loading branch information
zricethezav authored Jan 30, 2025
1 parent 9ecaf07 commit 853e1e8
Show file tree
Hide file tree
Showing 6 changed files with 1,639 additions and 25 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,10 @@ TruffleHog will send a JSON POST request containing the regex matches to a
configured webhook endpoint. If the endpoint responds with a `200 OK` response
status code, the secret is considered verified.

Custom Detectors support a few different filtering mechanisms: entropy, regex targeting the entire match, regex targeting the captured secret,
and excluded word lists checked against the secret (captured group if present, entire match if capture group is not present). Note that if
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.

**NB:** This feature is alpha and subject to change.

## Regex Detector Example
Expand Down Expand Up @@ -749,6 +753,8 @@ with HTTPServer(('', 8000), Verifier) as server:
pass
```



## :mag: Analyze

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

0 comments on commit 853e1e8

Please sign in to comment.