54 lines
1.8 KiB
YAML
54 lines
1.8 KiB
YAML
id: azure-storage-blob-public-access
|
|
info:
|
|
name: Azure Storage Blob Public Access Not Disabled
|
|
author: princechaddha
|
|
severity: medium
|
|
description: |
|
|
Ensure that public (anonymous) access is disabled for all the blob containers available within your Microsoft Azure storage accounts in order to protect your data against unauthorized access. Disabling public access at the storage account level overrides the public access setting configured for the individual blob containers in that storage account.
|
|
impact: |
|
|
If public access is not disabled, blob containers can be accessed by anyone, potentially exposing sensitive data to unauthorized users.
|
|
remediation: |
|
|
Disable public access to all storage accounts containing blob containers to prevent unauthorized data access.
|
|
reference:
|
|
- https://docs.microsoft.com/en-us/azure/storage/common/storage-disallow-access
|
|
tags: cloud,devops,azure,microsoft,storage,azure-cloud-config
|
|
|
|
flow: |
|
|
code(1);
|
|
for (let AccountData of iterate(template.accountList)) {
|
|
set("ids", AccountData);
|
|
code(2);
|
|
}
|
|
|
|
self-contained: true
|
|
code:
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
az storage account list --query '[*].id'
|
|
|
|
extractors:
|
|
- type: json
|
|
name: accountList
|
|
internal: true
|
|
json:
|
|
- '.[]'
|
|
|
|
- engine:
|
|
- sh
|
|
- bash
|
|
source: |
|
|
az storage account show --ids "$ids" --query 'allowBlobPublicAccess'
|
|
|
|
matchers-condition: and
|
|
matchers:
|
|
- type: word
|
|
words:
|
|
- 'false'
|
|
|
|
extractors:
|
|
- type: dsl
|
|
dsl:
|
|
- 'ids + " has public access enabled"'
|
|
# digest: 4a0a0047304502207c1091283a6da6a2b35e2fd856b2c0bb3b6bf6314871e8f7e686b8135f630338022100b481aba3b07994b0a5c68adec920dfbd35d057d5d042c2fff06e3606fe0d7318:922c64590222798bb761d5b6d8e72950 |