From 99e673c1a8a0d6b3798da5d303af6a691bccba0f Mon Sep 17 00:00:00 2001 From: Trever McKee Date: Mon, 16 Mar 2026 16:15:18 -0700 Subject: [PATCH 1/2] Add testkube API key support (API Key, Env Key, and Org Key) with validation. --- .../kingfisher-rules/data/rules/testkube.yml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 crates/kingfisher-rules/data/rules/testkube.yml diff --git a/crates/kingfisher-rules/data/rules/testkube.yml b/crates/kingfisher-rules/data/rules/testkube.yml new file mode 100644 index 0000000..49ddc88 --- /dev/null +++ b/crates/kingfisher-rules/data/rules/testkube.yml @@ -0,0 +1,71 @@ +rules: + - name: Testkube API Key + id: kingfisher.testkube.1 + pattern: | + (?xi) + \b + ( + tkcapi_[a-f0-9]{30,64} + ) + \b + pattern_requirements: + min_digits: 2 + min_entropy: 3.5 + confidence: medium + examples: + - "TK_ACCESS_TOKEN=tkcapi_yj871onwc7zk7ov14yl1iukkpu37dx" + - "testkubeToken: tkcapi_ic1hq66xskn42i1cy168oj43rixud1" + references: + - https://docs.testkube.io/articles/api-token-management + - https://docs.testkube.io/openapi/overview + depends_on_rule: + - rule_id: kingfisher.testkube.2 + variable: ORGID + - rule_id: kingfisher.testkube.3 + variable: ENVID + validation: + type: Http + content: + request: + method: GET + url: https://api.testkube.io/organizations/{{ ORGID }}/environments/{{ ENVID }} + headers: + Authorization: "Bearer {{ TOKEN }}" + response_matcher: + - report_response: true + - type: StatusMatch + status: [200] + + - name: Testkube Organization ID + id: kingfisher.testkube.2 + pattern: | + (?xi) + \b + ( + tkcorg_[a-f0-9]{16,32} + ) + \b + min_entropy: 3.0 + confidence: medium + visible: false + examples: + - TK_ORG_ID=tkcorg_sski0qzef7c9brh3 + references: + - https://docs.testkube.io/openapi/overview + + - name: Testkube Environment ID + id: kingfisher.testkube.3 + pattern: | + (?xi) + \b + ( + tkcenv_[a-f0-9]{16,32} + ) + \b + min_entropy: 3.0 + confidence: medium + visible: false + examples: + - TK_ENV_ID=tkcenv_nwjpsfue4f2zjtia + references: + - https://docs.testkube.io/openapi/overview From 25219f2ed81ad55ae335eeb0bc749470ca9ff0a5 Mon Sep 17 00:00:00 2001 From: Trever McKee <132310752+trevermckee@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:22:55 -0700 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Trever McKee <132310752+trevermckee@users.noreply.github.com> --- crates/kingfisher-rules/data/rules/testkube.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/kingfisher-rules/data/rules/testkube.yml b/crates/kingfisher-rules/data/rules/testkube.yml index 49ddc88..a401bbb 100644 --- a/crates/kingfisher-rules/data/rules/testkube.yml +++ b/crates/kingfisher-rules/data/rules/testkube.yml @@ -5,7 +5,7 @@ rules: (?xi) \b ( - tkcapi_[a-f0-9]{30,64} + tkcapi_[a-z0-9]{30,64} ) \b pattern_requirements: @@ -42,7 +42,7 @@ rules: (?xi) \b ( - tkcorg_[a-f0-9]{16,32} + tkcorg_[a-z0-9]{16,32} ) \b min_entropy: 3.0 @@ -59,7 +59,7 @@ rules: (?xi) \b ( - tkcenv_[a-f0-9]{16,32} + tkcenv_[a-z0-9]{16,32} ) \b min_entropy: 3.0