Skip to content

Prevent DNS leaks from Squid IP access exceptions - #11562

Merged
lpcox merged 2 commits into
mainfrom
copilot/resolve-dns-leak-issue
Nov 14, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/resolve-dns-leak-issue

Conversation

@lpcox

@lpcox lpcox commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Squid evaluated destination-IP exceptions before rejecting unlisted domains, resolving attacker-controlled hostnames even when HTTP access was denied. This exposed a DNS exfiltration path in default-mode runs.

  • DNS-free IP exceptions: Add -n to API-proxy and explicit-IP destination ACLs:
    acl allow_api_proxy_ip dst -n 172.30.0.30
    
    Literal-IP access remains permitted; hostnames cannot inherit an IP exception through DNS resolution. Existing source exemptions and rule ordering remain unchanged.
  • Regression coverage: Require numeric-only matching in generated ACLs.
  • Documentation: Explain the leak mechanism and distinguish this mitigation from filtering direct DNS queries or allowlisted-name lookups.

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@lpcox lpcox changed the title [WIP] Fix DNS leak caused by proxy name resolution Prevent DNS leaks from Squid IP access exceptions Nov 13, 2026
@lpcox
lpcox marked this pull request as ready for review November 13, 2026 23:58
Copilot AI dynamic review requested due to automatic review settings November 13, 2026 23:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The security-sensitive ACL change needs runtime validation on Squid 7.6 to confirm denied HTTP/CONNECT hostnames emit no DNS queries while literal-IP and sidecar access remain functional; generated-config assertions alone cannot establish this.

No open issues 🎉

What changed in this PR

Addresses #11561 by preventing Squid’s destination-IP access exceptions from resolving unlisted hostnames before denying access, closing that DNS leak path in AWF’s generated egress policy.

Changes:

  • Add dst -n to API-proxy and explicit-IP exceptions while preserving rule ordering and source exemptions.
  • Add regression assertions for numeric-only destination matching.
  • Document the leak mechanism and distinguish this mitigation from broader DNS filtering.
File Description
src/​squid/​config-sections.ts Makes destination-IP exceptions match literal IPs without DNS resolution.
src/​squid/​config-sections.test.ts Adds assertions for numeric-only API-proxy and allowlisted-IP ACLs.
src/​squid-config-policy.test.ts Updates the API-proxy ACL expectation.
src/​squid-config-core.test.ts Updates generated explicit-IP ACL expectations.
docs/​egress-filtering.md Explains the mitigation, its scope, and remaining DNS-filtering needs.

Review effort: Max (dynamic)

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@github-actions

Copy link
Copy Markdown
Contributor

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

  1. Download the docs-preview-pr-11562 artifact from the workflow run
  2. Unzip and open index.html in your browser

Built from commit b93993c

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

Smoke Codex

Outcome: reported_action

The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Smoke Codex · gpt54 · ~16 AIC · ⊞ 22.5K · ◷

🔮 The oracle has spoken through Smoke Codex

@github-actions

Copy link
Copy Markdown
Contributor

Testing chroot feature Smoke Chroot is validating functionality...

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Smoke Cloud Hypervisor completed. Cloud Hypervisor + Copilot passed.

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Security Guard has started processing this pull request

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🔌 Smoke Services — All services reachable! ✅

🔌 Service connectivity validated by Smoke Services

@github-actions

Copy link
Copy Markdown
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Copilot BYOK completed. Copilot BYOK mode operational. 🔓

🔑 BYOK report filed by Smoke Copilot BYOK

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Build Test Suite has started processing this pull request

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

✅ Smoke Claude passed

Generated by Smoke Claude for #11562

@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅

🛡️ Egress verdict from Smoke Copilot Network Isolation

@github-actions

Copy link
Copy Markdown
Contributor

📡 Smoke OTel Tracing is starting OTel tracing validation...

@github-actions

Copy link
Copy Markdown
Contributor

✅ Smoke Test: Copilot Network Isolation - PASS

Both egress isolation checks passed:

Check Result Details
Allowed domain ✅ PASS https://api.github.com/zen returned HTTP 200
Denied domain ✅ PASS (example.com/redacted) was blocked (SSL certificate rejection)

Overall Result: PASS

EGRESS_RESULT allow=pass deny=pass

The firewall is correctly isolating egress traffic—allowing configured domains and blocking non-whitelisted domains.

🛡️ Egress verdict from Smoke Copilot Network Isolation
Add label ready-for-aw to run again

@github-actions github-actions Bot added the smoke-copilot-network-isolation Copilot network-isolation egress smoke test label Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Cloud Hypervisor + Copilot smoke test

  1. Merged PR lookup: PASS
  2. github.com connectivity: PASS (HTTP 200)
  3. File write/read: PASS
  4. example.com blocked: PASS (HTTP 000)

Overall: PASS

Cloud Hypervisor + Copilot smoke test by Smoke Cloud Hypervisor
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Services smoke test: ✅ Redis PONG · ✅ pg_isready · ✅ SELECT 1. Overall: PASS

🔌 Service connectivity validated by Smoke Services
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Claude Engine Validation

Check Result
API status ✅ PASS
gh check ✅ PASS
File status ✅ PASS

Overall result: PASS

Generated by Smoke Claude for #11562 · claude · haiku45 · ~14 AIC · ⊞ 6.3K · ◷
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test: Copilot BYOK (Direct) Mode

✅ GitHub MCP connectivity
✅ github.com HTTP 200
✅ File write/read test
✅ BYOK inference via api-proxy → api.githubcopilot.com

Running in direct BYOK mode (COPILOT_PROVIDER_API_KEY).

Status: PASS

🔑 BYOK report filed by Smoke Copilot BYOK
Add label ready-for-aw to run again

@github-actions

Copy link
Copy Markdown
Contributor

Smoke Test

  • Prevent DNS leaks from Squid IP access exceptions
  • Use published AWF images for the firewall issue dispatcher
  • Merged PR read: ✅
  • PR detail read: ✅
  • Playwright title check: ❌
  • File write/read: ✅
  • Build AWF: ✅
  • Overall status: FAIL

🔮 The oracle has spoken through Smoke Codex
Add label ready-for-aw to run again

@lpcox
lpcox enabled auto-merge (squash) November 14, 2026 01:59
@lpcox
lpcox disabled auto-merge November 14, 2026 02:18
@lpcox
lpcox merged commit 6609dce into main Nov 14, 2026
134 of 147 checks passed
@lpcox
lpcox deleted the copilot/resolve-dns-leak-issue branch November 14, 2026 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A host name the proxy refuses is still resolved, so it leaves the runner in a DNS query

3 participants