Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GCP - Failed to call fetch_all() for resource functions_v2: 'labels' #1618

Open
uriaronovici opened this issue Mar 24, 2024 · 0 comments
Open
Labels
bug Something isn't working potential Unconfirmed issue

Comments

@uriaronovici
Copy link

uriaronovici commented Mar 24, 2024

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

@uriaronovici uriaronovici added bug Something isn't working potential Unconfirmed issue labels Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working potential Unconfirmed issue
Projects
None yet
Development

No branches or pull requests

1 participant