Skip to content

v0.76.0 Litmus: the read-only diagnostics palette (stacked on #186) - #187

Open
agit8or1 wants to merge 6 commits into
mainfrom
diagnostics-palette-0.76
Open

agit8or1 wants to merge 6 commits into
mainfrom
diagnostics-palette-0.76

Conversation

@agit8or1

Copy link
Copy Markdown
Owner

Stacked on #186 (0.75.0 Spanner). It will be rebased onto main once #186 merges. Until then this diff also shows #186's commits.

0.76.0 Litmus: the read-only diagnostics palette

This is the P0 item Remote PowerShell: an approved, noninteractive command palette for common read-only diagnostics (roadmap row 3 in docs/rmm-expansion-audit.md).

It adds thirteen read-only checks to the existing diagnostics catalog and changes nothing about how a check runs. It uses the same request route, heartbeat delivery, device secret, scope, capability, containment, audit, expiry and limits. It adds no action, involves no signer and no new route, and nothing in it changes the computer.

Group Checks
Security Windows support (worked out on the server from a static end-of-servicing table), Microsoft Defender, Windows Firewall, BitLocker (protector kinds only, never recovery keys), Secure Boot and TPM, local administrators (names only)
Networking DNS lookup and TCP port test (both take typed parameters), routes
Maintenance Time sync (w32tm /query /status), Windows activation, unexpected shutdowns (events 41, 6008, 1001), scheduled tasks, signed-in users. Reboot status is now interpreted too
  • Interpretation. Every result is turned into findings marked Healthy, Warning, Critical, Unknown or Unsupported, each with the time of its evidence. This is done by a pure module, interpret.ts. Unknown and Unsupported are never shown as Healthy.

  • Diagnostics tab. The checks are grouped. There is a "Run all security checks" button, forms for the DNS and TCP parameters, and a label on each new check: "Tested only on GitHub's Windows Server runner".

  • Tools panel. The Security placeholder that said the checks were coming later is replaced by the real tools.

  • Typed parameters. They are allowed for dns_lookup and tcp_port only, and both keys need computers:connect. The parameters are checked:

    • by the portal, when the check is requested and again when it is delivered;
    • by the database (migration 0092's CHECK);
    • by the agent.

    The host-name regex is the same text in TS, PowerShell and SQL.

  • Not a new agent build. The checks are heartbeat-script functions. Standard agents get them when they are reinstalled or updated. Signed agents get them at the next rem0te-signed-publish. An agent older than 0.76.0 is refused with DIAGNOSTIC_NEEDS_NEWER_AGENT.

  • Invariants. New section §86 covers the read-only allowlist, the single exec site, the never-read fields, the regex being identical in all three places, the parameters CHECK and the capability. §20 is amended for parameters. The build-time guard assertPaletteBlockSafe runs on every served script.

Evidence: the Windows lab only, never on a desktop or the fleet. The new agent-lab-windows (diagnostics palette) job runs the block as it is served, for real, on windows-latest under PowerShell 5.1. It runs it as the administrator and again as SYSTEM, takes a fingerprint before and after to show nothing changed, and keeps Windows Update pointed at a dead WSUS.

Tests

  • unit-diagnostics-palette.mjs (new, in CI)
  • e2e-diagnostics-palette.mjs (new, port 4011, in run-e2e.sh)
  • updated unit-diagnostics-catalog, unit-system-inventory, unit-device-tools, e2e-diagnostics-catalog and e2e-ui
  • the lab job above

Deploy notes (not deployed)

This includes a schema change, migration 0092: run migrate deploy, rsync prisma/, then prisma generate at the target. After committing, run rem0te-signed-publish so signed agents pick up the checks.

🤖 Generated with Claude Code

agit8or1 and others added 6 commits November 20, 2026 22:33
Tools beside Connect lists 30 tools in eight groups (Diagnostics,
PowerShell / Scripts, Services & Processes, Software, Windows Updates,
Networking, Security, Maintenance). Each tool opens the flow that already
does it and runs nothing itself. Each shows its state and the reason
(available, needs approval, needs a newer agent, unsupported here,
paused, not reporting, not permitted, not set up, unavailable, coming
later), decided by one pure module, apps/web/lib/device-tools.ts.

No new agent, action, signer change or route. GET /containment/banner
rows now carry businessId. New: unit-device-tools.mjs (in CI), toolsPanel
in e2e-ui.mjs and check-security-invariants §84.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The phone/dark standard-computer check sampled document.activeElement once,
right after the panel detached; Radix returns the focus when the close
animation ends, so on a slower CI runner the sample was null. Wait for it,
bounded at 3 s, then check as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er 0.74.0)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Thirteen read-only checks on the existing diagnostics catalog path:
Defender, firewall, BitLocker (protector kinds only), Secure Boot / TPM,
local administrators, a DNS lookup and a TCP port test with typed
parameters, routes, time sync, activation, unexpected shutdowns,
scheduled tasks and signed-in users; plus server-side Windows support
from a static end-of-servicing table. Each result is interpreted into
Healthy / Warning / Critical / Unknown / Unsupported findings with the
evidence time (interpret.ts, pure); unknown is never healthy.

Typed parameters for dns_lookup and tcp_port only: parseDiagnosticParams
at request and delivery, migration 0092's CHECK, and the agent; one
host-name regex in TS, PowerShell and SQL; both keys need
computers:connect. Heartbeat-script functions behind a build-time guard
(assertPaletteBlockSafe), not a Go agent build. §86 new, §20 amended.
Windows lab job runs the block for real on windows-latest as admin and
SYSTEM, read-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The palette unit stub's fallback Join-Path lost its backslash in the template
literal (\J), and the e2e-ui check read the database before the second POST
had landed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant