forked from mirrors/kingfisher
84 lines
1.9 KiB
YAML
84 lines
1.9 KiB
YAML
rules:
|
|
- name: Azure Speech Region
|
|
id: kingfisher.azurespeech.1
|
|
visible: false
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
(?:
|
|
SPEECH_REGION
|
|
|
|
|
AZURE_SPEECH_REGION
|
|
|
|
|
speech[_-]?region
|
|
|
|
|
azure[_-]?speech[_-]?region
|
|
)
|
|
\b
|
|
(?:.|[\n\r]){0,16}?
|
|
[=:]
|
|
\s*["']?
|
|
(
|
|
[a-z0-9-]{4,32}
|
|
)
|
|
["']?
|
|
min_entropy: 1.5
|
|
confidence: medium
|
|
examples:
|
|
- SPEECH_REGION=eastus
|
|
- azure_speech_region="westus2"
|
|
references:
|
|
- https://learn.microsoft.com/en-us/azure/ai-services/speech-service/rest-text-to-speech
|
|
|
|
- name: Azure Speech API Key
|
|
id: kingfisher.azurespeech.2
|
|
pattern: |
|
|
(?xi)
|
|
\b
|
|
(?:
|
|
speech
|
|
|
|
|
azure[_-]?speech
|
|
)
|
|
(?:.|[\n\r]){0,24}?
|
|
(?:
|
|
key
|
|
|
|
|
api[_-]?key
|
|
|
|
|
subscription[_-]?key
|
|
|
|
|
secret
|
|
)
|
|
(?:.|[\n\r]){0,16}?
|
|
(
|
|
[a-f0-9]{32}
|
|
)
|
|
\b
|
|
pattern_requirements:
|
|
min_digits: 2
|
|
min_lowercase: 2
|
|
min_entropy: 3.5
|
|
confidence: medium
|
|
examples:
|
|
- AZURE_SPEECH_KEY=1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d
|
|
- speech_subscription_key="abcdef0123456789abcdef0123456789"
|
|
references:
|
|
- https://learn.microsoft.com/en-us/azure/ai-services/speech-service/rest-text-to-speech
|
|
depends_on_rule:
|
|
- rule_id: kingfisher.azurespeech.1
|
|
variable: AZURE_SPEECH_REGION
|
|
validation:
|
|
type: Http
|
|
content:
|
|
request:
|
|
method: POST
|
|
url: https://{{ AZURE_SPEECH_REGION }}.api.cognitive.microsoft.com/sts/v1.0/issueToken
|
|
headers:
|
|
Ocp-Apim-Subscription-Key: "{{ TOKEN }}"
|
|
Content-Type: application/x-www-form-urlencoded
|
|
Content-Length: "0"
|
|
response_matcher:
|
|
- report_response: true
|
|
- type: StatusMatch
|
|
status: [200]
|