Repository navigation
Python: fix(python): Pin HttpPlugin requests to validated DNS addresses - #14649
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 2 commits intoOct 23, 2026
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Eduard van Valkenburg (eavanvalkenburg)
requested a review
from a team
as a code owner
October 23, 2026 12:55
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
github-app-auth
October 23, 2026 12:55 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
github-app-auth
October 23, 2026 12:55 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:55 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:55 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:55 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 12:55 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
Eduard van Valkenburg (eavanvalkenburg)
October 23, 2026 12:55
Eduard van Valkenburg (eavanvalkenburg)
had a problem deploying
to
github-app-auth
October 23, 2026 12:55 — with
GitHub Actions
Failure
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation consistently pins all four HTTP methods to validated addresses, with focused regression coverage and no identified blocking issues.
No open issues 🎉
What changed in this PR
This PR closes the gap between DNS validation and connection establishment in Python’s HttpPlugin by connecting only to validated addresses.
Changes:
- Adds a host-scoped resolver and uses it for GET, POST, PUT, and DELETE.
- Preserves the normalized hostname for HTTP headers and TLS, along with existing network-access opt-ins.
- Adds per-method regression coverage and a real-connection test verifying that no second DNS lookup occurs.
| File | Description |
|---|---|
python/tests/unit/core_plugins/test_http_plugin.py |
Adds resolver-pinning and real-connection regression tests. |
python/semantic_kernel/core_plugins/http_plugin.py |
Retains validated addresses and supplies a pinned resolver to each HTTP method. |
Review effort: Balanced
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Eduard van Valkenburg (eavanvalkenburg)
had a problem deploying
to
github-app-auth
October 23, 2026 13:04 — with
GitHub Actions
Failure
Jose Alvarez (jpalvarezl)
approved these changes
Oct 23, 2026
Eduard van Valkenburg (eavanvalkenburg)
had a problem deploying
to
github-app-auth
October 23, 2026 15:13 — with
GitHub Actions
Failure
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
github-app-auth
October 23, 2026 17:53 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 17:54 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 17:54 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
temporarily deployed
to
integration
October 23, 2026 17:54 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
integration
October 23, 2026 17:54 — with
GitHub Actions
Active
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Oct 23, 2026
Eduard van Valkenburg (eavanvalkenburg)
deleted the
sk-httpplugin-url-safety
branch
October 23, 2026 19:30
This branch was successfully 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.
Motivation and Context
HttpPluginvalidates the DNS addresses for allow-listed hosts before sending a request, but previously discarded those validated addresses before opening the connection. The HTTP transport could therefore resolve the hostname independently at connection time.This change keeps validation and connection behavior consistent without redesigning the plugin or changing its explicit unrestricted/private-network opt-ins. No public issue is linked.
Description
aiohttpwith a host-scoped resolver that returns only those validated addresses.allow_all_domains/allow_private_network_accessopt-ins.Validation:
uv build— passed; source distribution and wheel built successfully.uv run --python 3.12 --frozen ruff check semantic_kernel\core_plugins\http_plugin.py tests\unit\core_plugins\test_http_plugin.py— passed.uv run --python 3.12 --frozen pytest -q tests\unit\core_plugins\test_http_plugin.py— passed (226 tests).uv run --python 3.12 --frozen pytest -q tests\unit\connectors\openapi_plugin\test_server_url_validator.py tests\unit\connectors\openapi_plugin\test_openapi_runner_dns_pinning.py— passed (91 tests).uv run --python 3.12 --frozen mypy semantic_kernel\core_plugins\http_plugin.py— passed.Contribution Checklist