Commit Graph

377 Commits

Author SHA1 Message Date
rcourtman
fb857b1bec Keep test source-text read counts within audit baselines
Fold Windows service local-restriction checks into the existing
service_windows.go read in TestWindowsServiceRuntimeStartsHealthServer
and remove the extra router_routes_monitoring.go source read from
TestContract_AgentCommandPayloadsRequireActionScope (route disclosure
is verified behaviorally in agent_action_disclosure_test.go).

Contract-Neutral: Test refactor to keep source-text read counts within lint baselines without changing product behavior.
2026-11-24 17:09:38 +00:00
rcourtman
5590bb7725 Enforce monitoring-only ceilings and bound oversized Docker reports
Wire MonitoringOnly into the Docker agent module from both foreground
and Windows service runtimes so legacy update_container and update_all
commands are rejected under monitoring-only authority. Forward
CommandAuthorityProfile, DisableUpdateChecks, and
DisableRegistryCredentials in the Windows service runtime to match
foreground behavior.

Ignore unsigned commandsEnabled overrides from report responses when
remote configuration signatures are required. Shed oversized Docker
object metadata and container port/mount attachments before delivery
when a report exceeds the shared size limit, and drop HTTP 413
responses without buffering so one oversized container cannot stall
host telemetry.

Contract-Neutral: Security hardening for agent monitoring-only enforcement, remote config signature verification, and oversized Docker report delivery without changing public API contracts.
2026-11-24 17:09:37 +00:00
rcourtman
05ed4334a9 Harden action authority, lifecycle isolation, and agent events
Bound action plan requestId and reason sizes and stream audit canonicalization, bind owning org context in action recovery, Patrol proposals, and Docker observation, derive Basic action credential IDs from username rather than Authorization header hash, tag approval.pending and action.completed events with owning org, recheck live token and session credentials before action decision and execution commits, prevent non-reviewers from replaying stored action records via execute, and withhold action authority from relay mobile tokens minted by non-approvers.

Contract-Neutral: Security fixes closing action authority, multi-tenant event and recovery isolation, replay disclosure, and audit OOM bugs
2026-11-24 14:20:36 +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
2350708f30 Harden node updates, cluster detection, PBS TLS, and reload scoping
Refuse PVE, PBS, and PMG node updates that change the host or a cluster
member override address while keeping a stored password or token value.

Probe PVE cluster detection from deep copies, re-locate the target
instance under config.Mu before storing results, guard PVE slice
removals under config.Mu, and return 409 Conflict if a connection is
removed or changed during cluster refresh.

Honor the requested VerifySSL and fingerprint settings during PBS
turnkey token creation in handleAddNode.

Scope non-default tenant node reloads to MultiTenantMonitor.ReloadTenant,
coalesce queued reloads in ReloadableMonitor.Reload, and space
auto-register reloads for existing connections per organization.

Contract-Neutral: Security hardening fix without public contract change
2026-11-24 12:28:52 +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
pulse-triage[bot]
0c73a9ac7e Report confirmed agent URL rejection separately from an unknown check
Keep pre-token preflight metadata-only and state what it cannot check. A verified collector can now report a definite URL rejection; unclassified and older exits still stop safely without guessing why or exposing the child output.

Refs #4748

Contract-Neutral: Deployment-installability and security-privacy are unchanged: preflight sequence, installer exits and event identities, TLS and URL admission, signature verification, credentials and redaction keep their existing contracts. Agent-lifecycle records the validator exit classification.
Change-source: pulse-maintainer
2026-11-20 10:27:19 +00:00
rcourtman
f30b2555ea Review Compose updates against their deployment source
Docker operators need to diagnose service failures and change one image
without losing the source that owns a running application. Bind approved
updates to the registered Compose file or Git base, then show the running
image and fresh HTTP evidence after rollout. Keep log access opt-in, mute
container alerts per runtime, and connect the Docker installer and demo
to the application workflow.
2026-11-18 02:36:36 +00:00
rcourtman
107c4e29f9 Make metric history free on every plan
Community installs already stored 90 days of daily metric averages and
366 days of availability history, but the chart, availability and agent
history reads refused anything past seven days, and lapsed paid installs
had history past seven days purged 60 days after a downgrade. Locking
users out of data on their own disk is the kind of limit that drew the
loudest complaints before (the monitored-system cap, SSO), and it is not
what people pay for: 12 of 88 covered paid installs read past seven days
in the last 30 days.

