Add Defined Networking API Tokens (#1096)

Adds detection support for Defined Networking tokens (https://docs.defined.net/guides/automating-host-creation/)

I added a fixture in addition to the generator, I think I may be able to use the `generateUniqueToken` instead of the semi-generic option? Let me know if I should update accordingly.

Remove testing fixture
This commit is contained in:
Caleb Jasik authored and GitHub committed 2023-03-14 14:46:45 -05:00
1 parent 1fb3a77eb8
commit 6b0c303b26
3 files changed
+42

No files matched your search

+9
View File
@@ -242,6 +242,15 @@ keywords = [
"datadog",
]
[[rules]]
description = "Defined Networking API token"
id = "defined-networking-api-token"
regex = '''(?i)(?:dnkey)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}(dnkey-[a-z0-9=_\-]{26}-[a-z0-9=_\-]{52})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
secretGroup = 1
keywords = [
"dnkey",
]
[[rules]]
description = "DigitalOcean OAuth Access Token"
id = "digitalocean-access-token"