Repository navigation
Add probaci serve, a local web UI - #46
Merged
Merged
Conversation
The CSS, scripts and icon webfont are icon-sets-sync's vendored set, copied byte for byte with its MANIFEST.sha256, so the two UIs share one pinned Tabler. third-party-notices.md carries the licences and goes into every release archive.
A localhost UI over the stage engine, built the way the other Go web UIs are: a one-time token exchanged for a session cookie, a Host allowlist, same-origin and CSRF checks, a strict CSP, fingerprinted embedded assets and an SVG favicon on every page. One run at a time, streamed over server-sent events, cancellable, and kept as JSON in XDG state. Under --read-only the routes that act are not registered.
Opens the web UI on 127.0.0.1:7844, taking the next free port when that one is busy. Every run builds a fresh App, so it rereads the configuration and writes its own log file, as probaci run does.
govulncheck found ten standard-library vulnerabilities in Go 1.25.14 that the web UI's net/http server reaches, each fixed only in 1.26.x, and one in x/net v0.55.0. x/net v0.60.0 itself needs Go 1.26, so the module's go directive moves with it. gosec moves to v2.30.0, which needed 1.26.
The cookie is Secure whenever the request came over TLS, and the default loopback server is plain HTTP, where a Secure cookie is never sent back. The redirect target has already passed isLocalURL.
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 free
to 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.
Summary
Adds
probaci serve, a web UI on this machine, as an option besiderunandtui. A bareprobacistill prints help.$XDG_STATE_HOME/probaci/runsand survive a restart; a run the server never finished comes back as canceled.It is built the way icon-sets-sync's and authama's web UIs are:
SameSite=Strictsession cookie. The server answers only its ownHostheader, and changes need a same-origin request carrying the session's CSRF token.MANIFEST.sha256.#066fd1square withrx=7on 32x32, white glyph) linked on every page, and also served at/favicon.ico.--read-onlydoes not register the routes that start or cancel a run./healthzneeds the token in a header. The port falls back to the next free one unless--portpins it, and a non-loopback--addrneeds--allow-remote.Each run builds a fresh
probaci.App, so it rereads the configuration and writes its own log file, the same asprobaci run. One run goes at a time.third-party-notices.mdcarries the embedded licenses and ships in the release archives. The commit hook requires lowercase Markdown names, so the name differs from icon-sets-sync'sTHIRD_PARTY_NOTICES.md.Tests
image/svg+xml, including on the 401 page;--read-only;go vet,go test -race ./..., golangci-lint (0 issues), gosec with CI's exclusions (0 issues), gitleaks (no leaks) andmake check-build.Toolchain: Go 1.26
The first CI run failed govulncheck and gosec, so two follow-up commits are on this branch:
net/httpserver reaches, each fixed only in 1.26.x, plus one ingolang.org/x/netv0.55.0. x/net moves to v0.60.0, which itself needs Go 1.26. So the module'sgodirective is now 1.26.0, and every workflow'sgo-versionis "1.26". gosec moves to v2.30.0, which the CI comment said to do with the Go bump. Anyone building probaci now needs Go 1.26.Secure) and the sign-in redirect. Both now carry#nosecwith the reason: the cookie isSecurewhenever the request comes over TLS, and the redirect target has already passedisLocalURL.All 10 checks are green on
b5f0d71.