From 86268bc62ed17b8de418ad910efc4e3887a39522 Mon Sep 17 00:00:00 2001 From: gruebel Date: Sat, 9 Oct 2021 18:33:18 +0200 Subject: [PATCH] Add Datadog API Key regex --- pywhat/Data/regex.json | 19 +++++++++++++++++-- tests/test_regex_identifier.py | 5 +++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/pywhat/Data/regex.json b/pywhat/Data/regex.json index 80189ab..8cb572c 100644 --- a/pywhat/Data/regex.json +++ b/pywhat/Data/regex.json @@ -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" ] }, diff --git a/tests/test_regex_identifier.py b/tests/test_regex_identifier.py index 88ff31b..6732296 100644 --- a/tests/test_regex_identifier.py +++ b/tests/test_regex_identifier.py @@ -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)