Skip to content

Fix: IPv6 address parsing bypass in validate_command_network_egress#918

Open
poojaarabati wants to merge 1 commit into
utksh1:mainfrom
poojaarabati:poojaarabati-patch-1
Open

Fix: IPv6 address parsing bypass in validate_command_network_egress#918
poojaarabati wants to merge 1 commit into
utksh1:mainfrom
poojaarabati:poojaarabati-patch-1

Conversation

@poojaarabati

Copy link
Copy Markdown

fixes #725

Description

Added IPv6Address check before port stripping logic to prevent bare IPv6 addresses from bypassing network policy validation

Related Issues

fixes #725

Type of Change

  • [ x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Manually reviewed the fix logic against the issue description and suggested fix provided in the issue

Checklist

  • [ x ] My code follows the code style of this project.
  • [ x ] I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.

@poojaarabati

Copy link
Copy Markdown
Author

Hi, I've submitted this fix for issue #725. The backend-lint and frontend-checks are failing — I noticed these seem to fail consistently. Please review my code changes when possible. I'm a GSSoC'26 beginner contributor!

@utksh1 utksh1 added level:advanced 55 pts difficulty label for advanced contributor PRs type:security Security work category bonus label type:bug Bug fix work category bonus label area:backend Backend API, database, or service work area:security Security-sensitive implementation or tests labels Jun 14, 2026

@utksh1 utksh1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the security fix. This cannot merge in its current state.

The patch introduces a syntax error in validation.py: the changed line reads resolved f = socket.getaddrinfo(...), and the new IPv6 parsing block is mis-indented outside the validate_command_network_egress loop/function structure. That matches the failing backend-lint check. Fresh-clone smoke and frontend-checks are also failing.

Please fix the syntax/indentation, add focused tests for bracketed and unbracketed IPv6 host:port cases, and get required CI green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:backend Backend API, database, or service work area:security Security-sensitive implementation or tests level:advanced 55 pts difficulty label for advanced contributor PRs type:bug Bug fix work category bonus label type:security Security work category bonus label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[HIGH] IPv6 address parsing in validate_command_network_egress bypasses network policy

2 participants