Merge pull request #258 from trevermckee/feature/testkube-api-key-support

Add testkube API key support (API Key, Env Key, and Org Key) with validation.
This commit is contained in:
Mick Grove 2026-03-16 20:00:47 -07:00 committed by GitHub
commit e80eb6cc2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,71 @@
rules:
- name: Testkube API Key
id: kingfisher.testkube.1
pattern: |
(?xi)
\b
(
tkcapi_[a-z0-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-z0-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-z0-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