Skip to content

test(server): cover DNS rebinding deployment guidance#105

Merged
leehack merged 4 commits into
mainfrom
test/security-deployment-docs-98
May 12, 2026
Merged

test(server): cover DNS rebinding deployment guidance#105
leehack merged 4 commits into
mainfrom
test/security-deployment-docs-98

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented May 12, 2026

Summary

  • Adds Streamable HTTP DNS rebinding coverage for allowlisted headers, blocked hosts, and blocked origins.
  • Documents safe local-development and production deployment recipes with explicit Host/Origin allowlists.
  • Updates compatibility-toggle guidance to avoid weakening DNS rebinding protection when migrating legacy clients.

Production-readiness scope

  • Users get tested DNS rebinding behavior for low-level StreamableHTTPServerTransport Host/Origin checks.
  • Supported paths in this PR: Streamable HTTP deployment docs and transport-level DNS rebinding tests.
  • Out of scope: full OAuth/PKCE end-to-end harness from test: add OAuth/security harness and deployment docs #98; this PR keeps the first slice small and reviewable.
  • Security defaults remain strict; examples keep enableDnsRebindingProtection: true and document explicit exceptions only for short-lived internal compatibility testing.

Test Plan

  • dart format test/server/streamable_https_test.dart
  • dart test test/server/streamable_https_test.dart
  • dart analyze
  • dart test
  • Static scan of staged added lines: no hardcoded secrets, dangerous exec, or raw URL logging patterns
  • Independent GPT-5.5 review: passed with no security or logic blockers

Refs #98

Copilot AI review requested due to automatic review settings May 12, 2026 10:18
@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.84%. Comparing base (a8675b2) to head (4dfe179).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
+ Coverage   80.64%   80.84%   +0.20%     
==========================================
  Files          43       43              
  Lines        5801     5801              
==========================================
+ Hits         4678     4690      +12     
+ Misses       1123     1111      -12     
Flag Coverage Δ
unittests 80.84% <ø> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR expands security-focused coverage and documentation for Streamable HTTP transports, specifically around DNS rebinding protections and safer deployment/migration guidance.

Changes:

  • Adds Streamable HTTP DNS rebinding tests covering allowlisted Host/Origin and blocked Host/Origin behavior.
  • Documents local-development and production deployment recipes with explicit Host/Origin allowlists.
  • Updates “strict defaults / compatibility toggle” guidance to discourage disabling DNS rebinding protection during migrations.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
test/server/streamable_https_test.dart Adds DNS rebinding protection tests using explicit Host/Origin header manipulation.
doc/transports.md Adds deployment recipes and revises compatibility guidance to keep DNS rebinding protection enabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/server/streamable_https_test.dart
Comment thread doc/transports.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread test/server/streamable_https_test.dart Outdated
Comment thread test/server/streamable_https_test.dart
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread test/server/streamable_https_test.dart Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@leehack leehack merged commit d40446c into main May 12, 2026
10 checks passed
@leehack leehack deleted the test/security-deployment-docs-98 branch May 12, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants