kingfisher/crates/kingfisher-rules/data/rules/workato.yml
2026-04-03 23:43:49 -07:00

53 lines
2.2 KiB
YAML

rules:
- name: Workato API Token
id: kingfisher.workato.1
pattern: |
(?x)
\b
(
wrka
(?P<REGION>[a-z]{2})?
-
eyJ[A-Za-z0-9_-]{8,}
\.
[A-Za-z0-9_-]{16,}
\.
[A-Za-z0-9_-]{64,}
)
\b
pattern_requirements:
min_digits: 4
min_uppercase: 4
min_lowercase: 8
min_special_chars: 2
special_chars: "._-"
min_entropy: 4.0
confidence: medium
examples:
- 'WORKATO_API_TOKEN="wrka-eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkZXBsb3ktYm90IiwianRpIjoiY2kxMjM0NTY3LXRlc3QiLCJleHAiOjIwMDAwMDAwMDB9.aQ1bC2dE3fG4hI5jK6lM7nO8pQ9rS0tU1vW2xY3zA4bC5dE6fG7hI8jK9lM0nP1qR2sT3uV4wX5yZ6aB7cD8eF9gH0iJ1kL2mN3oP4qR5sT6uV7wX8yZ9AbCdEfGhIjKlMnOpQr"'
- 'Authorization: Bearer wrka-eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjbGllbnQiLCJqdGkiOiI1YzYxZTkwYi1kZW1vLWtleSIsImV4cCI6MjA1MDAwMDAwMH0.Rs7t_v8wXy9ZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVwXyZaBcDeFgHiJkLmNoPqRsTuVw-yZaBcD"'
references:
- https://docs.workato.com/workato-api.html
- https://docs.workato.com/workato-api/users.html
validation:
type: Http
content:
request:
method: GET
url: >
{%- assign host = "https://www.workato.com" -%}
{%- if REGION == "eu" -%}{%- assign host = "https://app.eu.workato.com" -%}{%- endif -%}
{%- if REGION == "jp" -%}{%- assign host = "https://app.jp.workato.com" -%}{%- endif -%}
{%- if REGION == "sg" -%}{%- assign host = "https://app.sg.workato.com" -%}{%- endif -%}
{%- if REGION == "au" -%}{%- assign host = "https://app.au.workato.com" -%}{%- endif -%}
{%- if REGION == "il" -%}{%- assign host = "https://app.il.workato.com" -%}{%- endif -%}
{%- if REGION == "cn" -%}{%- assign host = "https://app.workatoapp.cn" -%}{%- endif -%}
{{ host }}/api/users/me
headers:
Authorization: "Bearer {{ TOKEN }}"
Accept: application/json
response_matcher:
- report_response: true
- type: StatusMatch
status: [200, 403]
- type: JsonValid