Skip to content

Capture ts ip -4 before taking its first line in manage verify - #876

Merged
nedtwigg merged 2 commits into
mainfrom
fix/installer-ts-ip-capture
Oct 1, 2026
Merged

nedtwigg merged 2 commits into
mainfrom
fix/installer-ts-ip-capture

Conversation

@dormouse-bot

Copy link
Copy Markdown
Collaborator

manage verify on macOS and Linux picked the Tailscale IPv4 for its plaintext-reachability probe with ts ip -4 2>/dev/null | head -1 (install-macos.sh:902, install-linux.sh:1131). security-remote.md -> "Network posture" forbids that shape: a head -1 that exits first can SIGPIPE the CLI, so every search over Tailscale output must run over text captured first. The nightly audit flagged it in #873. With || true and a one-line output, no wrong verdict was reachable today, but nothing would have caught the next site.

Both installers now capture the output and keep its first line with ${tsip%%$'\n'*}, the idiom serve_root_target already uses. A new forbidden rule in scripts/deploy-lint.mjs fails on any tailscale/ts command piped into head or grep -q, with Windows skipped because it already matches over captured Invoke-Tailscale strings. The rule reports both old sites, passes on the fixed installers, and deploy-lint-selftest.mjs confirms it goes red on the appended violation. installer-verify-test.mjs and bash -n pass on both files.

This settles the last of the three FAILs in #873; #874 and #875 take the other two.

Refs #873 — automated triage

Both Unix installers piped Tailscale CLI output into head -1 for the
plaintext-reachability probe, the shape security-remote.md's Network
posture forbids. They now capture first and cut the first line with a
parameter expansion, and deploy-lint forbids the piped shape.

Refs #873
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Deploying mouseterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1fee8b9
Status: ✅  Deploy successful!
Preview URL: https://abe99fa9.mouseterm.pages.dev
Branch Preview URL: https://fix-installer-ts-ip-capture.mouseterm.pages.dev

View logs

@nedtwigg nedtwigg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed the capture-then-first-line change against the pipefail invariant and the generic forbidden-rule mutation coverage. Corrected the stale spec claim that deploy-lint has only one forbidden rule. Installer lint/self-tests, verification helpers, shell syntax, and fresh CI passed; bot self-review found no new issues.

@nedtwigg
nedtwigg merged commit 69f91e6 into main Oct 1, 2026
11 checks passed

This branch is waiting to be deployed

1 waiting deployment
hosted-preview — 1fee8b95 Waiting Oct 1, 2026 by nedtwigg via cleanup #649
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