Describe the bug
When running scout suite for a subscription for Azure scout stops responding after showing the information about Fetching resources for the App Services service.
I updated to the latest version of scout suite. Running scout suite on two different systems with the same user credentials I get two different errors but in both instances the system gets stuck in both instances -
1st instance RedHat linux -
This was on the previous version -
[[email protected] azure_test]# scout azure --user-account -u $u -p $PP --subscriptions xyz --debug
2020-04-02 15:58:25 ip-x.x.x.x.linux.internal scout[23057] INFO Launching Scout
2020-04-02 15:58:25 ip-x.x.x.x.linux.internal scout[23057] INFO Authenticating to cloud provider
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Running against 1 subscription(s)
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Gathering data from APIs
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the AAD service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the ARM service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the Security Center service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the SQL Database service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the Storage Accounts service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the Key Vault service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the Network service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the Virtual Machines service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] INFO Fetching resources for the App Services service
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] ERROR securitycenter.py L83: Failed to retrieve compliance results: 'SecurityCenter' object has no attribute 'compliance_results'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/securitycenter.py", line 83, in get_compliance_results
lambda: list(client.compliance_results.list(scope=scope))
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/utils.py", line 24, in run_concurrently
return await run_function_concurrently(function)
File "/usr/lib64/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/securitycenter.py", line 83, in
lambda: list(client.compliance_results.list(scope=scope))
AttributeError: 'SecurityCenter' object has no attribute 'compliance_results'
2020-04-02 15:58:29 ip-x.x.x.x.linux.internal scout[23057] ERROR securitycenter.py L95: Failed to retrieve regulatory compliance standards: 'SecurityCenter' object has no attribute 'regulatory_compliance_standards'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/securitycenter.py", line 95, in get_regulatory_compliance_results
lambda: list(client.regulatory_compliance_standards.list())
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/utils.py", line 24, in run_concurrently
return await run_function_concurrently(function)
File "/usr/lib64/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/securitycenter.py", line 95, in
lambda: list(client.regulatory_compliance_standards.list())
AttributeError: 'SecurityCenter' object has no attribute 'regulatory_compliance_standards'
After updating to the latest version -
Successfully installed azure-cli-core-2.3.1 azure-mgmt-compute-12.0.0 azure-mgmt-monitor-0.8.0 azure-mgmt-network-10.0.0 azure-mgmt-security-0.3.0 azure-mgmt-sql-0.18.0 azure-mgmt-storage-9.0.0 azure-mgmt-web-0.45.0 boto3-1.12.35 botocore-1.15.35 cryptography-2.9 google-auth-1.13.1 google-cloud-storage-1.27.0 httplib2-0.17.1 humanfriendly-8.1 importlib-metadata-1.6.0 knack-0.7.0rc1 oci-2.12.2 pkginfo-1.5.0.1 pytz-2019.3 pyyaml-5.3.1 rsa-4.0 scoutsuite-5.8.1 setuptools-46.1.3
[[email protected] azure_test]# scout azure --user-account -u $u -p $PP --subscriptions xyz --debug
2020-04-02 16:32:17 ip-x.x.x.x.linux.internal scout[27034] INFO Launching Scout
2020-04-02 16:32:17 ip-x.x.x.x.linux.internal scout[27034] INFO Authenticating to cloud provider
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Running against 1 subscription(s)
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Gathering data from APIs
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the AAD service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the ARM service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the Security Center service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the SQL Database service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the Storage Accounts service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the Key Vault service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the Network service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the Virtual Machines service
2020-04-02 16:32:23 ip-x.x.x.x.linux.internal scout[27034] INFO Fetching resources for the App Services service
2nd Instance RedHat linux -
On my Macbook I get the following -
scout azure --user-account -u $u -p $PP --subscriptions xyz --debug
2020-04-02 16:46:42 MACBOOK scout[24261] INFO Launching Scout
2020-04-02 16:46:42 MACBOOK scout[24261] INFO Authenticating to cloud provider
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Running against 1 subscription(s)
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Gathering data from APIs
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the AAD service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the ARM service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the Security Center service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the SQL Database service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the Storage Accounts service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the Key Vault service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the Network service
2020-04-02 16:46:51 MACBOOK scout[24261] INFO Fetching resources for the Virtual Machines service
2020-04-02 16:46:52 MACBOOK asyncio[24261] ERROR Task exception was never retrieved
future: <Task finished coro=<RoleAssignments.fetch_all() done, defined at /usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/resources/arm/role_assignments.py:11> exception=AttributeError("'RoleAssignment' object has no attribute 'principal_type'")>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/resources/arm/role_assignments.py", line 13, in fetch_all
id, role_assignment = self._parse_role_assignment(raw_role_assignment)
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/resources/arm/role_assignments.py", line 24, in _parse_role_assignment
role_assignment_dict['principal_type'] = raw_role_assignment.principal_type
AttributeError: 'RoleAssignment' object has no attribute 'principal_type'
2020-04-02 16:46:55 MACBOOK scout[24261] ERROR storageaccounts.py L61: Failed to retrieve activity logs: 'AzureCredentials' object has no attribute 'signed_session'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/storageaccounts.py", line 61, in _get_and_set_activity_logs
lambda: list(client.activity_logs.list(filter=logs_filter, select="eventTimestamp, operationName"))
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/utils.py", line 24, in run_concurrently
return await run_function_concurrently(function)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/storageaccounts.py", line 61, in
lambda: list(client.activity_logs.list(filter=logs_filter, select="eventTimestamp, operationName"))
File "/usr/local/lib/python3.7/site-packages/msrest/paging.py", line 143, in next
self.advance_page()
File "/usr/local/lib/python3.7/site-packages/msrest/paging.py", line 129, in advance_page
self._response = self._get_next(self.next_link)
File "/usr/local/lib/python3.7/site-packages/azure/mgmt/monitor/operations/activity_logs_operations.py", line 117, in internal_paging
request, header_parameters, stream=False, **operation_config)
File "/usr/local/lib/python3.7/site-packages/msrest/service_client.py", line 336, in send
pipeline_response = self.config.pipeline.run(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/msrest/pipeline/init.py", line 197, in run
return first_node.send(pipeline_request, **kwargs) # type: ignore
File "/usr/local/lib/python3.7/site-packages/msrest/pipeline/init.py", line 150, in send
response = self.next.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/msrest/pipeline/requests.py", line 65, in send
self._creds.signed_session(session)
AttributeError: 'AzureCredentials' object has no attribute 'signed_session'
2020-04-02 16:46:55 MACBOOK scout[24261] ERROR storageaccounts.py L35: Failed to retrieve blob containers: 'ListContainerItems' object is not iterable
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/storageaccounts.py", line 35, in get_blob_containers
lambda: list(client.blob_containers.list(resource_group_name, storage_account_name))
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/utils.py", line 24, in run_concurrently
return await run_function_concurrently(function)
File "/usr/local/Cellar/python/3.7.7/Frameworks/Python.framework/Versions/3.7/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/azure/facade/storageaccounts.py", line 35, in
lambda: list(client.blob_containers.list(resource_group_name, storage_account_name))
TypeError: 'ListContainerItems' object is not iterable
Please provide:
- No JSON File was generated.
- These scripts are run behind a proxy environment the proxy variables were set before running the command in CLI.
- I have reader permissions on the subscription
- The permissions given to me are limited I think in the documents Directory.read was needed but I cannot get that is there a way to run the report partially incase it's a permissions error.
Please let me know if I am doing something wrong or if I need to provide any other details.
bug component-provider-azure potential