I've pulled the NCC Group Scout suite repo from Github and am attempting to run it but it fails importing a module because it doesn't like a method definition that includes the async keyword.
I've read up as much as I can on this library and for the life of me I can't see what the syntax error is, so I'm hoping some of the eagle eyed members here can see it.
The original file can be found here - https://github.com/nccgroup/ScoutSuite/blob/master/ScoutSuite/main.py
I've tried inserting a simple method definition of my own and the same error report has shifted to that one:
import asyncio
async def xx():
x = 0
Gives the same error:
async def xx():
^
SyntaxError: invalid syntax
For what it's worth here is the method def in question:
async def _run(provider,
# AWS
profile,
# Azure
user_account, service_account,
cli, msi, service_principal, file_auth, tenant_id, subscription_id,
client_id, client_secret,
username, password,
# GCP
project_id, folder_id, organization_id, all_projects,
# General
report_name, report_dir,
timestamp,
services, skipped_services,
result_format,
database_name, host_ip, host_port,
regions,
fetch_local, update,
ip_ranges, ip_ranges_name_key,
ruleset, exceptions,
force_write,
debug,
quiet,
log_file,
no_browser,
programmatic_execution,
**kwargs):
When I search for similar errors, I see lots of examples where the error is reported with the carat ^ under the async keyword, not the def keyword. These all relate to python version etc. but I'm using python3.7 which seems to be ok with the async reference.
I suspect this is an obvious syntax error that is eluding me. Can anyone spot what it is?