GCP - Failed to call fetch_all() for resource functions_v2: 'labels'
uriaronovici opened this issue · comments
uriaronovici commented
When fetching labels for the functions_v2 resource in Scout Suite, an error occurs due to a missing labels key in the raw function data, resulting in a KeyError. This prevents Scout Suite from completing the fetch operation successfully.
Console output using the --debug argument:
2024-03-24 14:43:18 7f6aeed3e123 scout[22] ERROR base.py L17: Failed to call fetch_all() for resource functions_v2: 'labels'
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/ScoutSuite/providers/base/resources/base.py", line 17, in call
await task
File "/usr/local/lib/python3.9/site-packages/ScoutSuite/providers/gcp/resources/functions/functions_v2.py", line 15, in fetch_all
function_id, function = self._parse_function(raw_function)
File "/usr/local/lib/python3.9/site-packages/ScoutSuite/providers/gcp/resources/functions/functions_v2.py", line 41, in _parse_function
function_dict['labels'] = raw_function['labels']
KeyError: 'labels'
Command line
scout gcp --service-account KEY/PATH --debug
Version
5.13