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

Prowler does not work in the central SecurityHub account (AWS Support confirmed bug) #867

Closed
joerg opened this issue Sep 14, 2021 · 4 comments

Comments

@joerg
Copy link

joerg commented Sep 14, 2021

Hi,

I followed up on #711 with AWS support and was able to find and confirm the underlying issue at hand. It seems that the SecurityHub API basically always throws a AccessDeniedException if something is wrong, which is why I initially posted in #711.
The issue we get only on our central SecurityHub account of the organization is this suspicious and actually non-saying error message:
An error occurred (AccessDeniedException) when calling the BatchImportFindings operation: User: <redacted> is not authorized to perform: securityhub:BatchImportFindings on resource: arn:aws:securityhub:ap-southeast-2::product/prowler/prowler

So I started logging debug infos from this call https://github.com/toniblyx/prowler/blob/master/include/securityhub_integration#L77 and what was suspicious to me was that Prowler tried importing issues of other accounts. So I explicitly asked AWS support if a call to the batch-import-findings API with any other account ID but the one prowler runs in is valid/accepted and they confirmed that a finding JSON is only valid if the account ID is the current one. The error in case of a different and thus invalid account ID sadly is an AccessDeniedException.

Here the answer from AWS support:
image

@toniblyx
Copy link
Member

Thanks @joerg for your work on debugging this issue. So the issue is because Prowler is sending to account A in region X a finding from account B in region X. In order to get better insight, would you mind to send me a message in Twitter (open DMs) or an email? We can try to see it together and find a fix asap.

@joerg
Copy link
Author

joerg commented Sep 17, 2021

Thanks a lot for the support via mail. It seem that this issue will be fixed with #873 .

@w0rmr1d3r
Copy link
Contributor

The Pr has been merged @joerg !
Can you try again to see if it has been fixed?

Thank you!

@toniblyx
Copy link
Member

He has confirmed that it works (off line via email) so I'm closing this issue. Thanks.

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

No branches or pull requests

3 participants