Repository navigation
Conversation
100.64.0.0/10 is not a public destination, but ipaddress.is_private is false for it, so the push URL screen accepted a webhook that resolved there. Judge an IPv4-mapped address as the IPv4 it carries.
🧪 Code Coverage (vs
|
| Base | PR | Delta | |
|---|---|---|---|
| src/a2a/utils/push_url_validator.py | 87.80% | 90.20% | 🟢 +2.39% |
| Total | 93.10% | 93.11% | 🟢 +0.01% |
Generated by coverage-comment.yml
This branch has not been deployed
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
validate_push_notification_urlrejects a resolved address whenipaddressreports it as private, loopback, link-local, reserved, multicast, or unspecified. 100.64.0.0/10 (RFC 6598 shared address space) is not a public destination:is_globalis false.is_privateis also false for that range on Python 3.10 through 3.14, so a push URL that resolves to 100.64.0.1 was accepted and the server POSTed the task event there. The same hole exists for the IPv4-mapped form::ffff:100.64.0.1.The check now treats that range as blocked, and judges an IPv4-mapped address as the IPv4 address it carries. 100.63.255.255, just below the range, stays allowed.
Test plan
test_shared_address_space_blockedandtest_ipv4_mapped_shared_address_blockedfail becausepostis called.TestPushUrlValidationpasses (11 tests), including 100.63.255.255 still allowed.