2025-06-24 17:17:16 -07:00
|
|
|
rules:
|
|
|
|
|
- name: Anthropic API Key
|
|
|
|
|
id: kingfisher.anthropic.1
|
|
|
|
|
pattern: |
|
2025-11-20 16:33:28 -08:00
|
|
|
(?xi)
|
|
|
|
|
(
|
2025-06-24 17:17:16 -07:00
|
|
|
sk-ant-api
|
|
|
|
|
\d{2,4}
|
|
|
|
|
-
|
|
|
|
|
[\w\-]{93}
|
|
|
|
|
AA
|
2025-11-04 13:55:31 -05:00
|
|
|
)
|
|
|
|
|
pattern_requirements:
|
|
|
|
|
min_digits: 2
|
|
|
|
|
min_uppercase: 1
|
|
|
|
|
min_lowercase: 1
|
2025-06-24 17:17:16 -07:00
|
|
|
min_entropy: 3.3
|
2026-03-09 20:11:58 -07:00
|
|
|
confidence: high
|
2025-06-24 17:17:16 -07:00
|
|
|
examples:
|
|
|
|
|
- sk-ant-api668-Clm512odot9WDD7itfUU9R880nefA1EtYZDbpE-C9b0XQEWpqFKf9DQUo03vOfXl16oSmyar1CLF1SzV3YzpZJ6bahcpLAA
|
|
|
|
|
references:
|
|
|
|
|
- https://docs.anthropic.com/claude/reference/authentication
|
|
|
|
|
validation:
|
|
|
|
|
type: Http
|
|
|
|
|
content:
|
|
|
|
|
request:
|
|
|
|
|
body: |
|
|
|
|
|
{
|
|
|
|
|
"model": "claude-3-haiku-20240307",
|
|
|
|
|
"max_tokens": 1024,
|
|
|
|
|
"messages": [
|
|
|
|
|
{"role": "user", "content": "respond only with 'success'"}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
headers:
|
|
|
|
|
Content-Type: application/json
|
|
|
|
|
anthropic-version: "2023-06-01"
|
|
|
|
|
x-api-key: '{{ TOKEN }}'
|
|
|
|
|
method: POST
|
|
|
|
|
response_matcher:
|
|
|
|
|
- report_response: true
|
|
|
|
|
- status:
|
|
|
|
|
- 200
|
|
|
|
|
type: StatusMatch
|
|
|
|
|
- report_response: true
|
|
|
|
|
- type: WordMatch
|
|
|
|
|
words:
|
2025-10-23 15:02:30 -07:00
|
|
|
- '"type":"message"'
|
2026-02-19 19:36:43 -08:00
|
|
|
- 'credit balance is too low'
|
2025-06-24 17:17:16 -07:00
|
|
|
url: https://api.anthropic.com/v1/messages
|