From bf24b0c563f9409f2cebcfe62d8be795b9c49c6a Mon Sep 17 00:00:00 2001 From: Mick Grove Date: Thu, 17 Jul 2025 11:07:44 -0700 Subject: [PATCH] Added rule for Google Gemini AI --- Cargo.toml | 2 +- data/rules/google.yml | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e220d39..c03c5ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ publish = false [package] name = "kingfisher" -version = "1.21.0" +version = "1.22.0" edition.workspace = true rust-version.workspace = true license.workspace = true diff --git a/data/rules/google.yml b/data/rules/google.yml index 812a903..d7d4aed 100644 --- a/data/rules/google.yml +++ b/data/rules/google.yml @@ -93,4 +93,38 @@ rules: client_id: '132261435625-69ubohrvppjr9hcc5t9uighsb7j2cqhv.apps.googleusercontent.com', client_secret: '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', redirect_uri: `http://localhost:${Config.OAUTH_HTTP_PORT}/oauth2callback` - }; \ No newline at end of file + }; + - name: Google Gemini API Key + id: kingfisher.google.7 + pattern: | + (?xi) + ( + AIza + [A-Za-z0-9_-]{35} + ) + \b + min_entropy: 3.5 + confidence: medium + examples: + - AIzaSyByz6BGQf8QtcQLml8spbyy8x5_327PTow + - AIzaSyDhISgbccTi6mfp2GOSmTtqdU__IdevJes + - AIzaSyA_uW1h2CF4ak3vHr7si_RFD_yWxM4tMAM + references: + - https://ai.google.dev/docs/gemini_api_overview + validation: + type: Http + content: + request: + method: GET + url: https://generativelanguage.googleapis.com/v1/models + headers: + X-goog-api-key: '{{ TOKEN }}' + response_matcher: + - report_response: true + - type: StatusMatch + status: [200] + - type: WordMatch + match_all_words: true + words: + - '"models"' + - '"name"' \ No newline at end of file