Uh oh!
There was an error while loading. Please reload this page.
feat(installer): preflight network profile — proxy + TLS-inspection read (#582) - #590
Merged
Conversation
…ead (#582) Child 1/4 of #578. On a restricted/corporate network the installer dove straight into the long work and only failed minutes in, with no up-front sense of what the network allows. Add a fast, bounded, non-fatal network probe that runs BEFORE the endpoint checks and prints a plain-language "network profile" line: - Explicit proxy detected from the environment (HTTPS preferred), announced as a bare host:port with any user:pass credentials stripped (PII-free, #576). - A configured corporate CA bundle (TRACEBLOC_CA_BUNDLE / CURL_CA_BUNDLE) announced. - TLS inspection detected affirmatively (best-effort): read the issuer of the cert served for a well-known public host (through the proxy when set); a non-public issuer means a corporate CA is re-signing TLS. Bounded and non-hanging — bash needs openssl + a timeout tool (else "unknown"); PowerShell uses .NET with an 8s timeout and a scoped, restored cert-validation callback. A plain direct connection stays silent (the reachability lines already confirm egress). The existing break-and-inspect hint keeps owning the actionable CA fix. Cross-platform with one-to-one copy (preflight.sh _pf_network_* / install-k8s.ps1 Show-NetworkProfile). preflight.sh + install-k8s.ps1 are manifested; manifest regenerated. Tests: 9 bats + 7 Pester covering credential stripping, proxy precedence, issuer classification, the silent-direct path, and the noteworthy line. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
# Conflicts: # scripts/manifest.sha256 # scripts/tests/install-k8s.Tests.ps1
Uh oh!
There was an error while loading. Please reload this page.
…cated proxy (#582) Bugbot (Medium): the network profile stripped proxy credentials for DISPLAY (correct, PII-safe) but reused that stripped host:port for the probe's own CONNECTION. On an authenticated corporate proxy the HEAD/CONNECT then 407s, issuer capture fails, and the profile returns "unknown" — so inspection is never reported on the exact TLS-inspecting networks the probe exists to detect. Connect with the real credentials; keep display stripped: - preflight.sh: add _pf_env_proxy_raw (verbatim env value). _pf_detect_tls_inspection passes -proxy host:port plus -proxy_user/-proxy_pass (openssl >= 3.0) when the proxy carries credentials. _pf_env_proxy / the profile line stay credential-stripped. - install-k8s.ps1: add Get-EnvProxyRaw. Get-TlsInspectionState builds the WebProxy from the raw URL and sets WebProxy.Credentials (NetworkCredential) when UserInfo is present; Show-NetworkProfile still uses the stripped Get-EnvProxy for the printed line. Credentials reach openssl / the WebProxy only — never printed or logged. Tests: bash + Pester assert the raw helper preserves creds while display strips, that the openssl CONNECT carries -proxy_user on an auth proxy (with the password absent from the result), and that the probe uses the credentialed proxy while the display path does not. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 975516c. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Four Bugbot follow-ups on the bash credential-passing added last commit: - [High] Password no longer sits in openssl argv (visible via ps / /proc/*/cmdline): pass it via env: — openssl reads $_TB_PROXY_PASS, exported ONLY inside the probe's command-substitution subshell, so it never reaches argv or the parent shell. - [Med] The issuer pipeline is guarded with `|| issuer=""`, so a failed/timed-out probe returns "unknown" instead of aborting _pf_detect_tls_inspection under `set -euo pipefail` (mirrors _pf_probe_url). The bats setup now stubs the probe by default (like _pf_probe_url) so connectivity tests never hit the real github.com; the real-probe tests source preflight.sh fresh in a subshell. - [Med] Username-only proxies (http://user@host, no password) no longer reuse the username as the password — split on ':' only when present. - [Med] Proxy credentials are URL-decoded (_pf_urldecode) before use, matching the PowerShell peer's Uri.UnescapeDataString, so %-encoded secrets authenticate the same on Linux and Windows. Tests: url-decode parity, env:-not-argv (password absent from openssl argv), username-only-not-reused, and the openssl-absent "unknown" guard — all sourcing the real probe in a hermetic subshell. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
saadqbal
approved these changes
Aug 4, 2026
Uh oh!
There was an error while loading. Please reload this page.
LukasWodka added a commit
that referenced
this pull request
Aug 4, 2026
Re-resolves the recurring install-k8s.ps1 + manifest conflict; re-applies the two -Encoding UTF8 log-writer edits on develop's tip and regenerates the R8 manifest.
This was referenced Aug 5, 2026
LukasWodka added a commit
that referenced
this pull request
Aug 5, 2026
…#589) (#600) Bugbot on the staging mirror flagged 4 issues in the corporate-proxy / TLS- inspection probe (from #590/#582): - HIGH: the TLS probe cleared an already-captured issuer via `|| issuer=""`; openssl s_client often exits non-zero (SIGPIPE after x509) even on a good handshake, so MITM networks read as 'unknown'. Use `|| true` (empty capture is still caught below). - proxy password url-decode ran the whole string through printf '%b', mangling literal backslashes; escape them first so only percent-escapes expand (PS parity). - `openssl -help | grep -q` under pipefail dropped -proxy_user on authenticated proxies (grep -q closes the pipe, openssl gets SIGPIPE); capture then match. - PS Get-TlsInspectionState: [System.Uri] rejected schemeless proxy.corp:8080; prepend a scheme like the display path already does. Regenerated the R8 manifest for the install-k8s.ps1 change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What & why
Closes#582 (child 1/4 of #578, network resilience — ships independently).
On a restricted/corporate network the installer dove straight into the long work and
only failed minutes in, with no up-front sense of what the network allows. This adds a
fast, bounded, non-fatal preflight network probe that runs before the endpoint
checks and prints a plain-language "network profile" line, so the user sees what's
happening instead of dying later.
What it detects (and prints)
Runs at the start of the connectivity check; a plain direct connection stays silent
(the reachability lines already confirm egress). When noteworthy, one line, e.g.:
host:portwith anyuser:passcredentials stripped (PII-free, per Installer must never expose tracebloc internals or user PII in logs/output #576).TRACEBLOC_CA_BUNDLE/CURL_CA_BUNDLE).for a well-known public host (through the proxy when one is set); a non-public issuer
means a corporate CA is re-signing TLS. This catches inspection even when it's
working (CA trusted) — the case the existing
tls-failure path never surfaces.Bounded / never hangs / never fatal
openssland a timeout tool (timeout/gtimeout), else returnsunknown— we never run an unboundedopenssl s_clienta blackholed :443 could hang.HttpWebRequestwith an 8s timeout and a scoped, restoredserver-certificate-validation callback (captures the issuer, then reverts).
actionable CA fix guidance.
Cross-platform, one-to-one
preflight.sh(_pf_network_profile+_pf_env_proxy/_pf_env_ca_bundle/_pf_issuer_is_public/_pf_detect_tls_inspection) ↔install-k8s.ps1(
Show-NetworkProfile+Get-EnvProxy/Get-EnvCaBundle/Test-IssuerIsPublic/Get-TlsInspectionState) with identical copy.Tests
classification (public vs corporate), the silent-direct path, the noteworthy line, and
the
unknown-when-openssl-absent (never-hangs) guard.preflight.bats118/0; manifest--check, check-facts, check-style all clean.(
preflight.sh+install-k8s.ps1are manifested —manifest.sha256regenerated.)Notes
Note
Low Risk
Installer-only informational preflight; bounded probes with credential handling tested; does not change cluster install or auth paths.
Overview
Adds a non-fatal, bounded network profile step at the start of installer preflight connectivity checks (bash
preflight.shand PowerShellinstall-k8s.ps1), before endpoint probes.When the environment is noteworthy, users see one plain-language line (proxy as stripped
host:port, optional corporate CA bundle path, and best-effort TLS inspection via issuer heuristics ongithub.com). Plain direct connections stay silent. Proxy credentials are stripped from output/logs but retained for probe connections (authenticated proxies, opensslenv:password on bash).Exports state for later reuse (
PF_NET_*/$script:Net*). Includes bats/Pester coverage and updatedmanifest.sha256.Reviewed by Cursor Bugbot for commit a5b2d5b. Bugbot is set up for automated code reviews on this repo. Configure here.