forked from mirrors/kingfisher
Why: Hyperscan doesn’t support lookaheads/behinds, so many “must contain X and Y” checks had to be baked into the regex (hurting readability) or were impossible. pattern_requirements applies lightweight, in-memory checks after a match is found, keeping patterns fast and clean.
21 lines
568 B
YAML
21 lines
568 B
YAML
rules:
|
|
- name: Gitalk OAuth Credentials
|
|
id: kingfisher.gitalk.1
|
|
pattern: |
|
|
(?x)
|
|
\b
|
|
new \s+ Gitalk \s* \( \s* \{ \s*
|
|
clientID: \s* '([a-f0-9]{20})', \s*
|
|
clientSecret: \s* '([a-f0-9]{40})',
|
|
pattern_requirements:
|
|
min_digits: 2
|
|
confidence: medium
|
|
min_entropy: 3.0
|
|
references:
|
|
- https://gitalk.github.io
|
|
- https://github.com/gitalk/gitalk
|
|
examples:
|
|
- |
|
|
new Gitalk({
|
|
clientID: 'd17d49be2e680b78a83d',
|
|
clientSecret:'9363cb456dda6402cb71d65092490e75c9f11873',
|