Commit Graph

30 Commits

Author SHA1 Message Date
Ludovic Vielle
ad615a47a0 Show posture values and report history
Pass/fail was the main device UI signal, but operators need
the agent's observed value. Expose a formatted value per
check, show current postures on the device page, and replace
the Postures tab with paginated report history grouped by
agent push time. Status stays in the model for later rulesets.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-29 16:27:23 +02:00
Ludovic Vielle
af7f44c0c1 Fix macOS AUTO_UPDATE when updates are disabled
The check read only AutomaticCheckEnabled from /Library/Preferences,
falling back to softwareupdate --schedule when that key was absent.
Both describe automatic checking alone, so a Mac with downloads or
installs turned off still reported PASS. The key is also absent when
a configuration profile manages it, since the value then lives in
/Library/Managed Preferences, a layer never consulted.

Read the five Software Update preferences backing the System Settings
toggles, resolving each from the managed layer before the system one.
macOS treats them as enabled when unset, so only an explicit disabled
value fails. The now-unused softwareupdate binary leaves the command
allowlist.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 22:16:18 +02:00
Ludovic Vielle
385ddfc0bc Fail Windows elevate on UAC cancel
Start-Process failures left $p null, then exit $null made
PowerShell return 0, so install/uninstall looked successful.
Make launch errors terminating and exit nonzero before
reading ExitCode.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:39 +02:00
Ludovic Vielle
85864a580c Install macOS helper from PKG for XPC enroll
Browser enrollment used osascript on every elevate. Ship a signed
privileged helper installed at PKG time so probo:// can enroll over
XPC with no second admin prompt. Add make install/uninstall/clean for
local PKG test loops, and show alerts only on failure.

Mirror the Go lint path for the macOS SPM package: Make
targets, root configs, and a Linux CI job. Keep checks
syntax-only so they do not need a macOS SDK. Format the
existing sources so the new gates start clean.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:37 +02:00
Ludovic Vielle
754d12d583 Skip tray re-register on deep-link enroll
Browser enrollment succeeds once the device is ACTIVE, but the
macOS URL handler failed whenever install re-bootstrapped a tray
LaunchAgent the PKG had already installed. Skip registration when
the plist is current, treat live bootstrap as best-effort, and
exit successfully if the device is already enrolled so retries
do not show "Enrollment failed".

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:35 +02:00
Ludovic Vielle
afe0c84881 Ship signed universal macOS probo-agent pkg
Publish a notarized arm64+x86_64 .pkg from CI with the CGO tray
binary, Probo Agent.app, and global LaunchAgent. Keep the
LaunchDaemon enrollment-gated, align its plist path with the
launchd label, and document the Apple signing secrets.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:33 +02:00
Ludovic Vielle
4a56be2e3e Improve probo-agent tray icon and enrollment menu
Replace the placeholder orange-circle tray icon with the monochrome
Probo logo used in auditor-mode. On macOS, show the icon only (no
menu bar title); keep the title on Windows.

Restructure the context menu: status rows with colored indicators,
an Enroll via… submenu for region selection, and a clearer About
label. Surface enrollment errors in native dialogs instead of stderr.

Fix self-hosted enrollment on macOS by reading the hostname from
osascript's returned value; the default dialog output order broke
URL parsing and silently skipped opening the browser.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:32 +02:00
Ludovic Vielle
ae769f52a1 Serialize enrollment install with enrolling.lock
Concurrent enroll-url launches could both pass the enrollment
marker check and run overlapping elevated installs, racing on
LoadOrExchangeAPIKey and overwriting agent.key.

Add an exclusive flock on {configDir}/enrolling.lock for the
full install path and re-check IsEnrolled under that lock so
only one install exchanges a token and configures the device.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:30 +02:00
Ludovic Vielle
1329f2a28e Add tray browser enrollment with region picker
The tray helper carried a ServerURL default that nothing read.
Unenrolled users can now open the console /enroll page from the
menu: US, EU, or self-hosted in production, or --server for dev.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-24 15:08:29 +02:00
Ludovic Vielle
d0dd87c6c7 Add probo-agent binary, installer, and CI
Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:25 +02:00
Ludovic Vielle
b442e1ed76 Add device agent library
Provide enrollment, elevated install, posture checks, keystore, and
system-tray helpers shared by the probo-agent binary.

