Skip to content

Commit

Permalink
Add Datadog API Key regex
Browse files Browse the repository at this point in the history
  • Loading branch information
gruebel committed Oct 9, 2021
1 parent b6252e3 commit 86268bc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
19 changes: 17 additions & 2 deletions pywhat/Data/regex.json
Original file line number Diff line number Diff line change
Expand Up @@ -685,17 +685,32 @@
"Zapier"
]
},
{
"Name": "Datadog API Key",
"Regex": "^([a-f0-9]{32})$",
"plural_name": false,
"Description": null,
"Exploit": "Use the command below to verify that the API key is valid:\n $ curl -X GET https://api.datadoghq.com/api/v1/validate -H \"Content-Type: application/json\" -H \"DD-API-KEY: API_KEY_HERE\"\n",
"Rarity": 1,
"URL": null,
"Tags": [
"API Keys",
"Bug Bounty",
"Credentials",
"Datadog"
]
},
{
"Name": "Datadog Client Token",
"Regex": "^(pub[a-f0-9]{32})$",
"plural_name": false,
"Description": "Client tokens are used to send events and logs from web and mobile applications.",
"Description": null,
"Exploit": null,
"Rarity": 1,
"URL": null,
"Tags": [
"API Keys",
"Credentials",
"Bug Bounty",
"Datadog"
]
},
Expand Down
5 changes: 5 additions & 0 deletions tests/test_regex_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,11 @@ def test_zapier_webhook():
_assert_match_first_item("Zapier Webhook Token", res)


def test_datadog_api_key():
res = r.check(["acb6d73d95a10d30aef9894603e90963"])
_assert_match_first_item("Datadog API Key", res)


def test_datadog_client_token():
res = r.check(["pub85abf45b82e2f86f25003d559bca07d9"])
_assert_match_first_item("Datadog Client Token", res)
Expand Down

0 comments on commit 86268bc

Please sign in to comment.