mirror of
https://github.com/ghndrx/prowler.git
synced 2026-02-10 23:05:05 +00:00
fix(azure): fix empty subscriptions case (#2455)
This commit is contained in:
@@ -168,6 +168,13 @@ class Azure_Provider:
|
||||
)
|
||||
identity.subscriptions.update({subscription.display_name: id})
|
||||
|
||||
# If there are no subscriptions listed -> checks are not going to be run against any resource
|
||||
if not identity.subscriptions:
|
||||
logger.critical(
|
||||
"It was not possible to retrieve any subscriptions, please check your permission assignments"
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
tenants = subscriptions_client.tenants.list()
|
||||
for tenant in tenants:
|
||||
identity.tenant_ids.append(tenant.tenant_id)
|
||||
|
||||
Reference in New Issue
Block a user