diff --git a/CHANGELOG.md b/CHANGELOG.md index d9bce79..1fdb88a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. +## [1.22.0] +- Added rules for Google Gemini AI, Cohere, Stability.ai + ## [1.21.0] - Improved Azure Storage rule - Added rule to detect TravisCI encrypted values diff --git a/data/rules/cohere.yml b/data/rules/cohere.yml new file mode 100644 index 0000000..400d044 --- /dev/null +++ b/data/rules/cohere.yml @@ -0,0 +1,39 @@ +rules: + - name: Cohere API Key + id: kingfisher.cohere.1 + pattern: | + (?xi) + \b + cohere + (?:.|[\n\r]){0,16}? + ( + [A-Z0-9]{40} + ) + \b + min_entropy: 3.5 + confidence: medium + examples: + - 'cohere_key = 5fNtU1ytdUcOX3jfvgjlr61EPxBqxOojOklDD6BG' + - "cohere secret key = QfsfCM0HdHH9x5ZlhsGzeignSk4pCeBwBrzYqgGV" + - 'cohere_token: x7PX0fac8a2GW2fgnNqdtqIwMQvFbrL6E7lKrKOv' + references: + - https://docs.cohere.com/reference/list-connectors + validation: + type: Http + content: + request: + method: GET + url: https://api.cohere.com/v1/connectors + headers: + Authorization: Bearer {{ TOKEN }} + response_matcher: + - report_response: true + - type: StatusMatch + status: [200] + - type: JsonValid + - type: WordMatch + match_all_words: true + words: + - '"connectors"' + - '"id"' + - '"organization_id"' \ No newline at end of file diff --git a/data/rules/stabilityai.yml b/data/rules/stabilityai.yml new file mode 100644 index 0000000..1ac8fd1 --- /dev/null +++ b/data/rules/stabilityai.yml @@ -0,0 +1,38 @@ +rules: + - name: Stability AI API Key + id: kingfisher.stabilityai.1 + pattern: | + (?x) + \b + ( + sk- + [A-Za-z0-9]{48} + ) + \b + min_entropy: 4.0 + confidence: medium + examples: + - sk-AnmgropvAII5XEoxVPjbnSMG3XhacEwhJlLh8ossXh7K1iLP + - sk-gQHyuK4k6Vw2viJRaAnLh6zAULaWtUg40ZHWcYjw7JGutlW6 + - sk-nwvJypEMFNASJLiPBgNnzJj1xsDwlHChbFRMNwVkzy3e4UJg + references: + - https://platform.stability.ai/docs/api-reference#v1-user-account + validation: + type: Http + content: + request: + method: GET + url: https://api.stability.ai/v1/user/account + headers: + Authorization: "Bearer {{ TOKEN }}" + Accept: application/json + response_matcher: + - report_response: true + - type: StatusMatch + status: [200] + - type: JsonValid + - type: WordMatch + match_all_words: true + words: + - '"id"' + - '"email"'