forked from mirrors/kingfisher
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:
commit
e80eb6cc2b
1 changed files with 71 additions and 0 deletions
71
crates/kingfisher-rules/data/rules/testkube.yml
Normal file
71
crates/kingfisher-rules/data/rules/testkube.yml
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue