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

Patch AWS.S3.ServerAccess.IPWhitelist to work with IPv6 #1468

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

ben-githubs
Copy link
Contributor

Background

AWS.S3.ServerAccess.IPWhitelist would raise an error if the version of the accessing IP was different from the version of the allowed CIDR range. I added an additional check to confirm whether the addresses are both IPv4 or IPv6, and return False if they are not.

Changes

  • add is_subnet function to rule, which allows comparison of IPv4 and IPv6 networks

Testing

  • Manual testing passed the vibe check
  • New unit test also passes

@ben-githubs ben-githubs requested a review from a team as a code owner January 10, 2025 16:02
@arielkr256 arielkr256 enabled auto-merge (squash) January 10, 2025 16:19
Copy link
Contributor

@arielkr256 arielkr256 left a comment

Choose a reason for hiding this comment

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

LGTM!

@arielkr256 arielkr256 merged commit 0c1d36a into develop Jan 10, 2025
8 checks passed
@arielkr256 arielkr256 deleted the ben/aws_s3_allowlist_ip_version_fix branch January 10, 2025 16:23
@arielkr256 arielkr256 added bug Something isn't working rules Real-time log data detections labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rules Real-time log data detections
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants