Commit Graph

8242 Commits

Author SHA1 Message Date
pulse-triage[bot]
399fab9821 Retire deleted availability checks from the poll queue
Reconcile local scheduled work against the successfully read availability catalog. Removing a saved check drops its pending poll and any returning claim's successor. Reject queued availability proposals made against the previous roster without discarding independent provider work or treating a read failure as an empty catalog.

Change-source: pulse-maintainer
2026-11-26 04:15:32 +00:00
pulse-triage[bot]
643cedb155 Expose overdue queued polls in Prometheus (#5188)
Report the age of the oldest timestamped poll still in the active queue
across running schedulers. Use the queue snapshots already read at
scrape time, so a flat due-soon count does not hide a growing wait. Keep
claims, future retries and dead letters separate without adding labels
or changing poll admission.

---
Fleet candidate `20261126T030625Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `117a0021fd5688468af0ae5358953a06eeeceedb` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-26 03:47:41 +00:00
pulse-triage[bot]
117a0021fd Expose overdue queued polls in Prometheus
Report the age of the oldest timestamped poll still in the active queue across running schedulers. Use the queue snapshots already read at scrape time, so a flat due-soon count does not hide a growing wait. Keep claims, future retries and dead letters separate without adding labels or changing poll admission.

Change-source: pulse-maintainer
2026-11-26 03:11:48 +00:00
pulse-triage[bot]
86e123dd90 Age the scheduler breaker retry gauge on scrape
Keep the last recorded breaker deadline instead of freezing the remaining delay at the write. An operator can tell when recorded backoff has expired without another poll or Scheduler Health read. Export state and failures from the same observation without changing probe admission.

Change-source: pulse-maintainer
2026-11-26 02:36:41 +00:00
pulse-triage[bot]
f3f42fbb21 Measure poll dead letters from active scheduler runtimes
Read terminal records at scrape time from the queues owned by running schedulers. A cancelled runtime stops contributing even while its monitor is retained; an old Health snapshot cannot restore its sample or clear a peer with the same labels.

Keep the current poll cadence and partial-read status. Cover tenant replacement and shutdown with the old queue held live, stale publication across recovery, and the matching Prometheus samples.

Refs #5089.

Change-source: pulse-maintainer
2026-11-26 01:25:31 +00:00
pulse-triage[bot]
07a62a4a20 Compose reviewed poll dead-letter recovery onto current main
Preserve 82768e9a0d while replacing the process-wide gauge publisher with a runtime-owned scrape.

Change-source: pulse-maintainer
2026-11-26 01:25:24 +00:00
pulse-triage[bot]
fc8b624daa Measure scheduler queue gauges at scrape time (#5177)
Read the active queues instead of publishing heap scans from poll
workers. A quiet queue still crosses the due-soon boundary, and
unrelated provider results cannot reset the process depth.

---
Fleet candidate `20261125T230256Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `2cb24ed789042c6155bb4e287b9efacd9446226b` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-26 00:08:50 +00:00
pulse-triage[bot]
82768e9a0d Clear poll dead letters when collection resumes
Retire the connection's terminal record and its gauge when a later scheduled result succeeds. Keep a partial-read error visible and leave other failures, breaker admission and polling cadence alone. A recorded dead-letter retry time is not an active-queue deadline.

Refs #5089.

Change-source: pulse-maintainer
2026-11-25 23:53:04 +00:00
pulse-triage[bot]
2cb24ed789 Measure scheduler queue gauges at scrape time
Read the active queues instead of publishing heap scans from poll workers. A quiet queue still crosses the due-soon boundary, and unrelated provider results cannot reset the process depth.

Change-source: pulse-maintainer
2026-11-25 23:15:02 +00:00
pulse-triage[bot]
71626cfad2 Show overdue queued polls in Scheduler Health (#5169)
**Show overdue queued polls in Scheduler Health**

A poll due within seconds and a poll left waiting past its scheduled
time can have identical queue counts. Report the oldest queued age in
the existing tenant-scoped snapshot and its saved-snapshot queries. Keep
future retries, claimed polls, and dead letters out of the age and
preserve measured zero separately from older responses.

**Link to the claimed-poll metric heading**

Match the existing fragment for the emoji-prefixed Scheduler Health
heading in the Prometheus guide.

---
Fleet candidate `20261125T212706Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `1af732ddce3685891c41eaf468513b50843d2526` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-25 23:09:13 +00:00
pulse-triage[bot]
9b1a0d1aa2 Show overdue queued polls in Scheduler Health
A poll due within seconds and a poll left waiting past its scheduled time can have identical queue counts. Report the oldest queued age in the existing tenant-scoped snapshot and its saved-snapshot queries. Keep future retries, claimed polls, and dead letters out of the age and preserve measured zero separately from older responses.

Change-source: pulse-maintainer
2026-11-25 21:36:38 +00:00
pulse-triage[bot]
8d7a959d4e Align scheduled retries with poll breaker deadlines
A retry could become due while the connection's breaker still refused admission, then restart its backoff or repeat a dead-letter record without a new reading. Use the later deadline for a real transient retry and defer a blocked claim without processing a stale outcome. Preserve the original admission check, retry policy and unrelated poll progress.

Change-source: pulse-maintainer
2026-11-25 20:53:31 +00:00
pulse-triage[bot]
5616b3e238 Wake poll workers when the queue has earlier work (#5148)
Idle workers used fixed recheck timers even when the queue was empty. A
newly due poll had to wait for the next recheck. Let workers sleep until
the due time or a queue change that makes work eligible sooner.

Keep claims, cadence, retry and priority rules unchanged. Exercise real
scheduling and PVE History in both worker modes, and cover deadline
changes and returned claims.

---
Fleet candidate `20261125T174128Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `0320f09019377228fc7f1b39026a0aa8f822ee3e` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-25 18:46:34 +00:00
pulse-triage[bot]
2c613aa702 Keep Prometheus poll staleness aging between results (#5144)
Calculate connection and node poll age each time Prometheus scrapes.
Keep no result distinct from a failed first result, and keep failed
polls from refreshing the last-success timestamp or changing scheduler
policy.

---
Fleet candidate `20261125T170023Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `93a137a5ab7fe4999255167cb9c4dc242d466b91` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-25 18:03:29 +00:00
pulse-triage[bot]
0320f09019 Wake poll workers when the queue has earlier work
Idle workers used fixed recheck timers even when the queue was empty. A newly due poll had to wait for the next recheck. Let workers sleep until the due time or a queue change that makes work eligible sooner.

Keep claims, cadence, retry and priority rules unchanged. Exercise real scheduling and PVE History in both worker modes, and cover deadline changes and returned claims.

Change-source: pulse-maintainer
2026-11-25 17:51:38 +00:00
pulse-triage[bot]
93a137a5ab Keep Prometheus poll staleness aging between results
Calculate connection and node poll age each time Prometheus scrapes. Keep no result distinct from a failed first result, and keep failed polls from refreshing the last-success timestamp or changing scheduler policy.

Change-source: pulse-maintainer
2026-11-25 17:21:52 +00:00
pulse-triage[bot]
edc6f9026b Evaluate PBS rolling alerts from native node history
Keep the Backups chart series and host preference, but record PBS node-status samples separately for native alerts. A host agent and a PBS service can use the same bare ID; linked, namesake and legacy chart samples are not native alert evidence. Preserve the window, thresholds and grace.

Cover the actual writer and factory evaluator from both the live ring and committed history, including no native evidence with a populated peer and namesake.

Change-source: pulse-maintainer
2026-11-25 16:24:05 +00:00
pulse-triage[bot]
4b96614727 Keep monitoring ticks moving during notification health checks (#5131)
Run the periodic health projection on one joined worker per monitor,
with one coalesced wake and the existing throttle. Keep committed
queue-action reconciliation synchronous and preserve alert-store
ownership through shutdown.

Contract-Neutral: No agent lifecycle or public API contract changes. The
monitoring contract describes the bounded periodic check; notification
verdicts, reconciliation, and delivery policy are unchanged.

---
Fleet candidate `20261125T132912Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `d6fc81d5f4403f957b7e8fed13897972bb6166b7` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-25 14:37:45 +00:00
pulse-triage[bot]
a2541050da Keep due polls eligible across planning ticks (#5128)
**Keep due polls eligible across planning ticks**

An elapsed planned time does not mean a worker ran the poll. Reconcile
periodic plans against the live queue so an already-due source keeps its
turn. Keep explicit edits and retry backoff authoritative while still
letting a shorter ordinary cadence pull a future poll forward.

**Synchronize the poll retry fixture counter**

Advancing fake time does not order the earlier assertion against the
eventual retry-worker write for the race detector. Use an atomic counter
for that shared observation.

Contract-Neutral: Test-only synchronization; no production behavior, API
or UI changes.

---
Fleet candidate `20261125T123334Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `1533638b2f5ed5c408aa29f7de0d040d30426c09` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-25 13:51:19 +00:00
pulse-triage[bot]
d6fc81d5f4 Keep monitoring ticks moving during notification health checks
Run the periodic health projection on one joined worker per monitor, with one coalesced wake and the existing throttle. Keep committed queue-action reconciliation synchronous and preserve alert-store ownership through shutdown.

Contract-Neutral: No agent lifecycle or public API contract changes. The monitoring contract describes the bounded periodic check; notification verdicts, reconciliation, and delivery policy are unchanged.
Change-source: pulse-maintainer
2026-11-25 13:45:00 +00:00
pulse-triage[bot]
1c55f43651 Use queue-scoped IDs in notification diagnostics (#5124)
Keep delivery log, dead-letter and rehearsal destination labels
correlated without sharing internal receipt or configuration identities.
Preserve retained queue linkage and recovery authority across restarts.

---
Fleet candidate `20261125T115436Z-core-runtime` from the `core-runtime`
lane. Reviewed tip `dc277ba72a6d0efbe939ce88523b173f0fac1124` on `main`.

[How Pulse handles
triage](https://github.com/rcourtman/Pulse/blob/main/docs/AI_TRANSPARENCY.md)
2026-11-25 13:01:05 +00:00
pulse-triage[bot]
ee05834872 Keep due polls eligible across planning ticks
An elapsed planned time does not mean a worker ran the poll. Reconcile periodic plans against the live queue so an already-due source keeps its turn. Keep explicit edits and retry backoff authoritative while still letting a shorter ordinary cadence pull a future poll forward.

Change-source: pulse-maintainer
2026-11-25 12:44:51 +00:00
pulse-triage[bot]
dc277ba72a Use queue-scoped IDs in notification diagnostics
Keep delivery log, dead-letter and rehearsal destination labels correlated without sharing internal receipt or configuration identities. Preserve retained queue linkage and recovery authority across restarts.

Change-source: pulse-maintainer
2026-11-25 12:05:49 +00:00
pulse-triage[bot]
bdf6eedade Keep poll workers alive after a task panic
Recover when a scheduled task unwinds rather than when the reusable worker exits. Release the claim and progress marker as before, and let the worker take the next due poll without inventing a provider failure or starting an immediate retry.

Refs: https://github.com/rcourtman/Pulse/issues/5089
Change-source: pulse-maintainer
2026-11-25 11:34:11 +00:00
pulse-triage[bot]
17120e4c9d Keep a slow scheduled poll from taking another worker slot
Reserve each provider and connection when it leaves the queue. Periodic replanning skips that key until the worker returns, and an explicit edit or removal keeps precedence over its follow-up. Use the same ownership with local workers and with a shared process limit.

Refs: https://github.com/rcourtman/Pulse/issues/5089
Change-source: pulse-maintainer
2026-11-25 07:01:55 +00:00
pulse-triage[bot]
ce863e8d07 Expose overdue claimed polls in the scheduler metrics
Measure time past the poll budget independently for work held before a shared worker slot and for work still occupying a worker. Keep the observation separate from outcomes, retry backoff, health and notifications.

Refs #5089

Change-source: pulse-maintainer
2026-11-25 05:16:52 +00:00
pulse-triage[bot]
9c19c1b56d Discard superseded watchdog alerts before manager admission
Fence standing raises at the alert manager lock so queued alerts cannot record an obsolete firing or dispatch after watchdog recovery or saved removal. Keep restart history, independent external signals and ownership through teardown.

Contract-Neutral: Restores the existing watchdog latest-standing-condition rule at internal alert admission; public status, alert identity, restart history and delivery policy are unchanged.
Change-source: pulse-maintainer
2026-11-24 21:56:59 +00:00
pulse-triage[bot]
20c2ac60de Keep external watchdog signals moving while local alerts block
Publish local watchdog conditions on a single bounded worker. Keep
restart history and reconcile the latest standing condition without
making external failure or recovery depend on the alert manager. Cancel
superseded endpoint snapshots before they can admit a trailing request,
and join alert projection before tenant teardown releases its stores.

Contract-Neutral: The same HTTP and configuration surface, progress marker, alert identities and durable schema are retained. Internal projection and teardown are documented under monitoring; agent lifecycle is unchanged.
Change-source: pulse-maintainer
2026-11-24 20:59:00 +00:00
rcourtman
ecc49c09c4 Authenticate mobile relay channels inside encrypted DATA frames
Require auth_mode "encrypted" and reject any plaintext auth_token in
CHANNEL_OPEN so the relay server never receives a paired phone's API
credential. After X25519 KEY_EXCHANGE completes, require the first
encrypted DATA frame to carry a valid channel_auth token before any
proxy request is served, close unauthenticated channels after an auth
deadline, reject duplicate channel_auth payloads, and send
CHANNEL_OPEN with authenticated=true on success so the relay server
registers push device tokens only for authenticated sessions.

Update relay runtime, public relay, and security docs to reflect the
zero-trust relay boundary, and add unit and managed cross-repo tests
covering plaintext token refusal, pre-auth request blocking, and
relay impersonation rejection.

Contract-Neutral: Hardens relay channel authentication inside the encrypted tunnel without changing public HTTP API contracts
2026-11-24 18:47:47 +00:00
rcourtman
321a7f95c9 Harden agent action routing, metadata policy, and disclosure boundaries
Separate user-editable host metadata writes from administrator command
execution policy so monitoring:write callers cannot toggle or clear
commandsEnabled. Require Docker container action dispatch to verify
live session ownership and full 64-character lowercase container IDs,
and refuse dispatch when a single token reports multiple Docker hosts
for the target identity.

Verify Proxmox node action runner routing against the live session
hostname and prevent automatic host-report node links from stealing a
node held by another reporting agent. Gate command details on agent
resource-context, changes, and events routes behind action capability
checks, and withhold probe credentials from agents using other tokens.

Contract-Neutral: Security hardening for agent action routing, metadata authority, and command/probe disclosure without changing public API contracts.
2026-11-24 17:09:37 +00:00
rcourtman
bb7ba8de27 Add inbound push and heartbeat availability checks (Stage 2 Build) (#5057)
Adds inbound push and heartbeat availability checks (`protocol: "push"`)
for cron jobs, backups, and scheduled tasks, strictly gated behind
`availabilityPushChecks` at `stage: "build"` in
`frontend-modern/src/utils/featureReleases.json`.

### Summary
- **Feature release gate**: Registered `availabilityPushChecks` at
`stage: "build"` with no shipped guide links. Verified on a production
build that no push preset, protocol option, or wording is exposed.
- **Config and cron schedule**: Added `AvailabilityProbePush` (`push`),
interval and 5-field UTC cron schedules plus grace windows, 256-bit
base64url token generation, and encrypted persistence in
`availability_targets.enc`.
- **Monitoring and alerting**: Added local 15-second deadline
evaluation, `/start` duration measurement, explicit `/fail` handling,
push validity windows for `availability_history` and evidence envelopes,
and unified `availability_unreachable` incidents.
- **Inbound API and security**: Added token-authenticated
`GET`/`POST`/`HEAD /api/push/{token}` (supporting `/start`, `/fail`,
`?status=up|down`, `?msg=`, `?ping=`) with constant-time token
comparison, per-target and per-IP rate limiting, a 1 KiB POST body cap,
and admin-only `POST /api/availability-targets/{id}/rotate-push-token`.
- **Frontend**: Added feature-gated push preset, schedule editor,
post-create Ping URL and `curl` snippet display with copy actions,
two-step token rotation, and mobile-safe wrapping.

### Verification
- Go tests: `internal/config`, `internal/availabilityprobe`,
`internal/monitoring`, and `internal/api` (including router public-path,
auth-bypass, and route inventory tests)
- Frontend tests: `tsc --noEmit`, `AvailabilityTargetSlot.test.tsx`
(24/24), `npm run lint:feature-releases`, and production `npm run build`
- Browser verification: Verified production build hides push checks
(`1280x800`), development build creates a cron push check, ingests live
unauthenticated `curl` pings (`/start`, success, 413 oversized body, 404
unknown/revoked token, `/fail`, recovery), rotates tokens, and renders
cleanly at `1280x800` and `390x844`
(`frontend-modern/browser-verification/bf6c955c53a21415.json`).
2026-11-24 17:00:54 +00:00
rcourtman
86ed97bee1 Merge remote-tracking branch 'origin/main' into feat/availability-push-checks
# Conflicts:
#	docs/release-control/v6/internal/subsystems/api-contracts.md
#	docs/release-control/v6/internal/subsystems/unified-resources.md
#	internal/config/availability.go
2026-11-24 16:08:43 +00:00
rcourtman
9f71173b7a Harden API auth, SSO/RBAC identity, CSRF/lockout, tenant isolation, and input bounds (#5079)
Hardens Pulse API authentication, RBAC, SSO principal identity,
session/CSRF/lockout defenses, multi-tenant organization isolation,
action lifecycle authority, and request/metric memory bounds:

- Require admin + `settings:write` authentication (rejecting setup
tokens) on `/api/system/ssh-config` and
`/api/system/verify-temperature-ssh` and strictly validate SSH config
directive values against command injection.
- Harden SSO principal identity and group-to-role mapping lifecycle
(non-breaking issuer binding via `ProviderIssuerRegistry`, legacy
display-name migration guard, verified-email requirement for OIDC
domain/email restrictions, and role revocation when mappings change or
are removed).
- Enforce RBAC, admin, token-scope, and billing-state authority across
RBAC management routes, loopback trust in hosted mode, logout race
protection in `ensureAdminSession`, mobile token revocation on org-admin
removal, alerting/operator-state mutations, and entitlement refresh
token disclosure.
- Harden CSRF form fallback and fake-cookie storage, account lockout and
unauthenticated bcrypt paths, admin session invalidation on credential
rotation, and live credential revalidation on stalled request bodies.
- Enforce multi-tenant organization isolation and limits (org creation
caps, token cleanup on org deletion, public signup on tenant runtimes,
maintenance verification scoping, and tenant monitor lock contention).
- Harden action authority, cross-org action result isolation, live
credential checks on execution, and bound HTTP metrics label
cardinality, JSON request bodies, handoff/return JWT sizes, TrueNAS
topology RPC reads, suppression reasons, and download limits.
2026-11-24 16:05:01 +00:00
rcourtman
29b8f35fbb Add status timeline and response-time charts to availability drawer (#5088)
Add a lazy-loaded `AvailabilityDrawerHistory` panel to the top of the
Overview tab for availability check drawers, using the existing
`/api/availability-history` endpoint across `24h`, `7d`, `30d`, and `1y`
ranges.

## Changes
- **Shared history helpers (`availabilityHistoryPresentation.ts`):**
Extract range metadata, bucket state classification, coverage-aware
uptime verdict, and duration formatting from `AvailabilityFleetView.tsx`
so both the Fleet view and the detail drawer share one source of truth.
- **Availability drawer charts (`AvailabilityDrawerHistory.tsx`,
`ResourceDetailDrawerOverviewTab.tsx`):**
- Segmented **Status timeline** bar with config-change revision markers,
legend, keyboard arrow-key inspection, and exact interval readout.
- **Response time** SVG trend chart (average line, min-max band, clean
breaks across outages) with synchronized hover crosshair and bucket
highlight across both cards.
- Automatically omits the response-time card when a check has no latency
measurements (for example, passive push checks without `/start`),
letting the status timeline span full width.
- Includes loading skeleton, calm empty state, and retryable error
state.
- **Bundle accounting (`.bundlesize.json`):** Raise
`totals.js.baselineGzip` by 5,000 bytes to fund the new lazy chunk while
leaving all per-chunk baselines untouched.

## Verification
- 63/63 Vitest tests passed (`AvailabilityDrawerHistory.test.tsx`,
`ResourceDetailDrawer.history.test.tsx`,
`ResourceDetailDrawer.snapshot.test.tsx`,
`AvailabilityChecksTable.test.tsx`, `AvailabilityPageSurface.test.tsx`).
- TypeScript check, production build, and bundle-size check passed on
`pulse-dev`.
- Live browser verification passed across `/availability`,
`/availability?view=fleet`, and `/availability?view=table` at `1280x800`
(Dark and Light themes) and `390x844` mobile (receipt
`frontend-modern/browser-verification/459acb9354219526.json`).
2026-11-24 16:00:23 +00:00
rcourtman
e1470cb787 Add status timeline and response-time charts to availability drawer
Add a lazy-loaded AvailabilityDrawerHistory panel to the top of the Overview tab for availability check drawers, matching the diagnostic layout used by workload drawers:

- Extract shared availability history presentation helpers (range options, bucket classification, coverage-aware uptime verdict, and duration formatting) into frontend-modern/src/utils/availabilityHistoryPresentation.ts so AvailabilityFleetView and AvailabilityDrawerHistory share one source of truth.
- Render a segmented status timeline bar (with config-change revision markers, legend, and keyboard arrow inspection) alongside a responsive SVG response-time trend chart (average line, min/max band, gap handling across outages, and synchronized hover crosshair) powered by the existing /api/availability-history endpoint across 24h, 7d, 30d, and 1y ranges.
- Omit the response-time chart gracefully when a check has no latency readings (such as passive push checks without /start) and show calm empty, loading, and retryable error states.
- Account for the new lazy chunk in totals.js.baselineGzip in frontend-modern/.bundlesize.json while leaving all per-chunk baselines unchanged.
2026-11-24 15:19:18 +00:00
rcourtman
afa1f95218 Make What's New dialog scannable, reopenable, and WCAG-compliant
Tighten release-note formatting and prompts, allow reopening the What's New dialog on demand from the footer version button and Settings -> System -> Updates, fix version title wrapping on narrow mobile viewports, and ensure the footer version button aria-label includes the visible version string for WCAG 2.5.3 label-in-name compliance.

Contract-Neutral: Release-note copy/formatting, What's New dialog reopen UX, and footer button accessibility fixes with no subsystem architecture or API contract changes
2026-11-24 14:58:57 +00:00
rcourtman
d3d8fbbf88 Harden SSO principal identity and group role mapping lifecycle
Reject whitespace-padded SSO subjects and stable sso: principals during legacy migration, drop free-form OIDC name claims from legacy candidates, record original SSO provider issuers without renaming existing users on upgrade, withdraw mapped roles when the last group mapping is removed, and replace stale roles or fail closed when a mapped role does not exist.

Contract-Neutral: Security fixes tightening SSO principal derivation, legacy migration, and authoritative role replacement
2026-11-24 14:12:05 +00:00
rcourtman
036986434b Require admin auth and validate values on SSH config endpoints
Remove setup-token bypass on POST /api/system/ssh-config and POST /api/system/verify-temperature-ssh so both require admin session or instance settings:write scope. Validate allowlisted SSH directive argument values in HandleSSHConfig using OpenSSH word splitting so shell metacharacters, command substitution, and option flags in ProxyJump or HostName values are rejected.

Contract-Neutral: Security bug fix removing unintended setup-token bypass and validating SSH directive values
2026-11-24 14:12:05 +00:00
rcourtman
357f43f32e Harden AI tool sandboxing, agentexec sessions, and Patrol/Assistant isolation (#5077)
Hardens Pulse agentexec command transport, AI provider/tool sandboxing,
and Assistant/Patrol authorization boundaries:

- Bind agentexec sessions to organization and live connected agent token
ownership, reject NUL bytes in agent IDs, add write deadlines so stalled
agents cannot freeze dispatch, and enforce symlink-safe `/var/log` reads
with target-aware command policy.
- Sandbox AI read-only tools and providers: reject `lsblk --sysroot`,
bare hostnames in `ss` filters, sensitive path escapes, unbounded
`pulse_query` preallocation, unescaped `@path` attachments in Claude
subscription prompts, SSRF to broadcast/non-global-unicast targets in
`fetch_url`, Gemini key exposure, and command output leaks in failed
Codex turns.
- Enforce Assistant session ownership and handoff authority, bound
unknown-session abort tracking, prevent cross-org inventory leakage
after monitor reload, lock Patrol dismiss/resolve note steering behind
host-command authority, redact tool outputs from Patrol run history for
non-admins, protect saved AI provider keys on base URL changes, and
serialize AI settings updates.
2026-11-24 14:09:08 +00:00
rcourtman
0651eadf98 Harden alerts, CloudCP auth, relay trust, probes, recovery, and outbound checks (#5081)
Hardens Pulse alerts, notifications, CloudCP account/audit
authorization, relay channel trust, VMware/Proxmox/HTTPS probes,
recovery stores, WebSocket queueing, and outbound host checks:

- Enforce relay `KEY_EXCHANGE` encryption and block relayed traffic from
inheriting direct loopback trust.
- Harden Pulse Cloud control-plane membership sync (two-way
`SyncWorkspaceAccess` for promotions, demotions, and removals,
preventing magic-link re-addition of removed buyers), remove
header-spoofable audit actor IDs, and cap audit event field sizes.
- Bound alert configuration lists, escalation levels, bulk ack/clear ID
counts, Docker restart-loop alert state, per-host event-log snapshot
pruning, restart recovery markers, and Kubernetes cluster/VMID
backup-age alert keys.
- Harden notification destinations and webhook/Apprise delivery: reject
blank SMTP loopback targets, protect saved notification secrets on
destination changes, cap and sanitize webhook headers, and reject NUL
bytes in Apprise CLI arguments.
- Harden VMware inventory parsing (cycle detection in
`resolvePlacement`, VM/goroutine/JSON-array budgets), Proxmox JSON
response limits, and HTTPS availability probe TLS verification, error
size bounds, and write-only secret handling.
- Bound recovery series date ranges and isolate PVC rollup keys across
clusters, bound WebSocket `requestData` queueing for stalled clients,
and block IPv6 zone `@` loopback bypasses in tenant outbound checks.
2026-11-24 14:06:43 +00:00
rcourtman
1d68fc4028 Omit empty drawer alerts band and move range picker to tab bar (#5015)
Healthy overview drawers previously stacked a standalone "No active
alerts" line above a sparse history toolbar row, leaving ~70px of mostly
empty space above the charts.

## Summary
- Omit the alerts section when a resource has no active alerts (removes
`DrawerNoAlertsLine` across Guest, Node, Docker host, Resource detail,
Disk, Storage pool, and Ceph cluster drawers). Active alerts still
render `Needs attention` at the top when present.
- Summarise passing availability checks on the drawer facts strip
(`Availability checks passing`) alongside healthy backup status, keeping
full probe cards under `Details` and failing checks in front.
- Extract `GuestDrawerHistoryRangeSelect` into its own module to keep
`GuestDrawerHistory` lazy-loaded, and place it in `Subtabs` `trailing`
on Overview (retaining the in-panel fallback for tabless inline disk
expansions in `GuestPhysicalDisks`).
- Collapse the history toolbar out of layout when neither the fallback
picker nor a refresh error is shown, and anchor the `Subtabs` rail to
the bottom edge (`self-end`) so active tab underlines stay flush beside
touch-sized controls on mobile.

## Verification
- Targeted drawer, guardrail, performance contract, and doc tests passed
(`vitest`), plus `shared-template-audit`, full frontend `npm run lint`,
and `tsc --noEmit`.
- Verified in headless Chrome (Playwright) across 1440x900 dark,
1440x900 light, and 390x844 dark viewports for healthy, passing
availability checks, alerted, range switching (`24h` -> `7d`), and
Overview/Manage tab switching (browser verification receipt included).
2026-11-24 12:47:27 +00:00
rcourtman
c7788961ff Harden installer signature checks, certificate pinning, and privilege boundaries (#5076)
Hardens Pulse agent and server installer scripts against signature
bypass, certificate spoofing, local privilege escalation, and asset
confusion:

- Enforce rendered installer signature verification in `install.sh` and
`install.ps1` (fixing PowerShell `ssh-keygen` stdin invocation) and
apply curl SPKI `--pinnedpubkey` checks across all pinned server
downloads.
- Keep `/usr/local/bin/pulse-agent` owned by `root:root` `0755` in
least-privilege profiles, gate version probes on trusted regular files,
isolate typed-helper quarantine under collector authority, validate UID
0 / executable / root-namespace identity when locating running agent
processes, and harden rollback state-root ownership and symlink checks.
- Stage source Go archives safely, isolate inline `python3` calls with
`-I`, and stamp release assets with `PULSE_RELEASE_ASSET` (strictly
enforced in `pulse-auto-update.sh`, rejecting mismatched or duplicate
declarations in `install.sh` while preserving compatibility with
pre-6.9.0 `releases/latest`).
2026-11-24 12:36:01 +00:00
rcourtman
65fb494188 Harden agentexec sessions, log reads, and command policy
Close command-channel session hijacking, transport stalls, and read-only policy bypasses across agentexec and hostagent:

- Always qualify agentexec session keys with the organization ID (including default), reject control characters in agent IDs, and verify organization ownership on session lookup.
- Enforce a 10s write deadline on agentexec text writes and close timed-out connections so a non-reading agent cannot pin the session write lock and block action admission.
- Refuse first-use install-token command bindings when another unexpired token of the organization holds the live command session, monitor host record, or durable token binding for that agent ID.
- Confine auto-approved host log reads beneath /var/log via os.Root and /dev/fd descriptors to prevent symlink escapes, and require approval for guest (container/vm) log reads where host confinement does not apply.
- Restrict auto-approved pvesh get commands to listed non-credential API subtrees and restrict docker/podman format templates to direct field selections so output masking cannot be stripped.

Contract-Neutral: Security hardening of AI tool sandboxing, agentexec sessions, and Patrol/Assistant authorization without public contract delta
2026-11-24 12:28:48 +00:00
rcourtman
7c588b230b Harden recovery bounds, websocket queueing, and outbound host checks
Scope Kubernetes and TrueNAS recovery subject keys by provider scope so
same-named PVCs or datasets in different clusters cannot collide in
rollups, bound recovery series day spans, and close deleted tenant
recovery stores on cleanup.

Skip queued WebSocket requestData full-state frames while an earlier
complete snapshot is still waiting on the client send channel, and
reject schemeless `@` hosts and non-http(s) URLs in tenant outbound
policy validation so IPv6 zone-ID syntax cannot bypass loopback checks.

Contract-Neutral: security hardening and resource-bound guards without API schema changes
2026-11-24 11:59:33 +00:00
rcourtman
a138a6e1c1 Harden VMware inventory bounds, Proxmox JSON limits, and HTTPS probes
Bound vCenter inventory lists and nested JSON arrays before decoding,
prevent infinite recursion on cyclic placement parent chains, and bound
Proxmox guest-agent JSON responses before unmarshaling.

For availability probes, verify the HTTPS server certificate (trusted
chain or pinned SHA-256 fingerprint) before sending stored credentials,
header values, or request bodies unless explicitly opted out. Cap HTTP
probe response headers at 64 KiB and transport error strings at 240
bytes, and require re-entering write-only HTTP secrets when assigning a
new host agent to an availability check.

Contract-Neutral: security hardening and additive HTTPS probe TLS verification options
2026-11-24 11:59:33 +00:00
rcourtman
7d60209fac Harden notification destinations, webhook headers, and Apprise CLI
Refuse blank or whitespace-only SMTP servers in EnhancedEmailManager
before dialing so an empty host cannot reach loopback under tenant
outbound policy.

Bind saved SMTP passwords, Apprise API keys, and masked webhook headers
and custom fields to their saved destination and transport security so
updates or test sends to another host require re-entering the secret.

Percent-encode control bytes and cap length on alert-derived webhook
headers (X-Pulse-Event-ID and ntfy Title) so agent-supplied IDs cannot
fail grouped webhook batches. Pass the Apprise CLI body on standard
input with NUL bytes removed and bound the title argument so
unrepresentable alert text cannot block grouped Apprise CLI deliveries.

Contract-Neutral: Security hardening for notification destination binding, SMTP blank-host rejection, webhook header encoding, and Apprise CLI delivery without changing public API contracts
2026-11-24 11:59:33 +00:00
rcourtman
2ffff5f3f1 Harden alert config bounds, isolation, and restart recovery safety
Bound alert configuration update lists (custom rules, rule filters, and
escalation levels) before decoding and trim oversized escalation lists
on load. Cap bulk acknowledge and clear identifier counts and stop
echoing unknown identifiers in bulk not-found errors.

Store Docker restart-loop increases per report rather than one entry per
restart, require recorded hostId ownership during Docker alert cleanup,
bound Docker container label tags, and attribute alert event log
snapshot volume by recorded hostId with fair-share pruning.

Ensure active-alert degraded recovery markers and mirrors stay within
startup read limits, mark trimmed recovery markers incomplete so startup
restores from SQLite without deleting omitted rows, and recover from
pre-existing oversized markers via SQLite. Restrict backup-age guest
attribution to Proxmox providers.

Contract-Neutral: Security hardening for alert config limits, bulk alert bounds, Docker and backup alert isolation, and restart recovery without changing public API contracts
2026-11-24 11:59:33 +00:00
rcourtman
70f3b0a3b3 Harden control-plane membership, audit actor, and audit event bounds
Propagate account member removals, demotions, promotions, and
re-additions into every workspace organization record so removed or
demoted members lose workspace authority immediately while restored
members regain workspace access cleanly.

Restrict tenant-bound magic-link owner seeding to accounts with no
existing members so stored checkout contact email cannot restore a
removed member. Read control-plane audit actor IDs only from
authenticated request context instead of client-controlled headers.

Bound audit event text fields before queuing, signing, and storage in
pkg/audit so oversized request fields cannot cause memory exhaustion
during audit exports.

Contract-Neutral: Security hardening for control-plane membership sync, audit actor attribution, and audit event size bounds without public API contract changes
2026-11-24 11:59:33 +00:00
rcourtman
d9c5f665d1 Harden relay channel encryption and block relayed loopback trust
Require a completed X25519 key exchange before serving relay DATA
frames, and refuse repeated KEY_EXCHANGE frames on an already
encrypted channel so keys cannot be replaced under an authenticated
channel token.

Mark every request forwarded by the relay HTTP proxy with a Via header
after the header allowlist so the local API loopback trust rule never
treats remote mobile requests as direct local host requests. Update
relay runtime and public security docs to reflect the channel
encryption requirement and the channel-admission token trust boundary.

Contract-Neutral: Security hardening for relay channel encryption and loopback trust without changing public API contracts
2026-11-24 11:58:53 +00:00
rcourtman
a374780d8d Merge remote-tracking branch 'origin/main' into feat/availability-push-checks
# Conflicts:
#	docs/release-control/v6/internal/subsystems/frontend-primitives.md
#	docs/release-control/v6/internal/subsystems/storage-recovery.md
#	docs/release-control/v6/internal/subsystems/unified-resources.md
2026-11-24 11:47:48 +00:00