Skip to content

Conversation

@alexpotato
Copy link
Contributor

Backstory:

  • we have a script to create buckets
  • that script was set to make new buckets publicly accessible (aka "block public access" was set to false"
  • this now corrects the above

@alexpotato alexpotato requested a review from omegablitz as a code owner October 1, 2025 20:46
Copilot AI review requested due to automatic review settings October 1, 2025 20:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes the S3 bucket creation script to properly make buckets private by enabling all public access blocking settings. Previously, the script was incorrectly creating publicly accessible buckets.

  • Changes all public access block configuration values from false to true
Comments suppressed due to low confidence (1)

monad-archive/scripts/create-bucket.sh:26

  • The comment on line 28 is now misleading. It says 'Disabling block public access settings...' but the code is actually enabling block public access settings to make the bucket private. This should be updated to 'Enabling block public access settings...' or 'Making bucket private...'.
echo "Disabling block public access settings..."

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

# Disable block public access
aws s3api put-public-access-block \
--bucket "$S3_BUCKET_NAME" \
--public-access-block-configuration "BlockPublicAcls=false,IgnorePublicAcls=false,BlockPublicPolicy=false,RestrictPublicBuckets=false"
Copy link
Contributor

Choose a reason for hiding this comment

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

This script is primarily for creating archive replica buckets, which generally should be public by default. Consider either add a cli flag for non-public

Copy link
Contributor Author

Choose a reason for hiding this comment

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

related question:

if we are making a public bucket, do we want to ensure that it's requestor pays?

I would assume "yes" which means:

  • public -> requestor pays
  • private (doesn't matter about requestor)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we want requester pays on all buckets actually, since if they're internal we pay pay either way

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll update the script to have the switch and set the buckets to requestor pays

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.

4 participants