Skip to content

docs: add NET-009 for Tailscale route capture of isolation-mode egress - #11815

Merged
lpcox merged 5 commits into
mainfrom
network-doctor/net-009-tailscale-route-capture-3c88fb602c84a777
Nov 19, 2026
Merged

lpcox merged 5 commits into
mainfrom
network-doctor/net-009-tailscale-route-capture-3c88fb602c84a777

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Caution

Protected files were modified in this change.
This pull request is in request-review mode and requires explicit human scrutiny before merge.

Protected files: README.md

Allow intentional protected-file changes

If this workflow is intended to modify these files, add specific filenames or folder prefixes to safe-outputs.create-pull-request.protected-files.exclude in the workflow Markdown frontmatter. For example, to allow .changeset/*, exclude the folder using .changeset/:

safe-outputs:
  create-pull-request:
    protected-files:
      policy: request-review
      exclude:
        - .changeset/

Keep your existing policy and exclusions. Folder exclusions use path prefixes, not glob patterns, and allow all files beneath that folder, including subfolders. Other protected files still require review. If allowed-files is configured, these paths must also match it. Run gh aw compile after updating the workflow.

Coverage

Finding added: NET-009

  • Boundary / status: network, workaround. Version scope: introduced unknown, fixed unknown.
  • Symptom: In network-isolation mode, every Squid CONNECT to an allowlisted API host returns 503 TCP_TUNNEL:HIER_NONE (server field -:-). The same workflow works in host-access mode, or in isolation mode without Tailscale.
  • Expected policy vs defect: A TCP_DENIED / 403 denial and an awf-net subnet collision (NET-006) are different causes. This record covers the case where host policy routing captures Squid's own egress.
  • Root cause (single-reporter analysis): A Tailscale step that accepts advertised subnet routes adds policy routes in table 52, ahead of the main table. One accepted subnet overlapped the runner's gateway path, so Squid's egress went into the tailnet interface. The record states this mechanism rests on one reporter. Only the route-acceptance change was validated.
  • Probe (read-only, secret-safe): ip rule show; ip route show table 52.
  • Action: Disable subnet route acceptance (tailscale up --reset --accept-routes=false) and use no exit node, before the AWF step. Otherwise keep accepted subnets from overlapping the gateway path. Keep the allowlist and DNS filtering unchanged, and do not widen egress.
  • Why it was missing: [awf] network: isolation/topology mode + Tailscale → Squid 503 TCP_TUNNEL:HIER_NONE on api.githubcopilot.com egress #6704 was closed as not planned. The runner catalog entry B17 describes the DNS-filtering theory (fix(dns): filter non-portable DNS in network-isolation + Tailscale #6705), which was later reverted (Preserve detected DNS resolvers in network isolation #7499) and was reported to be insufficient. No canonical network record captured the surviving routing cause.

Current-main evidence

Validation

  • npm run diagnostics:validate reports "Registry valid: 36 finding(s)".
  • npm run diagnostics:render was run, and only the docs/diagnostics/README.md index change is included.
  • The generated .github/agents/diagnose-awf.md and .github/workflows/shared/diagnosis-findings.md changes were deliberately left out of this PR for trusted CI or reviewer refresh.
  • No code, workflow, skill, agent or schema changes. No auto-merge.

Generated by Network Doctor Updater · copilot · routed: sonnet55 high · ~87 AIC · ⌖ ~2 AIC · ⊞ 6K · ◷

@github-actions github-actions Bot added ai-generated documentation Improvements or additions to documentation labels Nov 19, 2026
@lpcox

lpcox commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main and resolve conflicts

…9-tailscale-route-capture-3c88fb602c84a777

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@copilot merge main and resolve conflicts

Merged main cleanly; the two-parent merge commit is 6751d06.

Copilot AI requested a review from lpcox November 19, 2026 14:51

Copilot AI commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@copilot merge main and resolve conflicts

Merged main cleanly; the two-parent merge commit is 522d430.

@lpcox
lpcox marked this pull request as ready for review November 19, 2026 15:41
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 15:41
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Documentation Preview

Documentation has been built for this PR.

Download preview artifact

To view locally:

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

Built from commit 7d942d9

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.

🟡 Changes recommended

Both generated diagnosis catalogs still omit NET-009, causing the read-only freshness check to fail until a trusted reviewer regenerates and commits them.

3 open issues
What changed in this PR

Adds NET-009 to AWF’s diagnostic registry for suspected Tailscale route capture affecting network-isolation egress, distinguishing it from allowlist denials and subnet collisions.

Changes:

  • Documents symptoms, a routing probe, workaround guidance, and supporting references.
  • Adds NET-009 to the generated finding index and symptom lookup table.
  • Leaves runtime code unchanged.
File Description
docs/​diagnostics/​README.md Adds NET-009 to the finding and symptom indexes.
docs/​diagnostics/​findings/​network/​NET-009.json Defines the routing diagnosis, evidence limits, probe, and workaround.

Review effort: Balanced (adaptive)

Comment thread docs/diagnostics/README.md Outdated
| NET-006 | network | awf-net subnet collides with host or cluster DNS resolver or routes | workaround | [`findings/network/NET-006.json`](./findings/network/NET-006.json) |
| NET-007 | network | Compose refuses to start because a leftover awf-net belongs to another project | fixed | [`findings/network/NET-007.json`](./findings/network/NET-007.json) |
| NET-008 | network | Denied hostname lookups reach the resolver because a Squid IP exception resolves names | fixed | [`findings/network/NET-008.json`](./findings/network/NET-008.json) |
| NET-009 | network | Network-isolation egress fails with HIER_NONE after the host accepts overlapping Tailscale routes | workaround | [`findings/network/NET-009.json`](./findings/network/NET-009.json) |
Comment on lines +23 to +24
"command": "ip rule show; ip route show table 52",
"expect": "A policy rule whose lookup is table 52 that precedes the main table, with routes that overlap the runner's default gateway subnet, indicates this cause. An absent table 52 or non-overlapping routes rules it out and points to NET-002 or NET-006. Both reads expose host routing only and no credentials, and no traffic is sent.",
"readOnly": true,
"secretSafe": true
},
"action": "Before the AWF step, reconfigure Tailscale so it does not accept advertised subnet routes (for example tailscale up --reset --accept-routes=false) and do not configure an exit node; direct tailnet peer connectivity for private MCP servers was reported to keep working. If subnet routes are required, make sure none overlaps the runner gateway path or covers the default route, or use Tailscale userspace networking for private endpoints only. Keep the domain allowlist and DNS filtering unchanged, do not switch to a wildcard allowlist, and do not run AWF with extra host network capabilities to rewrite host routes. Report persistent HIER_NONE with redacted routing output instead of widening egress.",
@lpcox

lpcox commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@copilot address review feedback

Copilot AI commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

@copilot merge main and resolve conflicts

main is already included in merge commit 6751d06; the freshly fetched main is its parent.

@copilot address review feedback

Addressed the routing probe and Tailscale workaround in 7509f7b, and regenerated the workflow catalog and index. The restricted agent catalog still needs a trusted refresh before full parity can pass.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor Author

✅ Copilot review passed with no inline comments.

@github-actions[bot] Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox

lpcox commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@copilot merge main and resolve conflicts

…9-tailscale-route-capture-3c88fb602c84a777

Co-authored-by: copilot-swe-agent[bot] <[email protected]>

Copilot AI commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

@copilot merge main and resolve conflicts

Merged main cleanly in 8588e0e; it is a two-parent merge commit.

@lpcox

lpcox commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

@merge main and resolve conflicts

@lpcox lpcox changed the title [docs] network-doctor: add NET-009 for Tailscale route capture of isolation-mode egress docs: add NET-009 for Tailscale route capture of isolation-mode egress Nov 19, 2026
- **Discriminating conditions:** AWF runs with network isolation, so Squid egresses through the dual-homed awf-ext bridge and the host routing tables · A Tailscale step runs on the runner and accepts advertised subnet routes (--accept-routes), which add policy routes in table 52 consulted before the main table · An accepted subnet may capture Squid's traffic to a resolver or API destination via the tailnet interface · A policy denial (TCP_DENIED / 403) or an awf-net subnet collision (NET-006) is a different cause and does not match · The route-capture mechanism comes from one reporter's analysis; only the routing-acceptance change below was validated
- **Root cause:** In network-isolation mode AWF delegates egress to the host network stack and does not install or pin host policy routes. A Tailscale step that accepts advertised subnet routes inserts policy-routing entries ahead of the main table; the reporter suspected an accepted subnet captured Squid's outbound connections or name lookups into the tailnet interface. The earlier theory that a non-portable resolver such as 168.63.129.16 was the sole cause was not sufficient: the resolver-filtering change was merged and later reverted, and the failure persisted until route acceptance was disabled. The mechanism rests on one reporter's investigation.
- **Safe probe:** `ip rule show; ip route show table main; ip route show table 52` → Compare the policy rules and table 52 with the main routes; this is preliminary evidence, not proof that Squid's traffic is captured or unaffected. For each affected resolver and API destination IP, perform a host-side `ip route get <destination-ip> from <squid-awf-ext-ip> iif <awf-ext-host-bridge>` lookup using Squid's actual source address and ingress bridge; include any applicable policy marks. A tailnet interface in the result supports route capture, but packet marks, NAT and firewall rules can affect the actual path. No matching route or an absent table 52 alone does not rule out routing or other causes such as NET-002 and NET-006. These lookups send no traffic; redact routing details before sharing.
- **Action:** Before the AWF step, if policy permits, disable acceptance of advertised subnet routes with `tailscale set --accept-routes=false`, preserving other Tailscale preferences. Direct tailnet peer connectivity for private MCP servers was reported to keep working. Deployments requiring subnet routes or exit-node egress must use a policy-approved alternative; consult the network administrator about routes covering affected resolver and API destinations or an approved isolated runner. Do not reset unrelated Tailscale settings or bypass a required exit node. Keep the domain allowlist and DNS filtering unchanged, do not switch to a wildcard allowlist, and do not run AWF with extra host network capabilities to rewrite host routes. Report persistent HIER_NONE with redacted routing output instead of widening egress.
@lpcox
lpcox merged commit 227a24c into main Nov 19, 2026
40 of 41 checks passed
@lpcox
lpcox deleted the network-doctor/net-009-tailscale-route-capture-3c88fb602c84a777 branch November 19, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants