[Bounty $5k] fix(storage): validate bucket encryption, public access, versioning, and lifecycle on provision#3435
Open
Karry2019web wants to merge 1 commit into
Conversation
…and lifecycle on provision Add infrastructure policy tests and validation logic for storage bucket security baseline. New buckets must pass encryption, public access block, versioning, and lifecycle checks before provisioning. Fixes orchestration-agent#3434
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add infrastructure policy tests for bucket security baseline validation.
New buckets now fail provisioning checks when encryption, public access blocks,
versioning, or lifecycle settings deviate from the security baseline.
Changes
src/infrastructure/bucket.py: BucketValidator class with baselinechecks for encryption (AES256), public access block (all 4 settings),
versioning (enabled), and lifecycle rules (expiration + abort uploads).
src/infrastructure/__init__.py: Module exports.tests/test_infrastructure_bucket.py: Comprehensive tests coveringcompliant configs, missing encryption, partial public access blocks,
disabled versioning, missing lifecycle rules, custom baselines, and
migration plan generation.
Acceptance Criteria
generate_migration_plan())Fixes #3434