nccgroup / Scout2

Security auditing tool for AWS environments
http://nccgroup.github.io/Scout2/
GNU General Public License v2.0
1.73k stars 300 forks source link

KeyError in rules/preprocessing.py (VPC) #296

Closed andresriancho closed 5 years ago

andresriancho commented 6 years ago

KeyError in rules/preprocessing.py

Traceback (most recent call last):
  File "/home/andres/tools/virtualenvs/scout2/local/lib/python2.7/site-packages/AWSScout2-3.2.1-py2.7.egg/AWSScout2/rules/preprocessing.py", line 632, in new_go_to_and_do
    callback(aws_config, current_config[key][value], path, current_path, value, callback_args)
  File "/home/andres/tools/virtualenvs/scout2/local/lib/python2.7/site-packages/AWSScout2-3.2.1-py2.7.egg/AWSScout2/rules/preprocessing.py", line 537, in sort_vpc_flow_logs_callback
    subnet_path = combine_paths(current_path[0:4], ['vpcs', subnet_map[attached_resource]['vpc_id'], 'subnets', attached_resource])
KeyError: u'subnet-fd136d8a'

KeyError: None in rules/preprocessing.py

Traceback (most recent call last):
  File "/home/andres/tools/virtualenvs/scout2/local/lib/python2.7/site-packages/AWSScout2-3.2.1-py2.7.egg/AWSScout2/rules/preprocessing.py", line 632, in new_go_to_and_do
    callback(aws_config, current_config[key][value], path, current_path, value, callback_args)
  File "/home/andres/tools/virtualenvs/scout2/local/lib/python2.7/site-packages/AWSScout2-3.2.1-py2.7.egg/AWSScout2/rules/preprocessing.py", line 284, in match_instances_and_subnets_callback
    vpc = subnet_map[subnet_id]
KeyError: None

KeyError in rules/preprocessing.py (VPC)

Traceback (most recent call last):
  File "/home/andres/tools/virtualenvs/scout2/local/lib/python2.7/site-packages/AWSScout2-3.2.1-py2.7.egg/AWSScout2/rules/preprocessing.py", line 632, in new_go_to_and_do
    callback(aws_config, current_config[key][value], path, current_path, value, callback_args)
  File "/home/andres/tools/virtualenvs/scout2/local/lib/python2.7/site-packages/AWSScout2-3.2.1-py2.7.egg/AWSScout2/rules/preprocessing.py", line 352, in process_vpc_peering_connections_callback
    target = aws_config['services']['vpc']['regions'][region]['vpcs'][vpc_id]
KeyError: u'vpc-162a7f2a'
x4v13r64 commented 6 years ago

Could you please provide more details about the issue (full output with --debug flag) please.

x4v13r64 commented 5 years ago

Closing as this should be resolved in the latest version of https://github.com/nccgroup/ScoutSuite.