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

fix(quickinventory): AttributError when creating inventory table #2122

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

bnugent
Copy link
Contributor

@bnugent bnugent commented Mar 22, 2023

Context

The Quick Inventory was failing with an AttributeError.

$ prowler aws -i -p $AWS_PROFILE
                         _
 _ __  _ __ _____      _| | ___ _ __
| '_ \| '__/ _ \ \ /\ / / |/ _ \ '__|
| |_) | | | (_) \ V  V /| |  __/ |
| .__/|_|  \___/ \_/\_/ |_|\___|_|v3.3.0
|_| the handy cloud security tool

Date: 2023-03-22 10:28:08


This report is being generated using credentials below:

AWS-CLI Profile: [auditor] AWS Filter Region: [all]
AWS Account: [123456789012] UserId: [AROAEXAMPLE:user]
Caller Identity ARN: [arn:aws:sts::123456789012:assumed-role/AUDITOR/user]

-> Quick Inventory completed! |▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉| 17/17 [100%] in 1:22.1
2023-03-22 10:29:32,377 [File: quick_inventory.py:19]   [Module: quick_inventory]        CRITICAL: AttributeError[15]: 'dict' object has no attribute 'split'

I traced the problem to the apigateway service parsing in create_inventory_table()

Description

Changed the final else block to reference resource["arn"] instead of the entire resource dict.

License

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

@bnugent bnugent requested a review from a team March 22, 2023 15:23
Copy link
Member

@MrCloudSec MrCloudSec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @bnugent, thank you!

@toniblyx toniblyx changed the title Fix AttributError when creating inventory table fix(quickinventory): AttributError when creating inventory table Mar 23, 2023
@toniblyx toniblyx merged commit a9df609 into prowler-cloud:master Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants