Skip to content

fix(security): no paging contacts via impersonation/PAT, shared MCP probe caps, browser WebSocket egress, analytics key replay - #946

Merged
fclairamb merged 28 commits into
mainfrom
security/scan-specs-2026-11-19
Nov 19, 2026
Merged

fclairamb merged 28 commits into
mainfrom
security/scan-specs-2026-11-19

Conversation

@fclairamb

@fclairamb fclairamb commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Fixes from the daily security scan of 2026-11-19. Each fix carries a regression test that fails before it, plus a positive control.

What changed

  • Paging contacts (Medium, AR1). An impersonation session or a PAT can no longer add a paging contact, change a notification route or verify a contact. They get 403 IMPERSONATION_FORBIDDEN or PAT_FORBIDDEN, at the guard tables and in the service. Deleting a contact is still allowed.
    • A new email contact is verified at once only when it is the user's own verified sign-in email. Any other address must confirm an emailed code, and it is not paged until then.
    • The owner gets an email when a contact is added.
    • Also fixed: PatchRoute now checks that the route belongs to the caller.
  • MCP probe caps (Medium, AR2). The REST test run, the MCP probes, AI generation and ai_repair now share one limiter: 4 runs per process, 1 per org, and a single 20/min bucket per org. Probe browsers count against the test-run budget.
    • run_js_script, browser_snapshot and probe with kind=script|browser now need a write-capable token and the user role. fetch_page stays read-only.
  • Browser WebSocket egress (Medium, AR3, also closes T3). On enforcing workers, browser traffic now goes through a guarded per-session proxy, and Chrome can resolve no name except the pinned host. A connection to a private address is refused before it is made.
    • webSocketCreated events also poison the session: this is the fallback for a remote CDP Chrome that is not on the loopback.
    • The Kubernetes sidecar and Compose docs are updated.
  • Analytics key in replay (Low, AR4). The PostHog personal API key field is now excluded from session replay. The require-secret-input lint rule also catches api key and personal names.
  • Batch gate. The PAT integration tests now use a session token. make build-backend lint-back test, typecheck:e2e and lint:e2e are green. Full Playwright: 1052 passed, 2 failed, 15 skipped. The 2 failures come from main (email-check-max-delivery-delay, status-update-translations) and both passed on a fresh server.

Breaking changes and operator actions

  • PATs and impersonation sessions get 403 on the four contact and route routes.
  • Email contacts for other addresses must be confirmed before they are paged. Existing ones keep their verified stamp: there is no migration.
  • An mcp:read token, a viewer or the demo can no longer run script or browser probes.
  • Enforcing workers route browser traffic through the proxy.
    • Kubernetes: apply the new sidecar args (--remote-debugging-address=127.0.0.1, no containerPort).
    • Compose: use network_mode: "service:solidping" to get the connection-level block.

Decided by autopilot

  • 2026-11-19-02, "Should a member's own session still add a contact without re-authentication?": yes, the notice email is enough (recommended answer).
  • 2026-11-19-03, "Should the probes require the user role?": yes for run_js_script and browser_snapshot; fetch_page stays a read with the shared cap (recommended answer).
  • 2026-11-19-03, audit follow-up: ai_repair runs take the shared slot, and REST and MCP share one 20/min bucket per org ("the same limit").

🤖 Generated with Claude Code

@fclairamb
fclairamb enabled auto-merge (squash) November 19, 2026 06:39
fclairamb and others added 25 commits November 19, 2026 07:39
…mail contacts confirm a code

An impersonation session or a personal access token could add a notification
contact (or re-enable a route, or confirm a code) for its target, and that
contact kept receiving the target's escalation pages after the session ended
or the token was revoked.

- POST notification-contacts, PATCH notification-routes/{routeUid} and the
  verify / verify/confirm round trip are on the impersonation and PAT
  denylists, and the service refuses them too (IMPERSONATION_FORBIDDEN /
  PAT_FORBIDDEN). Deleting a contact stays allowed.
- PatchRoute checks the route belongs to the caller before enabling it.
- A new email contact is verified at once only when it is the member's own
  verified sign-in email. Any other address gets an emailed 6-digit code
  through the existing verify / confirm endpoints, and escalation and
  operator notices skip it until it is confirmed. Invalid addresses are
  refused.
- The account owner gets a "notification method added" email whenever a
  contact is added.

Existing email contacts keep their verified stamp.

Spec: specs/todos/2026-11-19-02-notification-contacts-impersonation-pat-guard.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
An email notification method for an address other than the sign-in email now
shows the "unverified" badge and the Verify button, and reuses the code
dialog of phone and WhatsApp contacts; it cannot be tested until confirmed.
The API reference documents the new rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…dd a paging contact to its target, which survives the session or the token

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…horing loop

The REST test run's admission control (4 runs per process, 1 per org) moves
to internal/testruns, built once in app and shared with the AI authoring
loop, whose runs now wait for a slot and count against the test-run browser
budget.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
run_js_script, browser_snapshot and probe kind=script|browser take the write
gates (mcp scope, user role, demo refusal), like POST .../checks/test-run;
fetch_page stays readable with mcp:read. Every probe is admitted by the
shared test-run limiter (1 per org at a time, 4 per process, 20 per org per
minute) and its browsers count against MaxTestRunBrowsers.

Breaking: an mcp:read token or a viewer can no longer run probe kind=script
or kind=browser.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s on the API node with no concurrency cap

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ucket

The REST route's own token-bucket middleware is replaced by the shared
testruns.Limiter.Allow, so an org gets 20 runs a minute across REST and MCP.
REST still answers 429 with Retry-After.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s on the API node with no concurrency cap

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ts included

Under an enforcing egress policy, each browser session now starts a guarded
HTTP/CONNECT proxy on the loopback and Chrome sends every connection through
it (--proxy-server with <-loopback>, or the isolated browser context's
proxyServer on a loopback CDP sidecar). A non-public destination is refused
before it is contacted, whatever the protocol: a page can no longer open a
WebSocket to an internal service and read its frames (scan finding AR3), and
plain requests to internal hosts (T3) never leave either.

A locally launched Chrome also gets deny-by-default resolver rules: only the
pinned navigation host maps to an address, everything else is ~NOTFOUND.

watchEgress now judges the host of every WebSocket the page creates
(Network.webSocketCreated) and poisons the session, which is the only
protection left for a remote Chrome that cannot reach the proxy (a compose
service on another host). Responses reported from the proxy's own address
are not judged: the guard already did.

Behaviour change: enforcing workers (SaaS default) carry browser traffic
through the in-process proxy; a remote CDP endpoint off the loopback keeps
the observe-and-poison behaviour only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The egress-policy page describes the per-session proxy and the
deny-by-default resolver rules, and the limits left for a remote Chrome
off the loopback. The Kubernetes sidecar binds DevTools to the pod's
localhost and no longer declares port 9222; the Compose page explains how to
share SolidPing's network namespace to get the proxy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Socket connections, so a page can read an internal WebSocket service

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ields

The SECRETISH pattern missed posthogPersonalApiKey, so the reveal-style
personal key input on Server > Analytics went unflagged. Widen it with
api[-_]?key and personal, and cover the new hits in the rule tests.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
The personal API key input on Server > Analytics toggles between password
and text but carried no no-capture marker, so a revealed key was recorded
in PostHog session replay. Add NO_CAPTURE_CLASS, as the sibling secret
fields do. The public project key and the integration header name are
not secrets: mark them with an explicit allow comment.

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
…n Server → Analytics is recorded in session replay

Co-Authored-By: Claude Haiku 5.5 <[email protected]>
… are denied (batch gate)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@codecov

codecov Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.42515% with 63 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.88%. Comparing base (a69424f) to head (a238163).

Files with missing lines Patch % Lines
...rver/internal/checkers/checkbrowser/egressproxy.go 84.95% 17 Missing ⚠️
server/internal/checkers/checkbrowser/session.go 69.38% 15 Missing ⚠️
server/internal/checkers/checkbrowser/checker.go 70.00% 9 Missing ⚠️
server/internal/handlers/auth/contact_notice.go 87.87% 4 Missing ⚠️
...ver/internal/handlers/usernotifications/handler.go 50.00% 4 Missing ⚠️
server/internal/mcp/tools_jsauthoring.go 94.23% 3 Missing ⚠️
server/internal/testruns/limiter.go 94.33% 3 Missing ⚠️
server/internal/aichecks/tools.go 81.81% 2 Missing ⚠️
...ver/internal/handlers/usernotifications/service.go 93.75% 2 Missing ⚠️
server/internal/egress/egress.go 93.33% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #946      +/-   ##
==========================================
- Coverage   90.89%   90.88%   -0.01%     
==========================================
  Files        1388     1392       +4     
  Lines      143361   143775     +414     
==========================================
+ Hits       130302   130664     +362     
- Misses      13051    13103      +52     
  Partials        8        8              
