Fix: IPv6 address parsing bypass in validate_command_network_egress#918
Fix: IPv6 address parsing bypass in validate_command_network_egress#918poojaarabati wants to merge 1 commit into
Conversation
|
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
left a comment
There was a problem hiding this comment.
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.
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
How Has This Been Tested?
Manually reviewed the fix logic against the issue description and suggested fix provided in the issue
Checklist