kingfisher/crates/kingfisher-rules/data/rules/azurestorage.yml

78 lines
2.9 KiB
YAML
Raw Normal View History

2025-06-24 17:17:16 -07:00
rules:
- name: Azure Storage Account Name
id: kingfisher.azurestorage.1
2025-06-24 17:17:16 -07:00
pattern: |
2025-06-26 11:31:41 -07:00
(?xi)
2025-06-24 17:17:16 -07:00
(?:
2025-10-26 11:53:29 -07:00
# A) Connection string: AccountName=<name>
(?i:AccountName)\s*=\s*([a-z0-9]{3,24})(?:\b|[^a-z0-9])
|
# B) Blob endpoint URL: <name>.blob.core.windows.net
([a-z0-9]{3,24})\.blob\.core\.windows\.net\b
2025-06-24 17:17:16 -07:00
|
2025-10-26 11:53:29 -07:00
# C) Explicit KV labels near 'azure storage/account name' with tight separators
\bazure(?:[_\s-]*)(?:storage|account)(?:[_\s-]*)(?:name)\b
[\s:=\"']{0,6}
([a-z0-9]{3,24})(?:\b|[^a-z0-9])
2026-01-15 10:41:55 -08:00
|
# D) Explicit KV labels near 'azure storage/account name' with tight separators
(?i:Account[_.-]?Name|Storage[_.-]?(?:Name))(?:.|\s){0,32}?\b([A-Z0-9]{3,32})\b|([A-Z0-9]{3,32})(?i:\.blob\.core\.windows\.net)
2025-10-26 11:53:29 -07:00
)
min_entropy: 2.0
2025-06-24 17:17:16 -07:00
visible: false
confidence: medium
examples:
2025-10-26 11:53:29 -07:00
- AccountName=mystorageaccount
2025-06-24 17:17:16 -07:00
- mystorageaccount.blob.core.windows.net
2025-10-26 11:53:29 -07:00
- azure_storage_name="prodblob2024"
2026-02-10 19:24:19 -08:00
references:
- https://learn.microsoft.com/en-us/azure/storage/common/storage-account-overview
- https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
2025-06-24 17:17:16 -07:00
- name: Azure Storage Account Key
id: kingfisher.azurestorage.2
2025-06-24 17:17:16 -07:00
pattern: |
2026-03-09 09:37:49 -07:00
(?x)
2026-03-08 13:44:19 -07:00
\b
(?:
2026-03-09 09:37:49 -07:00
(?i:azure)(?:[_\s-]*(?i:storage))?
2026-03-08 13:44:19 -07:00
(?:[_\s-]*(?:account[_\s-]*key|storage[_\s-]*key|shared[_\s-]*key|access[_\s-]*key|accountkey))
|
2026-03-09 09:37:49 -07:00
(?i:account)[_.\s-]*(?i:key)
2026-03-08 13:44:19 -07:00
|
2026-03-09 09:37:49 -07:00
(?i:storage)[_.\s-]*(?i:key)
2026-03-08 13:44:19 -07:00
)
\b
(?:.|[\n\r]){0,24}?
2026-03-09 09:37:49 -07:00
(?:
[=:]
|
["']\s*:\s*["']
)
\s*
["']?
2025-06-24 17:17:16 -07:00
(
2026-03-09 09:37:49 -07:00
[A-Za-z0-9+/]{86}==
2025-06-24 17:17:16 -07:00
)
2026-03-08 13:44:19 -07:00
['"]?
pattern_requirements:
min_digits: 2
min_uppercase: 2
min_lowercase: 2
2026-03-09 09:37:49 -07:00
min_special_chars: 1
2025-06-24 17:17:16 -07:00
min_entropy: 4.0
confidence: medium
examples:
2026-03-09 09:37:49 -07:00
- Azure AccountKey=oqb4TdY9T0hphvktd5fJnMiHuQqzVy1jd5sSuOpAbGkaoqTlrHl0BOJN2okcasinVLOJzfDbZo1L+ASt68RAhA==
- Azure AccountKey=B/1EVX2Ui47X09tqU3GI/j+Nko9r5COPm0Hea9tfzitF9MQX9lZZiNO3tYQckWnt+rtlGIWS+sCx+AStkq8ZLg==
- Azure AccountKey=u45diQdTiXeuSKl5r4EjgbPP72EYpuTNEzfMTi0mk+d2sTisA4gWzt4H1Ag3kqFaCykWZv2S6KQo+AStHF56RQ==
- Azure AccountKey=b8a/Z4wFAbhOPQTMa4PUTKr2XQhwoyWtP/3PnEto3mK86CFQnVYyTV/HSrij88h5jVYyzwUk0oTw+AStIKN/4w==
- Azure AccountKey=JJD1GDiHCmtTpCOKpBYkXgZKrZvi7P4mRDe3jNVGc/JL/bp51uWcWL0rkOByk5VsX2MM62A/ABkE+AStU9qMkA==
- Azure AccountKey=u45diQdTiXeuSKl5r4EjgbPP72EYpuTNEzfMTi0mk+d2sTisA4gWzt4H1Ag3kqFaCykWZv2S6KQo+AStHF56RQ==
2025-06-24 17:17:16 -07:00
validation:
type: AzureStorage
2026-02-10 19:24:19 -08:00
references:
- https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key
- https://learn.microsoft.com/en-us/rest/api/storageservices/
2025-06-24 17:17:16 -07:00
depends_on_rule:
- rule_id: kingfisher.azurestorage.1
2025-10-30 22:50:41 -07:00
variable: AZURENAME