kingfisher/data/rules/intercom.yml
Mick Grove 0f953f59a5 pattern_requirements for rules — Post-regex character-class gating to cut false positives without lookarounds. Authors can now require minimum counts of digits, uppercase, lowercase, and special characters, with an optional custom special-char set.
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.
2025-11-04 13:55:31 -05:00

38 lines
1 KiB
YAML

rules:
- name: Intercom API Token
id: kingfisher.intercom.1
pattern: |
(?xi)
(?:intercom|ic)
(?:.|[\n\r]){0,16}?
(?:SECRET|PRIVATE|ACCESS|KEY|TOKEN)
(?:.|[\n\r]){0,16}?
\b
(
[0-9A-Z+/]{59}=
)
pattern_requirements:
min_digits: 2
min_entropy: 3.5
confidence: medium
examples:
- "intercom_access_token: dG9rOvI0NmJlMTA5XzQwM2NfNDVlM184MjQzXzkwMDnmOTE1NGIyONoxOjA="
- ic_token = "g1ZsclJXTjNfc1pBSzJDemE0eFVDU0U5c25CeDN4Vm9hQ2Zac0hXemZHNGVDPQ=="
references:
- https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis
validation:
type: Http
content:
request:
method: GET
headers:
Accept: application/json
Authorization: Bearer {{ TOKEN }}
url: https://api.intercom.io/me
response_matcher:
- report_response: true
- type: StatusMatch
status:
- 200