The history routes now serve every supported range on every plan, and
storage retention alone decides how far back the answer goes.
long_term_metrics moves into Community as a compatibility key with no
upgrade reason. TierHistoryDays, max_history_days and the downgrade
purge (DowngradeRetentionState, the metrics store commercial ceiling and
the generated-report purge) are removed, so nothing deletes history or
reports because a plan ended. The chart and drawer lock panels, the
history plan link, the billing summary row and the plan copy that sold
history go with them. Paying users lose nothing.

The public pricing pages and licence server copy in pulse-pro change
when the release carrying this ships.
2026-11-17 20:11:48 +00:00
pulse-triage[bot]
832f171e48 Refuse competing settings in private observer files
Validate repeated root and destination members before resolving observer credentials. Preserve singleton aliases, explicit transport and provisioning choices, and saved primary authority on refusal and correction. Keep the pending hosted lifecycle candidate separate.

Change-source: pulse-maintainer
2026-11-17 16:11:10 +00:00
rcourtman
a941deee76 Fail Docker updates whose image pull fails
The update read the pull progress stream and threw it away. The daemon
reports most pull failures (rate limits, denied access, missing
manifests) inside that stream, and a pull cut off by its two-minute
timeout just ends early, so a failed pull went on to stop the container,
recreate it on the old image and report a verified update.

Read the stream to its end and fail the update on a reported error, a
broken stream or an expired deadline, before anything is stopped. Give
the pull its own eight-minute limit so large images on slow links can
finish inside the fifteen-minute update window.

When the pulled tag resolves to the image the container already runs,
refuse with image_unchanged instead of restarting the service for
nothing.

Name each step that stops an update before any change with a typed
reason code (inspection, precondition, image pull, unchanged image,
stop, rename). Field telemetry showed every pre-change failure from
current agents counted as "uncoded", which reads as agents awaiting the
typed refusal vocabulary. The new codes fill the existing prerequisite
and target_changed counters, so the telemetry schema is unchanged.

A failed stop or rename call is no longer taken as proof that nothing
changed, since the daemon may have acted before its response was lost.
The container is read back: a stopped or renamed original gets its name
back and is started again, and the result reports that as a rollback and
whether it worked.

The live Compose integration test now starts its services on an older
image under the tag the update pulls, so each update is a real image
change, and checks that a second update is refused as unchanged without
restarting the container.
2026-11-15 18:43:18 +00:00
pulse-triage[bot]
c3bda352bb Bind new workspaces to current subscription authority
Share admission between the portal precheck and authoritative insert. Preserve explicit local MSP plans, refuse absent or withdrawn billing before provisioning writes, and keep completion from overwriting cancellation. Store withdrawn Stripe states distinctly from grace and exercise provider compatibility, final admission races and multi-registry ceilings.

Contract-Neutral: The provider proof command passes its existing configured MSP mode/plan explicitly; deployment and installability behavior is unchanged. The actual workspace-admission contract delta is documented in cloud-paid with executable verification.
Change-source: pulse-maintainer
2026-11-15 03:52:15 +00:00
rcourtman
17c921a8e6 Accept task-log wordings on the dead Proxmox guest rubric
A replay graded a correct conclusion on fault P4 "Handed back": it said
the guest stopped "with no corresponding entry in the Proxmox task log",
which is the decisive fact, but the rubric only took phrases such as
"no stop task" or "died". P4 v2 also accepts the wordings Patrol used
across the stored runs for "no Proxmox task stopped it".

The scorecard regraded stored runs with the manifest they ran under, so
a rubric change never reached them, though the runbook said it would.
It now grades a run by the catalog's newer rubric when that version
changed nothing but its outcome, and says so under the table. Regraded,
every stored P4 run keeps its grade except that one, now Handed over.
2026-11-14 21:32:37 +00:00
rcourtman
3a1b9f951d Add a Proxmox lab driver and fault set pve-v1 to Patrol qualification
The fault set only covered Docker, so nothing measured Patrol on the
platform most Pulse installs monitor. pve-v1 adds four replayable faults
on a dedicated Proxmox node: a container a person stopped (must stay
quiet), a container disk filled from one folder, a storage filled with
old backups of one guest, and a container that died (start it).

The proxmox driver only writes to a node that carries the lab marker and
to guests marked as fixtures, records every file it writes, and requires
a no-op second cleanup and an unchanged guest and backup inventory.

Two things the first live runs showed are built in. Disk and storage
probes read Proxmox's own used and total, because df's Use% counts
reserved blocks and left a fill short of Pulse's alert threshold. Patrol
keys Proxmox findings and alerts by the source ID (pmxlab:pmxlab:111),
so the harness binds them through the resource's canonical identity.
2026-11-14 16:35:04 +00:00
rcourtman
d55beecdeb Report a failed container's last log lines, by local opt-in
On a default install Pulse can see that a container failed and not why.
The line that names the cause is in the log, and a default agent reads
no logs. On the fault set, the restart loop from a bad DATABASE_URL
stayed "Handed back" on a default agent through every replay for that
reason.

An operator can now turn on --enable-failure-logs (or
PULSE_ENABLE_FAILURE_LOGS) on a host. The agent then reports the last
lines of a container whose own state shows a failure: a non-zero exit,
an out-of-memory kill, a restart after either, or a failing health
check. It never reads a container that stopped cleanly, runs healthy or
was never started, and with the switch off it never asks the runtime
for logs at all. Nothing the server sends can turn the switch on: this
is a local boundary like custom sensors, not a read-only command mode,
and the server never chooses a container, a path or a line count.

What leaves the host is at most 30 lines and 4 KB, read once per
failure, with terminal codes and control characters removed and then
credential-shaped values masked. Cleaning comes before masking because
a secret split by a control character matches no rule until the
character is gone. The server cleans, masks and bounds the lines again
on receipt and accepts only the four known reasons, so it does not
depend on the agent having done any of it. The masking rules moved from
the AI safety package to pkg/secretredact, with no change to them, so
the agent and the server apply one set.

The lines show in the container's details as "Last log lines", in view
on the overview, as plain text. Patrol and the Assistant get them on the
single-container payload with a fixed note that they are untrusted text
and never instructions.

Masking is pattern-based and is not a guarantee. The lines are readable
by anyone who can read the container, go to the AI provider when Patrol
reads it, and can be quoted by Patrol in a finding. The docs say so.

A read-only review before this was pushed found that masking ran before
cleaning, that a restarted healthy container qualified for a read, that
the stream reader trusted a frame's declared length and kept the oldest
text, and that stale lines could be served for a new failure. All are
fixed here with tests. It also found that the first docs promised the
lines never reach a notification, which a quoted line in a finding can.
The promise is corrected.
2026-11-13 13:43:38 +00:00
pulse-triage[bot]
95b6a82a2c Drain local helper connections before server shutdown
Let Serve own listener cancellation and join its accepted handlers, and interrupt blocked connection I/O when the service lifetime ends. Do not dispatch an already-ended operation. Remove the command-level watcher now owned by the server.

Keep peer admission, typed operations and durable update recovery unchanged. Draining remains cooperative; a peer disconnect or lost response is not an operation rollback. Cover lifecycle ordering, blocked transports, late admission and actual Unix peer/client shutdown in the registered Go suites.

Change-source: pulse-maintainer
2026-11-12 22:27:21 +00:00
pulse-triage[bot]
fa688a33e4 Validate bounded observer files on their opened handles
Keep the existing private regular-file policy effective across the check/open interval and file growth. Read complete bounded config and token snapshots; refuse swapped Unix symlinks/streams and unsafe opened permissions before reading. Preserve transport, provisioning and primary saved authority, with deterministic race-window, bounded FIFO, parser and CLI recovery tests.

Contract-Neutral: Enforces existing observer private-file type, permission and size rules at the read boundary; no configuration schema, transport, provisioning, credential scope or frontend contract delta.
Change-source: pulse-maintainer
2026-11-12 19:29:33 +00:00
rcourtman
53e0e31600 Add a stopped service with no alert to the Patrol fault set
Pulse raises no alert for a container that exits 0 soon after starting
with no restart policy, because it reads it as a finished job. A service
stopped cleanly looks the same to that rule, so Patrol is asked to tell
the two apart on its scheduled run. Fault set v1 could not replay that:
its only whole-estate run is the startup run, before any container
exists, and every fault was asked through a scoped run.

D7 stops a Git service cleanly beside the finished migration job. Two
additions to the response track make it measurable:

- engagement.fallback "full_run" asks for a run over the whole estate
  once the natural wait is over, as the schedule does. A scoped run reads
  the selected container and never follows the triage flag.
- outcome.quiet_resources names negative controls the scenario is also
  about. A finding on one grades the run False alarm before anything
  else is read. D7 names the finished job.

The gitea fixture traps SIGTERM and ends with exit code 0, as docker
stop does to most real services.

First live runs, Sonnet, one per profile: each whole-estate run raised
two flags, reported the service and left the job alone. The default
agent handed it over, and with commands on Patrol started the service
and Pulse verified it. The next-step terms were widened after the first
run: copied from the crashed worker, they missed "restart the gitea
container".

Scores from before this change are out of 6.
2026-11-12 15:44:05 +00:00
pulse-triage[bot]
47c605e279 Keep remote-config redirect destinations out of agent diagnostics
Use the existing pre-parse no-follow boundary for startup and periodic hostname/config reads, preserving TLS, signatures, local authority and fallback. Share it with the already protected host consumers and bind real report closure, startup, refresh and same-credential recovery to registered regression proof.

Change-source: pulse-maintainer
2026-11-12 11:57:12 +00:00
pulse-triage[bot]
9e4ab695bc Preserve saved agent authority when linked storage is unavailable
Distinguish dangling saved-file and relocated-directory links from genuine first-run absence. Stop before replacement authority, retain linked state and explain how to restore its target. Extend registered reader, enrollment and trusted-TLS startup coverage while keeping live links and explicit configuration compatible.

Change-source: pulse-maintainer
2026-11-12 07:26:07 +00:00
pulse-triage[bot]
6b0bb56a05 Bound saved agent authority reads before startup
Reject non-regular and oversized saved token/identity files without fallback, replacement state or waiting on Unix FIFOs. Preserve linked read-only secrets, relocated state and configured-ID precedence; cover private refusals, state-safe recovery, complete reads and boundary-size identity persistence.

Change-source: pulse-maintainer
2026-11-12 05:22:25 +00:00
pulse-triage[bot]
b8eb512589 Preserve configured agent identities without writable state
Keep explicit flag and environment IDs authoritative in read-only Kubernetes/OpenShift deployments. Require saved confirmation only for identities selected from disk or derived locally, while preserving canonical enrollment persistence, confinement and credentials. Cover no-state restarts, optional-save failures, derived-ID refusal and matching read-only controls.

Change-source: pulse-maintainer
2026-11-12 04:13:04 +00:00
pulse-triage[bot]
2baae43467 Require a saved agent identity before authenticated startup
Stop before enrollment and authenticated consumers when an agent ID write fails and the saved file cannot confirm the selected identity. Keep matching read-only IDs usable without forcing permission changes. Cover refusal, state-preserving recovery, consumer identity and verified TLS, and record the lifecycle and privacy obligations.

Change-source: pulse-maintainer
2026-11-12 03:29:50 +00:00
pulse-triage[bot]
64edf5f530 Keep saved-access regression fixtures portable on Windows
The containing native job references a Proxmox test helper excluded by !windows and treats mode0000 as Unix unreadability on Windows, where it actually prevents replacement. Give enrollment its own all-platform adapter and retain every explicit-ID consumer and restart assertion with a writable Windows destination. Unix read obstruction remains unchanged.

Contract-Neutral: Tests only; correct Windows helper availability and fixture permission semantics without changing enrollment, identity persistence, credential/TLS policy or any production source.
Change-source: pulse-maintainer
2026-11-12 02:23:06 +00:00
pulse-triage[bot]
ccec638ace Stop replaying unconfirmed enrollment success responses
Require a complete bounded HTTP 200 reply with usable runtime authority before saving it. An invalid success may follow a consumed one-use bootstrap exchange, so retain state and return uncertainty rather than exchanging again. Keep response bodies and raw body-read errors out of enrollment diagnostics while preserving status policy, backoff and TLS trust.

Change-source: pulse-maintainer
2026-11-12 01:04:44 +00:00
pulse-triage[bot]
2e99693fcc Use the registered CA flag in enrollment startup proof
The trusted-HTTPS startup fixture must pass --cacert, the existing CLI flag, rather than fail flag parsing before exercising enrollment persistence.

Contract-Neutral: Correct the enrollment HTTPS fixture argv; production behavior and subsystem contracts are unchanged.
Change-source: pulse-maintainer
2026-11-11 23:47:55 +00:00
pulse-triage[bot]
6d8050086d Refuse enrollment success when private state cannot be saved
Require saved runtime credentials and canonical identity before releasing enrolled authority to agent startup. Treat local persistence failures as terminal without replaying bootstrap exchange, retain any saved runtime token, and gate explicitly selected identity files as well.

Change-source: pulse-maintainer
2026-11-11 23:31:45 +00:00
pulse-triage[bot]
fb76e7cd4b Complete saved-identity consumer fixture coverage
Model hostname lookup before remote configuration and assert both authenticated requests. Keep temporary state explicit for the existing fixture ownership guard, without changing production startup or its timing bounds.

Change-source: pulse-maintainer
2026-11-11 22:03:22 +00:00
pulse-triage[bot]
dd365722db Preserve saved agent identity when startup reads fail
Stop before deriving or publishing a replacement identity when the selected saved agent ID cannot be read. Keep first-start derivation, explicit overrides and local validation probes unchanged, with actual-file and authenticated-consumer regression coverage.

Change-source: pulse-maintainer
2026-11-11 21:50:25 +00:00
pulse-triage[bot]
60a55eba55 Diagnose unreadable saved agent credentials before startup
Distinguish an absent implicit instance token from a failed read, preserving optional startup for missing or readable-empty files and every higher-priority credential source. Return an actionable path-free error before modules start, without modifying saved state. Cover resolver and real flag-loader states and update the agent-lifecycle and security-privacy contracts.

Change-source: pulse-maintainer
2026-11-11 19:32:43 +00:00
pulse-triage[bot]
f67d78748d Keep runtime-token read fixtures portable across missing-path errors
Some platforms classify a non-directory ancestor as a missing path. Exercise unknown-state refusal only when the actual filesystem error is distinct from absence; preserve the same production error classification everywhere.

Change-source: pulse-maintainer
2026-11-11 17:59:09 +00:00
pulse-triage[bot]
9b80c03c7c Preserve saved agent authority when runtime-token reads fail
Distinguish unreadable enrollment state from a missing runtime credential in configuration loading, pre-module enrollment and the legacy host enrollment loop. Stop before bootstrap fallback, exchange or state replacement, with a path-free actionable error. Preserve first enrollment, readable empty files and saved-token restarts.

Contract-Neutral: Local saved-state error classification only; no wire, persistence-format, authentication-scope or UI contract change.
Change-source: pulse-maintainer
2026-11-11 17:58:02 +00:00
rcourtman
0140328072 Start a stopped Proxmox guest from a commands-on agent
Pulse could start, stop or restart a Proxmox guest only through a
separately enrolled action runner. Getting one takes five steps, needs
HTTPS and turns command access off on the node. So when a container
died, Patrol handed it back even on a node whose owner had ticked
"Allow Pulse to run commands on this host".

A node's own Pulse agent can now start a stopped guest, after an admin
approves. It starts and does nothing else: stop, shutdown and reboot
stay with the action runner, refused on an agent session by the server
gate, by the executor and by the agent itself.

The agent could not run a typed command at all. Its transient systemd
unit was bound to the runner's service, used the runner's state
directory and started a launcher only the runner binary serves. The
collector now serves that launcher for its own catalog (the containment
probe, a status read and a start), binds the unit to its own service and
uses its own state directory. Every other unit property is the
runner's. The runner's path is unchanged.

The server decides from what the agent reports at registration, never
from a version. The agent reports it only with commands enabled, as
root, running as pulse-agent.service on a Proxmox node, with durable
receipts and a passed containment probe. Otherwise it gives a closed
reason and Pulse says which it is: commands off, agent too old, not a
systemd service, or containment not set up.

A start an agent session ran is confirmed only by Pulse's own Proxmox
check. The agent's readback stays as evidence and no longer confirms.

No installer change, no default change, no new scope, no telemetry.
2026-11-11 09:12:40 +00:00
rcourtman
b2f3830ebd Add Patrol fault set v1 as replayable response scenarios
Patrol's Phase 1 score (5 of 6 seeded faults resolved with a
command-enabled agent, 1 of 6 on a default install) came from hand-run
rig scripts. Each Phase 2 change is to be scored again on the same six
faults, so the set has to be something anyone can replay and get the
same table from.

The qualification harness gains a fourth track, response. A response
run lets Pulse collect a healthy lab, injects one real fault and then
only observes: whether Patrol woke by itself or had to be asked (read
from the trigger reason of the Patrol run that first reported the
finding), which agent profile Pulse reports for the host (commands on,
or the default with commands off), what the investigation concluded, and
whether the scenario's own governed fix ran, was verified by Pulse and
was confirmed by the lab oracle. The result is an outcome grade (Fixed,
Handed over, Partial, Handed back, Quiet, Not looked at, False alarm)
decided from that structured state and scenario-owned terms. Nobody
reads a conclusion to grade it.

D1 to D6 are six scenarios on one shared six-service stack. The fixtures
are reviewed driver code with real image and container names, because a
lab that looked like a test changed how the model behaved. They are
limited to a private Docker daemon, and a build never replaces an image
it did not build. The host disk fault writes only below an operator-named
dedicated mount of bounded size and removes exactly what it wrote.

The Phase 1 runs are checked in as stored evidence. A test requires the
grader to give them the grades a person gave them, which is the check
that the rubric measures what the hand-made scorecard measured.

patrol-qualify -mode fault-set replays the set for one agent profile and
prints the scorecard. Response runs stay out of live-suite, model
comparison and community evidence export: a valid run is not a pass.
2026-11-10 09:55:05 +00:00
courtmanr@gmail.com
1d21be06b5 fix(agent): validate executable identity before activation
Substring version checks admitted stale agents and dependency literals, while
ARMv6 executables could select ARMv7 updates. Share compiler target and exact
release identity admission across producers, downloads and activation, and
keep validated local downloads bound to their open file descriptor.

Cover bounded runtime probes, failure atomicity, canonical executable formats,
ARM emulation and saved-state installer repair boundaries. Retain the installed
ARM fleet and physical-device gap, and leave release qualification open.
2026-11-05 18:22:58 +00:00
pulse-triage[bot]
eafb29b94c Reject unsafe agent URLs before startup diagnostics
Reuse private destination-validation errors in host enrollment and replace Docker URL echoes with destination indices. Admit the unified agent's existing primary URL policy before logging, clients or saved-state writes. Preserve the updater's local self-test behavior and cover saved credentials, rejected inputs and accepted transport with registered Go tests.

Contract-Neutral: Implement the already-declared safe URL diagnostic boundary before runtime side effects, without changing accepted transport, authority, wire data or configuration formats. Human-held subsystem contract files are unchanged.
Change-source: pulse-maintainer
2026-11-04 22:07:25 +00:00
courtmanr@gmail.com
1d7911fc83 Let provider MSP clients fall back instead of locking
/msp and the guide promise that without a valid lease a provider's clients
fall back to Community behaviour and core monitoring keeps running. In fact
the hosted gate treated them as Pulse Cloud subscribers and returned 402. A
client whose container could not renew its one-day lease locked about a day
after creation, licensed or not: private-address DNS, the runtime's refusal
of private addresses, no NAT hairpin or a filtering firewall all do it.

The control plane now marks its clients, and a marked runtime opens the
workspace it was provisioned for. Capabilities still come only from a
verified lease, and organization routes and further organizations stay
gated, so nothing paid is granted. Pulse Cloud keeps the 402.

Renewal also stops depending on the host's network. Traefik answers the
portal's name on a client's isolated network, and a runtime with a configured
control plane accepts that private address. Older runtimes refuse private
addresses and upgrade.sh leaves them in place by default, so the name is
given only to runtimes whose image declares they can use it.

Checked on a lab VM with a release-tagged build and a private-address domain:
a client with an expired lease renewed; one created with no licence opened and
accepted an agent report.
2026-11-04 10:54:41 +00:00
rcourtman
bb2263be34 Update pulse-mcp findings fake for org-scoped provider
The agent findings provider methods now take the request organization, so the cmd/pulse-mcp fleet test double must match or the package fails to compile.

Contract-Neutral: Test fixture only: the pulse-mcp findings fake follows the org-scoped AgentFindingsProvider signature.
2026-11-03 20:23:25 +00:00
pulse-triage[bot]
84b89d841b Compare URL admission state modes on their native filesystem
Windows native CI fails the read-only admission test because os.Chmod cannot express Unix 0750/0600 there. Capture the actual pre-admission directory and file modes and assert they remain unchanged, alongside contents and file inventory, on every platform. Runtime URL, credential and installer behaviour is unchanged.

Contract-Neutral: Test-only native permission baseline; no runtime or public contract change.
Change-source: pulse-maintainer
2026-11-02 18:06:36 +00:00
pulse-triage[bot]
249b8f4e15 Keep URL admission independent of inherited credentials
Defer the environment-token read until ordinary configuration resolution. Prove the URL-only path never reads it, ordinary startup retains its fallback, and unsupported or unexecutable validators refuse before admission.

Contract-Neutral: The existing read-only URL admission contract is unchanged; defer an unused credential default and cover its no-read and fail-closed boundaries without changing startup permissions or installed state.
Change-source: pulse-maintainer
2026-11-02 11:15:27 +00:00
pulse-triage[bot]
1ea913fe16 Validate agent URL policy before replacing an installation
Use the verified staged agent's production primary URL policy before changing services, installed binaries, saved credentials or safe-profile authority. The URL-only mode performs no credential reads, enrollment, logging or state writes. Unsupported or unexecutable validation fails closed, and TLS bypass never becomes plaintext consent.

Contract-Neutral: No deployment-installability or security-privacy contract delta: this enforces the existing agent URL/HTTPS policy before Unix replacement, without new transport permissions, service profiles or installation routes. The owning agent lifecycle contract and real-CLI installer regressions are included; the shared deployment contract remains untouched while human PR3756 holds it.
Change-source: pulse-maintainer
2026-11-02 11:09:41 +00:00
pulse-triage[bot]
6219669809 Keep agent HTTP redirects within the configured origin
Guard standard clients without mutating caller policy or transport. Apply the same boundary to manifest discovery, capabilities, workflow activity and MCP event streaming so tokens and replayable bodies do not follow off-origin redirects. Preserve same-origin requests and report a fixed final-base-URL diagnostic.

Change-source: pulse-maintainer
2026-11-02 03:55:42 +00:00
pulse-triage[bot]
3f0f7938de Exercise agent redirect credential boundaries
Pin off-origin refusal across capability reads and writes, manifest discovery, MCP stdio, workflow activity and live events. Keep same-origin redirects and existing client policies working.

Contract-Neutral: Registered redirect regression tests only; no runtime or contract change.
Change-source: pulse-maintainer
2026-11-02 03:47:48 +00:00
rcourtman
be6ef6cf41 fix(agent): retain update outcomes through recovery
Keep restored collectors running after helper rollback with their error
status. Require typed post-replacement restart failure before handing over
to the service manager. Sync executable bytes and mode before an atomic
POSIX replacement and apply the same barriers to persistent copies.

Make helper startup evidence authoritative, including an explicit absence,
so recovered and later helper starts cannot consume stale local markers.
Carry updater evidence through the canonical agent facet and host snapshot
with owned status and timestamp copies for fleet diagnostics.

Keep fleet diagnostic rows keyed by connection identity so refreshed
update evidence does not discard an open disclosure or its keyboard focus.
2026-11-01 12:02:41 +00:00
pulse-triage[bot]
b3c1016e8f Keep execution text out of monitoring-readable change history
Project command and runbook history from typed, kind-specific facts instead of trusting metadata key names or trimming stored reason strings. Preserve canonical evidence and existing executor/session reads; cover ordinary builders, malformed legacy values, authenticated concurrent HTTP and the real MCP text/structured consumer.

Change-source: pulse-maintainer
2026-10-31 14:18:32 +00:00
pulse-triage[bot]
7ea6a871c8 Supply the required actor in the MCP disclosure fixture
Let the authenticated context and notification proof reach the actual scoped response instead of stopping at durable request validation.

Change-source: pulse-maintainer
2026-10-31 12:14:17 +00:00
pulse-triage[bot]
7a22ad7fe4 Keep scoped agent action reads free of execution detail
Withhold full canonical results from tokens without command-disclosure authority. Return an explicitly redacted, content-free outcome summary without rewriting evidence or collapsing execution, verification and compensation truth. Scrub legacy error suffixes and verification notes, preserving known refusal prefixes and full authorized reads.

Change-source: pulse-maintainer
2026-10-31 12:02:28 +00:00
pulse-triage[bot]
b64cce9666 Verify saved MCP installers before executing them
Replace remote-script pipelines and quarantine bypass advice with published-release and exact-asset verification, local review, and a matching binary version pin. Exercise each download/verification failure without running the saved installer.

Contract-Neutral: Existing MCP installation and signature behaviour is unchanged; this corrects operator guidance and tests its fail-stop download recipe.
Change-source: pulse-maintainer
2026-10-29 11:00:30 +00:00
rcourtman
26c802d926 Tell agent users what they can ask Pulse
The README mentioned the MCP adapter in one unlinked sentence under Optional AI checks, which read as part of bring-your-own-model Patrol. It now has its own line saying what an agent can ask and linking the pulse-mcp quick start, and the pulse-mcp introduction leads with the read-only questions a monitoring-read token answers before the governed actions.
2026-10-29 09:39:17 +00:00
rcourtman
f458de49e8 Let agents read a resource's metric history
Agents could read current values and, since list_recent_changes, what
changed, but not how a resource's metrics moved: whether a disk filled
gradually or suddenly, whether memory climbed before a restart. Pulse
records that history for its own charts.

get_metric_history (GET /api/agent/metric-history, monitoring:read,
on the Pulse MCP surface) takes the canonical resource id the other
agent reads return, resolves the resource's metrics target through the
registry, and delegates to the chart history read. Agents and charts
therefore share tiers, fallbacks, downsampling and the licensed history
limit: a window beyond it returns the same license_required error.

The history route now accepts the registry's Kubernetes target kinds
(pod, k8s-cluster, k8s-node, k8s-deployment) as the k8s store type.
The frontend translated them client-side; any other caller passing a
target through got a 400.
2026-10-29 09:26:02 +00:00