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(BucketLocation): Recover bucket policy using the right region endpoint #1156

Conversation

jfagoagas
Copy link
Member

@jfagoagas jfagoagas commented May 23, 2022

Motivation

Prowler checks that reviews AWS S3 in the new AWS regions needs -r to point API calls to these specific regions. If this option is not included the error shown is IllegalLocationConstraintException

The affected checks are the following:

  • 7.18 [extra718] Check if S3 buckets have server access logging enabled
  • 7.34 [extra734] Check if S3 buckets have default encryption (SSE) enabled or use a bucket policy to enforce it
  • 7.63 [extra763] Check if S3 buckets have object versioning enabled
  • 7.64 [extra764] Check if S3 buckets have secure transport policy
  • 7.172 [extra7172] Check if S3 buckets have ACLs enabled

Description

Recover the bucket location in each S3 check to point API calls to the region where the S3 Bucket is located.

Also, for check extra734 I've included a new error check for the following exception ServerSideEncryptionConfigurationNotFoundError

License

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

@jfagoagas jfagoagas requested a review from a team as a code owner May 23, 2022 11:53
@jfagoagas jfagoagas self-assigned this May 23, 2022
@n4ch04 n4ch04 merged commit ae93527 into master May 23, 2022
@n4ch04 n4ch04 deleted the PRWLR-323-review-all-s-3-checks-because-in-the-new-aws-regions-some-errors-occurs branch May 23, 2022 13:45
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.

None yet

2 participants