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

Incorrect S3 Bucket Existence Check in CloudFront Origins #848

Open
ilanabitbol opened this issue Dec 24, 2024 · 0 comments
Open

Incorrect S3 Bucket Existence Check in CloudFront Origins #848

ilanabitbol opened this issue Dec 24, 2024 · 0 comments
Assignees

Comments

@ilanabitbol
Copy link

SQL Query Bug: Incorrect S3 Bucket Existence Check in CloudFront Origins

Issue Description

The current SQL query incorrectly identifies non-existent S3 buckets by checking the Origin ID instead of the Origin Domain Name. This leads to false positives when checking CloudFront distributions' S3 origins.

Current Behavior

  • Query checks bucket existence using Origin ID
  • False positives for distributions with valid S3 origins
  • Incorrect bucket name extraction from Origin configuration

Expected Behavior

  • Check bucket existence using Origin Domain Name
  • Correctly identify only truly non-existent S3 buckets
  • Extract bucket name from the standard format: [bucket-name].s3.[region].amazonaws.com

Fixed Query

Change bucket name extraction from Origin ID to Origin Domain Name

@misraved misraved self-assigned this Dec 24, 2024
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

2 participants