Skip to content

Commit deb3f24

Browse files
committed
Update custom_detectors.yaml with additional exclude patterns
Add exclude regexes for bare snake_case identifiers and letters-only dotted member chains (e.g. cachedResponse.usage), reducing false positives in the Generic Secret or Token detector.
1 parent 350f344 commit deb3f24

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎.github/custom_detectors.yaml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,4 +258,11 @@ detectors:
258258
# 3. Bare lowercase dotted identifier chain (a.b.c). Lowercase-only ON PURPOSE:
259259
# a case-insensitive version would also match mixed-case JWTs and silence a
260260
# real leak. Does NOT catch camelCase JS member chains - exclude those by path.
261-
- '^[a-z_][a-z0-9_]*(?:\.[a-z_][a-z0-9_]*)+$'
261+
- '^[a-z_][a-z0-9_]*(?:\.[a-z_][a-z0-9_]*)+$'
262+
# 4. Bare snake_case identifier (letters+underscores, no digits) - a symbol name,
263+
# e.g. a function being called: next_token = extract_next_token_from_meta(...)
264+
- '^[a-z]+(?:_[a-z]+)+$'
265+
# 5. Letters-only dotted member chain - catches camelCase JS/TS member access
266+
# (cachedResponse.usage) that rule 3 deliberately misses. Letters-only is what
267+
# keeps it safe: JWT segments and real secrets carry digits.
268+
- '^[A-Za-z]+(?:\.[A-Za-z]+)+$'

0 commit comments

Comments
 (0)