You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
review: browser PAC reporting (mirror of upstream #162) - #36
Review-only PR inside the fork, to get a Copilot review of the change proposed upstream in agentdesktop-dev#162. Base is upstream main (05d3030), so the diff is exactly that PR. Will be closed after the review.
Chromium's Linux policy loader accepts comments and trailing commas, but read_json uses strict serde_json::from_str. A valid managed PAC policy using either syntax is skipped, so the device can appear to have no PAC or fail compliance even though the browser applies it. Use Chromium-compatible JSONC parsing here, leaving the shared Firefox reader unchanged, and add tests for both extensions.
This rejects conflicting legacy keys before applying ProxySettings precedence. Two files with different legacy ProxyPacUrl values plus an unambiguous ProxySettings dictionary produce an error here, although the dictionary overrides those legacy values. That hides the effective PAC and can falsely report noncompliance. Collect the settings first, then validate conflicts only in the effective representation; test that overridden legacy conflicts do not hide ProxySettings.
Firefox selects wrong policy file when Proxy section is missing
crates/agent/src/browser_pac.rs:485
Firefox selects a policy file as a whole; it does not search other files for a missing Proxy section. This continue can therefore report a locked PAC from an ignored file when the active file contains only unrelated policies, potentially producing a false compliant verdict. Select the active file using the installation's Firefox precedence first, then report no PAC if that file has no Proxy. Add a regression test with competing policy files.
Firefox incorrectly falls back to JSON despite active registry policies
crates/agent/src/browser_pac.rs:1074
Firefox uses the Windows registry policy provider instead of policies.json when registry policies are present, even if none configure the proxy. With an unrelated registry policy such as DisableAppUpdate and an old locked PAC in distribution\policies.json, this path falls back to the ignored file and can falsely report compliance. Check whether the registry provider is active at the Firefox policy root before allowing the JSON fallback, and test this combination.
Watch resync: fixed in b031324 (daemon.rs: the watch is synced after every scan, before the unchanged-inventory check), with a regression test that fails on the old order.
JSONC in Chromium policy files, ProxySettings vs. conflicting legacy keys, Firefox's single active file on Linux: fixed in 74e64d9, with tests. Checked against Chromium's config_dir_policy_loader.cc and Firefox's EnterprisePoliciesParent.sys.mjs (_getLocalConfigurationFile).
Firefox on Windows ignoring policies.json when registry policies exist: not changed. Firefox combines the JSON and GPO providers, the GPO taking precedence per top-level policy (_buildProvider on main; CombinedProvider in _chooseProvider before July 2026), so a registry policy like DisableAppUpdate doesn't disable the JSON file's Proxy.
* add macOS installers to the release
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
* macos signing wip
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
---------
Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
…page (agentdesktop-dev#172)
The test aborts the first device page server, starts the continued page
on the same port and requested it with the same client, which may still
pool a keep-alive connection to the aborted server; a request sent on it
is reset ("Connection reset by peer" in CI). Use a fresh client for the
continued page.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…gentdesktop-dev#177)
* feat: let device users choose which configured programs are managed
Add `programSelection.allowUserChoice` to the daemon configuration (off by
default). When it is on, the device user can opt out of every configured
program, or keep only the ones they pick, with `agentdesktop programs set`.
- The daemon stores the choice in its state directory and leaves the
programs out before every apply, so each provider's existing cleanup
removes only the files Agentdesktop owns.
- Opted-out programs report a new `opted_out` state (proto, agent,
controller) on every apply, so admins see it on the device page.
- `GET /v1/programs` and `POST /v1/programs/choice` read and change the
choice; a change re-applies right away and is reported to the controller.
Refs agentdesktop-dev#174
* fix(agent): keep program choice consistent across reports, --once and sign-in
- Number each apply under the apply lock and publish re-apply outcomes
through one helper that never replaces a later apply's outcome, so a
tick that finishes after a program choice change cannot report the old
choice to the controller.
- Validate `--once` against the chosen programs: an opted-out Copilot CLI
or VS Code, or an opted-out gateway program, is only cleaned up.
- Start no automatic gateway sign-in (startup, cached and pushed
configuration) while the device user has opted out of every program
that uses the gateway and no local LLM proxy runs; opting back in
starts the device authorization that was skipped.
* feat(controller-web): show opted-out programs and build programSelection (agentdesktop-dev#178)
- Device page: the "Managed programs" card labels the `opted_out` state
"Opted out" with a neutral badge and a title explaining that the device
user opted out of the program.
- Configuration builder: a "Program selection" section with a "Let device
users choose which programs are managed" checkbox. When checked, the
generated YAML includes `programSelection: { allowUserChoice: true }`,
and a notice warns that daemons predating the setting reject it. The
checkbox is seeded from the active daemon configuration.
- Rename the `.sandbox-compatibility` notice style to `.config-notice` so
both sections share it.
- Stories: a device with an opted-out program, a configuration seeded with
`programSelection`, and an interaction test that toggling the checkbox
adds and removes the key.
Refs agentdesktop-dev#174
* feat(desktop): let device users choose managed tools in Settings (agentdesktop-dev#179)
Add a "Managed tools" card to the desktop Settings view, backed by the
daemon's program management API.
- Tauri commands `get_program_management` (GET /v1/programs) and
`set_program_choice` (POST /v1/programs/choice) relay to the daemon.
- The desktop model polls program management with the existing status
poll and adds `setProgramChoice`, which shows the choice while saving
and reports the daemon's error text when it refuses one.
- When the policy allows a choice, the card offers All / Only these /
None with a switch per configured tool; otherwise it lists the tools
as managed by the organization. Each tool shows its last apply state,
including "Opted out".
- Stories cover each state, the choices sent, and the refused case.
Refs agentdesktop-dev#174
…check
Browsers have no per-tool LLM setting; enterprises steer browser AI traffic
with a PAC file pushed by MDM or GPO. The daemon now reports, per device,
the PAC that browser machine policy sets: absent, found with its URL, or
differs between browsers.
- agent: Chrome, Edge, Chromium and Firefox policy readers for Linux
(policy files) and Windows (registry; HKCU only when running as the
user); the PAC URL is fetched directly and identified by SHA-256 and
size, never its content; policy directories are watched
- proto: Inventory.browser_pacs = 3, Inventory.pac_fetches = 4
- controller: migration 0004_browser_pacs; optional
browserEgress.compliance.pacUrl in the controller configuration, evaluated
at read time (compliant or not, with the reason); PAC versions grouped by
URL and hash on the overview
- UI: fleet device column, device card and overview tiles; desktop app card
- README section, regenerated schemas
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Linux: merge the proxy keys across policy files the way Chrome merges
policies, so ProxyMode and ProxyPacUrl in different files still give a
PAC; the same key with different values is still a conflict
- Linux: a policy directory that can't be read is reported instead of
looking like "no policy"
- inventory refresh: resync the file watch after every scan, not only when
the inventory changed, so a policy file in a directory created empty
first is seen without waiting for the interval (regression test)
- fleet UI: when browsers set different PACs, the device page lists each
PAC URL with its hash or fetch error
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Chromium policy files may contain comments and trailing commas, as
Chromium's loader accepts them (JSON_PARSE_CHROMIUM_EXTENSIONS |
JSON_ALLOW_TRAILING_COMMAS); the Firefox reader stays strict JSON
- a conflict between legacy ProxyMode/ProxyPacUrl values no longer hides
a ProxySettings dictionary, which overrides them
- Linux Firefox: only the file Firefox uses counts
(/etc/firefox/policies/policies.json when it exists, otherwise the
install's distribution/ file), so a Proxy section in an ignored file
can't be reported
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dev#160agentdesktop-dev#160 added 0004_usage.sql; the browser PAC tables move to
0005_browser_pacs.sql. No content change.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One row per installation, from the policy that installation reads:
snap Chromium /etc/chromium-browser only, Flatpak Chromium its
org.chromium.Chromium.Extension.* extensions only, Firefox
/etc/firefox/policies or the installation's own distribution file,
Flatpak Firefox reported as not read. A browser with policy but no
installation found is one row from all its locations. Windows Firefox
reads the registry, then each installation's distribution file.
browser_pacs is keyed by (device_id, browser, packaging).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review-only PR inside the fork, to get a Copilot review of the change proposed upstream in agentdesktop-dev#162. Base is upstream main (05d3030), so the diff is exactly that PR. Will be closed after the review.
🤖 Generated with Claude Code