ran scout aws -f --no-browser --regions us-east-1 --max-workers 2 --debug
got one error (adding some additional lines for context):
2019-07-30 22:50:14 871fbae8c7c8 scout[7] INFO Matching EC2 instances and IAM roles
2019-07-30 22:50:14 871fbae8c7c8 scout[7] INFO Processing CloudTrail config
2019-07-30 22:50:14 871fbae8c7c8 scout[7] ERROR provider.py L376: 'us-west-2'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/base/provider.py", line 376, in _new_go_to_and_do
callback_args)
File "/usr/local/lib/python3.7/site-packages/ScoutSuite/providers/aws/provider.py", line 446, in process_vpc_peering_connections_callback
target = self.services['vpc']['regions'][region]['vpcs'][vpc_id]
KeyError: 'us-west-2'
2019-07-30 22:50:14 871fbae8c7c8 scout[7] INFO Running rule engine
2019-07-30 22:50:14 871fbae8c7c8 scout[7] DEBUG Loading ruleset /usr/local/lib/python3.7/site-packages/ScoutSuite/providers/aws/rules/rulesets/default.json
2019-07-30 22:50:14 871fbae8c7c8 scout[7] DEBUG Processing CloudFormation rule[cloudformation-stack-with-role.json]: "Role passed to stack"
2019-07-30 22:50:14 871fbae8c7c8 scout[7] DEBUG Processing CloudTrail rule[cloudtrail-duplicated-global-services-logging.json]: "Global service logging duplicated"
relevant python and pip package versions:
root@5a9483f3a03a:/# python --version
Python 3.7.4
root@5a9483f3a03a:/# pip freeze | grep -i scout
ScoutSuite==5.2.0
root@5a9483f3a03a:/# pip freeze | grep -i boto
boto3==1.9.190
botocore==1.12.199
running scout aws -f --no-browser --regions us-west-2 --max-workers 2 --debug ran with no such error.
Thanks, I think the issue is that there's a peering connection with a region which was excluded from the scan. Will look into it.
I think the issue is that there's a peering connection with a region which was excluded from the scan. Will look into it.
@vdczzz can you confirm this was the case? Did a full scan result in the same error?
We do have a peering connection to us-west-2. I鈥檒l do a scan on both simultaneously and will let you know if the error occurs.
When I ran scout aws -f --no-browser --regions us-west-2 us-east-1 --max-workers 1 --debug I didn't get the error.
Thanks @vdczzz then I guess it's a minor thing where we just assumed the region would be included in the run.
@vdczzz this should now be resolved in the develop branch, appreciate if you could test.
Closing this for now, will reopen if the issue persists.