Repository navigation
Conversation
ryjen
left a comment
There was a problem hiding this comment.
Independent review of the eight-file dependency upgrade at 3064e971bf46abc378b1bae9ccad83bcb374838d:
- No code-level defect identified.
tailscale.com v1.105.0-pre.0.20261013225543-fb79793d99f5includes the merged netstack queue-saturation close fix; required Go toolchain bump, release build tags,go.mod/go.sum, and generated Nix metadata are kept in sync. - Direct regression evidence: 550 completed short-lived TCP sessions, server-first close; old dependency timed out on
Server.Close()in 2/2 repeated runs, patched dependency returned in ~2 ms in 6/6 runs. See the independent opt-in test in draft PR #2. - Qualification still required before merge: Nix build and cross-platform CI are unverified; GitHub Actions has zero runs/checks on this fork. The manually run Go suite, vet, module and diff checks passed, but are not a substitute for those gates.
- Scope: Keep the upstream submission dependency-only. The additional backend close-order and TIME_WAIT APIs in tailscale#151 warrant separate proposals. The optional integration test in PR #2 has a review finding and should not be bundled here.
The patch is suitable for an upstream draft PR, not yet approved for merge without CI evidence.
ryjen
left a comment
There was a problem hiding this comment.
Independent supply-chain review — PR #1 at 35b221f20
Validated: Five CycloneDX 1.6 application SBOMs parse correctly and match the five GoReleaser targets, all 76 release build tags, and Go 1.27.2. Dependency components carry selected versions and hash/license evidence; no local-machine paths or apparent secrets were embedded. Confirmed the two newly selected module-graph entries' licenses at their exact commits (bradfitz/reco and tailscale/tb: BSD-3-Clause; benbjohnson/immutable: MIT). Zero added runtime modules and three upgraded runtime modules per release target is accurately scoped. The module-level OpenPGP advisory is disclosed without asserting that the package is imported or reachable.
Review findings (before treating the SBOMs as an enforceable release control):
- No automated SBOM drift gate.
.github/workflows/test.ymlonly checksmake tidy, Go tests, and release cross-builds; it does not regenerate or compare CycloneDX inventories. A later dependency or build-tag change can leave committed SBOMs stale while CI remains green. Add a deterministic generation/validation target and an exact-head workflow check (or equivalent CI artifact+diff), ideally covering each release target. - No SBOM publication alongside actual releases.
.github/workflows/release.ymlinvokes GoReleaser;.goreleaser.yamlarchives include onlyLICENSEandREADME.md. Five committed source SBOMs aren't currently released with the binaries, Debian/RPM packages, or containers. Implement artifact-linked SBOM generation, attachment and container-image scanning separately before shipping. This is not a reason to bundle more changes into the immediate netstack fix. - Source revision/reproducibility mismatch. BOM main components identify
3064e97, while PR head is35b221f. The README deliberately discloses this snapshot, so it is not an inaccurate description; however, regeneration at the current head changes pseudoversions even when Go inputs are identical. The documented command also needsmkdir -p sbomwhen checking out3064e97, wheresbom/does not exist.cyclonedx-gomod appwas previously observed failing to identify the Git version from the linked.worktrees/checkout; document/use a full checkout or fix the tooling path. Define how exact-head attestations are created rather than depending on the previous code commit's pseudoversion. - Compatibility impact larger than module count suggests. The
tailscale.comupgrade spans 76 upstream commits across 268 changed files (including netstack/magicsock/DERP-related changes). The working 550-session regression supports the specific fix, but Nix, actual cross-builds, broad networking tests and upstream CI are still pending. The recorded vulnerability DB snapshot is from 2026-10-08; rescan at the final qualified head. - Contribution scope: The source SBOMs add ~8,335 generated lines to a very small dependency patch. Consider keeping full machine-readable BOMs as separately linked CI artifacts/release assets, with a concise manifest and audit in the PR, if upstream maintainers prefer a narrow dependency-only contribution.
Verdict: Approve the factual dependency inventory and the approach of separating application SBOMs by target, not yet the completeness of the release-level supply-chain gate. The dependency change can be submitted as an upstream draft; a production release or claim of continuous SBOM compliance requires closing items 1–4.
| - `govulncheck v1.9.0` (Go vulnerability database last updated **2026-10-08**) found **no identified reachable symbol-level vulnerability** in the checked Tailcat application. One **module-level finding**, [GO-2026-5932](https://pkg.go.dev/vuln/GO-2026-5932), concerns the unmaintained `golang.org/x/crypto/openpgp` package. `golang.org/x/crypto` is unchanged at `v0.57.0`, and the OpenPGP package is not imported by the checked application. This is pre-existing risk, not introduced by the upgrade. | ||
| - A separate [550-session close regression](https://github.com/ryjen/tailcat/pull/2) reproduces the old shutdown hang and passes using the updated dependency. | ||
| - The BOMs describe selected Go source dependencies for the specified build settings. They **exclude OS packages, Docker image contents, build tool dependencies, and verification of exact final release binary contents**. Generated license matches need human review. | ||
| - **Nix qualification, cross-platform compilation and GitHub Actions remain unverified.** Publish separate binary-derived SBOMs alongside final release artifacts, and scan released container images independently. |
There was a problem hiding this comment.
This limitation is acknowledged, but the release workflow and GoReleaser config currently do not generate, attach or gate on these files. Add a follow-up release control to emit final binary/image SBOMs and keep source-derived SBOMs synchronized with go.mod/build-tags changes via CI.
ryjen
left a comment
There was a problem hiding this comment.
Follow-up independent supply-chain review at exact head 35b221f20b39d72cd8611443b8cf46eca8e3f8fb.
The three prior review threads (SBOM root pseudoversion/exact-head binding; reproducible generator invocation; CI and release attachment) remain unresolved. There are two additional concrete coverage gaps:
- Go standard library omitted from the source SBOMs. Each file records Go 1.27.2 only as
cdx:gomod:build:env:GOVERSION, without a standard-library dependency component or dependency edge.cyclonedx-gomod appsupports-stdto explicitly include it. Including this helps downstream scanners that use BOM components rather than freeform metadata; regenerate the files, revalidate versions/licenses, and make any intentional exclusion explicit. - The recorded govulncheck result does not cover the release matrix. The source scan was performed on Linux amd64 without
GOFLAGS=-tags=$(cat build-tags.txt); the five SBOM targets used release tags, and Windows-specific code exists. State the exact scanner mode/OS/tags in the audit; repeat vulnerability scanning with the release-tag configuration and platform-aware coverage or explicitly document the scan gap rather than interpreting one result as a property of all distributed binaries.
Scope/context: The dependency is still functionally well justified by the reproducible 550-session old-vs-new shutdown test, but Tailscale's old-to-new upstream comparison includes ~76 commits/268 changed files, so one regression test and an unchanged list of Go module names do not equal comprehensive compatibility review. This supports upstream draft discussion, not immediate release approval. The five existing BOMs are valid source-derived snapshots but not a complete release-level security control.
ryjen
left a comment
There was a problem hiding this comment.
Final independent review at exact PR #1 head 84645457b58f1e3a5b66f48d7ebb0d9a4ca25ecf.
CI all green: supply-chain inventory run 39336219618 (SBOM + vulnerability jobs), Test run 39336219591 (Linux/macOS/Windows, release tags, tidy, FreeBSD/OpenBSD, WASM), Nix run 39336219402. All 11 reported jobs completed successfully. No new production-code defect or dependency-integrity failure found on re-review. The 550-connection regression remains in separate draft PR #2, which does not have standalone hosted CI at its non-main base.
Low-priority documentation correction: The README and PR description still say GitHub Actions, Nix, and cross-platform qualification have not run, despite the successful exact-head workflows. Update these before presenting the PR to upstream so maintainers don't have conflicting evidence.
Outstanding release qualification (correctly left open): source-derived SBOMs have no cryptographic binding to actual shipped binaries/Deb/RPM/container-image digests; the release workflow does not yet attach binary or image SBOMs. Also note that the SBOM root v0.0.0-sbom.<digest> is a deliberately synthetic source identity, not an actual published Go module version. Keep that distinction explicit for consumers of package URLs.
Verdict: Suitable to open as an upstream draft PR now; not an unconditional release sign-off. I recommend preserving the separation between this bug fix and optional regression/release-publishing work.
| - A separate **module-level** finding, [GO-2026-5932](https://pkg.go.dev/vuln/GO-2026-5932), concerns the unmaintained `golang.org/x/crypto/openpgp` package. `golang.org/x/crypto` is unchanged at `v0.57.0`; that OpenPGP package is not imported by the checked application. Keep it tracked as pre-existing dependency hygiene risk. | ||
| - A separate [550-session close regression](https://github.com/ryjen/tailcat/pull/2) reproduces the old shutdown hang and passes using the updated dependency. | ||
| - The BOMs describe selected Go source dependencies for the specified build settings. They **exclude OS packages, Docker image contents, build tool dependencies, and verification of exact final release binary contents**. Generated license matches need human review. | ||
| - **Nix qualification, actual cross-platform binary builds and GitHub Actions remain unverified.** A source SBOM freshness and vulnerability gate was added but has not yet run in hosted CI; the five-target vulnerability scans passed locally. Publish separate binary-derived SBOMs alongside final release artifacts, and scan released container images independently. The release workflow currently does **not** attach SBOMs to binary/package/container artifacts. |
There was a problem hiding this comment.
Outdated after exact-head CI success: GitHub Actions run 39336219618 passed both supply-chain jobs, run 39336219591 passed all Test jobs including release-target cross-builds, and run 39336219402 passed Nix. Please update this status and corresponding outdated statements in the PR description. The final binary/container SBOM gap remains outstanding.
ryjen
left a comment
There was a problem hiding this comment.
Performance/cache audit for the exact green head 3616b863 (GitHub runs 39340026414/425/435). No behavior change requested for the netstack fix itself.
P1: Nix cache key does not track application source revisions. .github/workflows/nix.yml uses hashFiles('flake.nix', 'flake.lock', 'go.sum') as a primary key. At this head the 430 MB primary cache restored successfully, but nix build still ran 239 s (62 s buildPhase, 165 s checkPhase), and the post-job cache action explicitly said "Cache hit occurred on the primary-key. Not saving a new cache." Because src = ./. varies by source commit while the primary cache key can stay constant, build/test outputs from subsequent commits may never enter the cache. Consider immutable, source-aware keys with a carefully scoped restore prefix and quota/retention policy, or an attested/shared Nix binary cache. Verify cold-vs-warm timing before claiming speedups; don't simply skip tests to make the Nix job green faster.
P2: Release cross-compilation dominates Test CI. The five target cross-builds execute sequentially in one job and took 232 s despite a restored ~373 MB setup-go cache. Consider bounded matrix/concurrent builds only if lower wall-clock latency matters more than runner minutes/cache duplication; preserve all five targets. The Linux test suite also spent ~109 s in go test and should retain its coverage.
Low priority: Supply-chain jobs already parallelize, finish in ~49–51 s, and restore Go build/module caches; SBOM binary download is ~1 s, so caching that binary is unlikely to beat its cache management overhead. govulncheck installation takes ~15 s, so a separate version-keyed tool cache would have modest payoff only after measuring restore costs. Add concurrency with PR-scoped cancellation if rapid pushes generate redundant in-flight runs; do not cancel main/release jobs or weaken vulnerability/manifest gates.
Review status: caching/performance improvements are recommendations rather than submission blockers. Source-derived final-artifact SBOM publishing remains a separate release-qualification gap.
ryjen
left a comment
There was a problem hiding this comment.
Follow-up review at exact head 8f2dccedb049ce6b456a92f6928d8dd2ba879504 — WebAssembly CI repair.
Failure evidence: In run 39345424435, TestBrowserSends evaluated window.tcTest.sendDone after navigation but before the application initialized window.tcTest, raising TypeError: Cannot read properties of undefined (reading 'sendDone'). The receiving test already guarded initial access.
Fix: 881ca3806 guards the poll with window.tcTest && window.tcTest.sendDone === true; it does not change the browser app, network implementation, completion semantics, or timeout. 8f2dccedb refreshes all five source SBOMs because the source digest deliberately includes tracked Go tests.
Exact-head qualification passed:
- Supply-chain: SBOM and vulnerability jobs successful.
- Test: all 8 jobs successful. Hosted Chrome
TestBrowserSendspassed (~1.87 s), as did the three other WebAssembly browser tests; Linux/macOS/Windows tests, release cross-builds, and FreeBSD/OpenBSD passed. - Nix: successful.
Locally, Go build/test (headless test compile), vet, five-target SBOM generation/check, and diff checks passed. No physical browser was available locally; hosted Chrome supplies that end-to-end evidence. PR #2 remains a single opt-in test-file delta.
Verdict: Browser-test repair validated; no new blocking code-level finding from this failure. Remaining separate release-security requirement: binary/package/container artifact-bound SBOM publication.
|
Release-stage artifact SBOM follow-up is now separated into fork PR #3, instead of expanding the Tailcat tailscale#151 dependency patch.
The original unresolved release-artifact review thread remains open by design; source-generated SBOMs in this PR remain distinct from final published artifact SBOMs. |
|
Release-SBOM follow-up advanced in separate draft PR #3 at
This work is intentionally separated from upstream shutdown fix PR #1. No version tag, GitHub release or registry image was published, and the release-artifact follow-up thread remains open until actual release verification. |
Purpose
Fix the Tailcat #151 netstack shutdown hang by upgrading
tailscale.comtov1.105.0-pre.0.20261013225543-fb79793d99f5, which includes the merged fix in tailscale/tailscale#21668. Update Go 1.27.2, synchronized dependency versions, Nix hashes and release tags. No production Go source changes.Dependency and supply-chain assessment
Detailed, reproducible findings:
sbom/README.md.github.com/bradfitz/recoandgithub.com/tailscale/tb; the new explicitgithub.com/benbjohnson/immutablerequirement already existed in the prior resolved graph. Their exact-version licenses were checked: BSD-3-Clause, BSD-3-Clause, and MIT.CGO_ENABLED=0and the 76 release build tags, contain zero new runtime Go modules. The only runtime upgrades aretailscale.com,github.com/tailscale/wireguard-go, andgolang.org/x/net. The upstream Tailscale module upgrade is nevertheless broad (~76 commits/268 files), so CI and release qualification matter.[email protected]with documented manual BSD-3-Clause attribution. Linux targets have 39 dependency components each; Windows targets 36 each.tool/sbom/standard-library-only Go generator normalizes the application identity using a SHA-256 digest of tracked Go sources,go.mod,go.sum, build tags and release config, avoiding stale Git pseudoversions from documentation-only changes. It regenerates cleanly from Git worktrees. Localgenerateandcheckpasses are recorded, including a negative test that rejected a deliberately altered SBOM..github/workflows/supply-chain.ymluses pinned Go and a SHA-256-verified SBOM generator v1.12.0, checks all five inventories for freshness on PRs and main pushes, and repeats symbol-levelgovulncheck v1.9.0for all five release configurations. Current head8f2dccedbpassed all three exact-head workflows: Supply-chain inventory, Test (all 8 jobs including browser regression), and Nix.Security and regression evidence
go mod verify, fullgo test -p 2 -count=1 -timeout=120s ./...,go vet -p 2 ./...,go mod tidy -diff,git diff --checkpassed on the original dependency change.govulncheck v1.9.0 -scan=symbolpassed on Linux amd64/arm64/armv7 and Windows amd64/arm64 with release tags, reporting zero reachable findings for the executable in the checked Go vulnerability DB snapshot. The pre-existing module-level GO-2026-5932 advisory relates tox/crypto/openpgp, which is not imported by this executable; thex/cryptomodule is unchanged.Status, scope, and outstanding gates
The SBOM generation and source-level vulnerability review are locally validated; review threads for reproducibility, standard-library inventory, and five-target scans have been resolved. Still required before release: binary/package/container-derived SBOMs bound to the SHA-256 digests of final distributed assets. Existing source-derived SBOMs do not establish the contents of final binaries or container images. The release-attachment review thread intentionally remains open until implemented.
Submission: Open the upstream draft PR comparison; the connected GitHub integration cannot create a PR in
tailscale/tailcat. Do not merge the fork PR directly intomain. Issue tailscale#151 contains additional lifecycle proposals beyond this dependency update.Go tooling migration (2026-10-19)
tool/sbom/, consistent with the existingtool/updateflakesandtool/directtestdirectories; no newgo.moddependencies.go run ./tool/sbom generate; verify:go run ./tool/sbom check. CI now invokes the Go verifier.go vet ./tool/sbompassed locally; regenerated all five CycloneDX inventories, then reran the freshness check successfully. Intentionally tampering with an SBOM caused verification to fail, and the original inventory was restored.0b64917a6; refreshed BOM commit:3616b8632. The optional test-only PR test: opt-in 550-connection netstack shutdown regression (#151) #2 remains separate and contains onlyclose_regression_151_test.gorelative to the updated base.3616b863.PR CI cache/performance correction (2026-10-19)
dee5ed996updates the Nix cache primary key to include**/*.go,go.mod,go.sum,flake.nix,flake.lock,flakehashes.json, andbuild-tags.txt; restore prefix and 4 GB garbage-collection limit are preserved. The prior unchanged primary key prevented saving freshly built outputs even when the source derivation changed. Source-aware immutable keys allow incremental revisions to save their new output after restoring an older toolchain cache. Cache usage is subject to GitHub retention and LRU eviction.Browser-test startup race (2026-10-19)
dee5ed996, the WebAssemblyTestBrowserSendsjob failed because Chrome evaluatedwindow.tcTest.sendDonebeforeweb/app.jsinitializedwindow.tcTest, producingTypeError: Cannot read properties of undefined (reading 'sendDone'). Other seven Test jobs passed.881ca3806useswindow.tcTest && window.tcTest.sendDone === truein the browser poll, preserving real send completion while avoiding the initialization exception. No production JavaScript/Go code or timeouts changed.8f2dccedb, because the source fingerprint includes Go test files.TestBrowserSendspassed in hosted Chrome in ~1.87s. PR test: opt-in 550-connection netstack shutdown regression (#151) #2 is synchronized and its diff remains one opt-in regression-test file.