Signed-off-by: Ludovic Vielle <ludovic@probo.com>
2026-07-24 15:08:24 +02:00
Sacha Al Himdani
4c57d201a4 Make license declarations consistently MIT
The source headers, LICENSE files, and license metadata had drifted
apart. Align the entire project to MIT:

- Convert every source-file header to the MIT text across all comment
  styles (Go, TS, TSX, JS, MJS, SQL, CSS, GraphQL, shell), including
  SPDX-License-Identifier tags
- Set the root and cookie-banner LICENSE files to the MIT text with a
  "MIT License" title line
- Switch the package.json license fields, Docker image label, and
  cookie-banner README to MIT
- Update docs and the genmodels header generator accordingly
- Normalize copyright lines to a single format
  (Copyright (c) <year(s)> Probo Inc <hello@probo.com>.): unify the
  hello@getprobo.com and hello@probo.inc emails to hello@probo.com and
  the comma-separated years to a hyphenated range

Genuine third-party references are intentionally left untouched: the
Lucide icon attributions (Lucide is ISC) and the trivy dependency
license allowlist.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
2026-07-13 16:21:14 +02:00
Sacha Al Himdani
9ac71f948f Update contact email to hello@probo.com
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-06-09 16:45:23 +02:00
Bryan Frimin
b8ea34cdea Fix test linux
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 15:02:50 -07:00
Bryan Frimin
4296d168aa Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 14:18:34 -07:00
Bryan Frimin
138f25a170 Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 14:11:59 -07:00
Bryan Frimin
51f37b9d85 Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 14:07:22 -07:00
Bryan Frimin
712f00f434 Update copyright year
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:59:17 -07:00
Bryan Frimin
c46eab5c6e Add i3, kde and more support
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:55:43 -07:00
Bryan Frimin
5c73886faf Fix label name
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:47:14 -07:00
Bryan Frimin
7a3d3db7ac Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:58 -07:00
Bryan Frimin
e040851a4c Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:57 -07:00
Bryan Frimin
e6f988834d Apply go fix stringsseq rewrites to platform-specific check files
Replace strings.Split + for-range-slice with strings.SplitSeq +
for-range-iterator in checks_linux.go and checks_windows.go. These
files are invisible to go fix on macOS (darwin build tag), so the CI
Linux runner caught them first.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:57 -07:00
Bryan Frimin
941ab121da Reject shell-unsafe paths in FreeBSD rc.d install
Validate executable and state directory paths before rendering the
rc.d script so crafted values cannot inject shell syntax.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:57 -07:00
Bryan Frimin
27cccd33aa Make Windows service uninstall idempotent
Treat sc.exe delete error 1060 as success when the service is
already absent so repeated uninstalls do not fail.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:56 -07:00
Bryan Frimin
d310886560 Use platform-specific atomic key replacement on Windows
Swap the keystore through a temp and .old file on Windows instead
of relying on os.Rename alone, which is not reliably atomic there.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:56 -07:00
Bryan Frimin
0a4922f571 Share copyFile helper across Unix and Windows updaters
Move the duplicated file-copy logic into update/copy.go so both
platform installers stay in sync during maintenance.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:56 -07:00
Bryan Frimin
75051cc150 Handle FreeBSD check command failures before reading status
Return unknown when service status commands fail so remote login
and malware checks cannot pass on empty output after an error.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:55 -07:00
Bryan Frimin
0d3b526db0 Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:55 -07:00
Bryan Frimin
22e50b3f11 Add probo-agent CLI and deviceagent library
Introduce the standalone device agent binary and shared library
for enrollment, posture checks, self-update, and OS service
integration. Include build targets, module deps, and release
workflow so the agent can ship independently of server changes.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-26 13:45:54 -07:00