Files with missing lines Coverage Δ
server/internal/aichecks/repair.go 87.39% <100.00%> (+0.06%) ⬆️
server/internal/aichecks/service.go 88.14% <100.00%> (+0.53%) ⬆️
server/internal/app/server.go 92.15% <100.00%> (+0.03%) ⬆️
server/internal/email/supportreply.go 92.68% <ø> (ø)
...rver/internal/handlers/auth/impersonation_guard.go 100.00% <ø> (ø)
server/internal/handlers/auth/pat_guard.go 100.00% <ø> (ø)
server/internal/handlers/emailpreview/fixtures.go 100.00% <ø> (ø)
...internal/handlers/emailpreview/fixtures_account.go 100.00% <100.00%> (ø)
.../internal/handlers/emailpreview/fixtures_alerts.go 100.00% <100.00%> (ø)
...ver/internal/handlers/usernotifications/discord.go 92.07% <100.00%> (+0.41%) ⬆️
... and 19 more

... and 16 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@fclairamb fclairamb added the implemented Every spec of the PR is implemented and its batch gate was green label Nov 19, 2026
@fclairamb fclairamb changed the title fix(security): impersonation/PAT paging contacts, MCP probe caps, browser WebSocket egress, analytics key replay fix(security): no paging contacts via impersonation/PAT, shared MCP probe caps, browser WebSocket egress, analytics key replay Nov 19, 2026
@fclairamb
fclairamb merged commit 8d51875 into main Nov 19, 2026
38 checks passed
@fclairamb
fclairamb deleted the security/scan-specs-2026-11-19 branch November 19, 2026 09:13
fclairamb added a commit that referenced this pull request Nov 19, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.52.0](v0.51.0...v0.52.0)
(2026-11-19)


### Features

* **checks:** Pingdom TMS and Chrome Recorder import, named steps and
test runs, richer selectors and basic auth for JS browser checks
([#909](#909))
([1240c57](1240c57))
* **dash0:** switch the dashboard language with ?lang= on any URL
([#926](#926))
([c2640ae](c2640ae))
* **email:** maximum delivery delay, Date-header latency and
missed-probe detection
([#938](#938))
([8489326](8489326))
* **showcase:** cut the published video in any dashboard language
([#932](#932))
([d940da5](d940da5))
* **showcase:** take the dashboard stills in any dashboard language
([#925](#925))
([5104606](5104606))
* status updates in several languages, random first admin password,
Postgres Unix socket
([#939](#939))
([a69424f](a69424f))


### Bug Fixes

* **dash0:** chart dates follow the dashboard language
([#928](#928))
([eae2951](eae2951))
* **deps:** update github.com/dop251/goja digest to 0802ca1
([#920](#920))
([3524928](3524928))
* **deps:** update github.com/dop251/goja digest to 2eded47
([#911](#911))
([a8496d4](a8496d4))
* **deps:** update github.com/dop251/goja digest to 8dfece3
([#935](#935))
([98297e8](98297e8))
* **deps:** update go dependencies (non-major)
([#907](#907))
([41187dc](41187dc))
* **deps:** update go dependencies (non-major)
([#927](#927))
([fcef3fc](fcef3fc))
* **deps:** update go dependencies (non-major)
([#940](#940))
([0fd9228](0fd9228))
* **deps:** update module github.com/a2aproject/a2a-go/v2 to v2.9.0
([#922](#922))
([fe48c84](fe48c84))
* **deps:** update module github.com/posthog/posthog-go to v2
([#924](#924))
([eab03f2](eab03f2))
* **deps:** update module github.com/posthog/posthog-go to v2
([#929](#929))
([545e621](545e621))
* **deps:** update module github.com/posthog/posthog-go to v2
([#930](#930))
([82b03cc](82b03cc))
* **deps:** update module github.com/rabbitmq/amqp091-go to v1.17.0
([#916](#916))
([6974177](6974177))
* **deps:** update module
github.com/standard-webhooks/standard-webhooks/libraries to v1
([#931](#931))
([7b9d073](7b9d073))
* **deps:** update module golang.org/x/net to v0.63.0
([#923](#923))
([7d0fac9](7d0fac9))
* DMARC temperror cause, reaper regions, force-expanded group headers
([#934](#934))
([99f955d](99f955d))
* **i18n:** say "Check" instead of "Prüfung" in German
([#910](#910))
([696dcf8](696dcf8))
* **i18n:** translate generated incident, status-page and validation
text ([#913](#913))
([92bb05a](92bb05a))
* **security:** no paging contacts via impersonation/PAT, shared MCP
probe caps, browser WebSocket egress, analytics key replay
([#946](#946))
([8d51875](8d51875))
* **security:** per-org test-run slots, typed credentials of imported
transaction checks go to secrets
([#933](#933))
([51914b3](51914b3))
* **security:** Telegram bot membership and role checks, admin-only
email suppressions, mask import payload in replay
([#914](#914))
([55ffc4b](55ffc4b))
* Slack events after ack, region badge clicks, WHOIS deadline, legacy
agent warning, empty check groups
([#917](#917))
([65b00e2](65b00e2))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge autopilot implemented Every spec of the PR is implemented and its batch gate was green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant