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

Improve error handling across all resources #873

Open
x4v13r64 opened this issue Sep 23, 2020 · 0 comments
Open

Improve error handling across all resources #873

x4v13r64 opened this issue Sep 23, 2020 · 0 comments
Assignees
Labels
component-provider-alibaba Affects Alibaba Cloud provider component-provider-aws Affects AWS provider component-provider-azure Affects Azure provider component-provider-gcp Affects GCP provider component-provider-oci Affects Oracle Cloud Infrastructure provider enhancement New feature or request good first issue
Milestone

Comments

@x4v13r64
Copy link
Collaborator

Currently, facades implement good exception handling, but resource parsing does not. That means that for a given resource type, if parsing fails for any given resource, the fetch_all method fails and stops, hence not parsing any additional resources.

All resources should be reviewed and updated, to ensure they handle parsing errors.

e.g., for AWS IAM roles (https://github.com/nccgroup/ScoutSuite/blob/master/ScoutSuite/providers/aws/resources/iam/roles.py#L8) the method should be updated as so:

for raw_role in raw_roles:
    try:
        name, resource = self._parse_role(raw_role)
        self[name] = resource
    except Exception as e:
        print_exception('Failed to parse {} resource: {}'.format(self.__class__.__name__, e))
@x4v13r64 x4v13r64 added the enhancement New feature or request label Sep 23, 2020
@x4v13r64 x4v13r64 added this to the 5.11 milestone Sep 23, 2020
@x4v13r64 x4v13r64 added component-provider-aws Affects AWS provider component-provider-azure Affects Azure provider component-provider-gcp Affects GCP provider component-provider-alibaba Affects Alibaba Cloud provider component-provider-oci Affects Oracle Cloud Infrastructure provider good first issue labels Sep 23, 2020
@JJmako JJmako self-assigned this Oct 20, 2020
@alessandrogonzalez alessandrogonzalez modified the milestones: 5.11, 5.12 May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-provider-alibaba Affects Alibaba Cloud provider component-provider-aws Affects AWS provider component-provider-azure Affects Azure provider component-provider-gcp Affects GCP provider component-provider-oci Affects Oracle Cloud Infrastructure provider enhancement New feature or request good first issue
Projects
None yet
Development

No branches or pull requests

3 participants