prowler icon indicating copy to clipboard operation
prowler copied to clipboard

fix(refresh): Use AWS_Audit_Info

Open marinpurgar opened this issue 2 years ago • 2 comments

Context

The assume_role function expects the AWS_Audit_Info object as parameter, currently the AWS_Assume_Role object is sent.

Description

Currently when the session is refreshed the following error is thrown: 2022-12-25 17:33:35,036 [File: aws_provider.py:99] [Module: aws_provider] CRITICAL: AttributeError -- 'AWS_Assume_Role' object has no attribute 'original_session'

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

marinpurgar avatar Dec 25 '22 17:12 marinpurgar

Hello @marinpurgar, thanks for this PR. We will review it as soon as we can.

Out of curiosity, how big in terms of number of resources is the account you are scanning with Prowler v3? Run prowler --quick-inventory to get the numbers if you like.

toniblyx avatar Dec 26 '22 11:12 toniblyx

The biggest account has 100+ CloudFormation Stacks, 30+ CloudWatch Alarms, 50+ S3 Buckets, 50+ SNS Topics. But the resources which aren't in the quick inventory and which take a lot of time (from what I can see in the output and debug logs) are ECS Clusters / Services / Task Definitions and ECRs.

marinpurgar avatar Dec 26 '22 12:12 marinpurgar

Thanks for the info, our quick inventory uses the AWS resourcegroupstagging API and it is not fully complete so far, we can add those ECS related services manually to the inventory.

I understand that with the given number of resources your scan takes more than 60 minutes?

toniblyx avatar Dec 27 '22 13:12 toniblyx

@marinpurgar we have added a workaround for this issue here https://github.com/prowler-cloud/prowler/pull/1636 it was needed to change a few more things, please check it out and test it if you want. Regarding @toniblyx question, your execution lasts more than 1h ?

n4ch04 avatar Jan 02 '23 14:01 n4ch04

Hi @marinpurgar we have merged https://github.com/prowler-cloud/prowler/pull/1636 please check it from master branch. Closing this

n4ch04 avatar Jan 04 '23 07:01 n4ch04