fix(ipc): declare the app commands and grant them to the app origin (Tauri 2.11+ ACL)

With Tauri 2.12 every app command was refused ("Command … not allowed by
ACL"): the app is served from http://localhost:44548 (tauri-plugin-
localhost), which Tauri treats as a remote origin, and since the
GHSA-7gmj-67g7-phm9 fix app commands need an explicit capability. The
Windows smoke test caught it (keychain, hotkeys, tray/taskbar/thumbbar,
token migration all failed).

build.rs now declares the 35 commands as an app manifest, and
capabilities/migrated.json (scoped to http://localhost:44548 only) grants
allow-<command> for each. The call page (http://127.0.0.1:44548) and any
remote frame still get no IPC. gen/schemas regenerated by tauri-build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
This commit is contained in:
Lotus CI
2026-10-26 01:59:33 -04:00
co-authored by Claude Opus 5.5
parent e3bc4e128f
commit 7fecf72107
6 changed files with 1334 additions and 8482 deletions
+45 -3
View File
@@ -53,7 +53,49 @@
"autostart:allow-is-enabled",
{
"identifier": "opener:allow-open-url",
"allow": [{ "url": "http://*" }, { "url": "https://*" }]
}
"allow": [
{
"url": "http://*"
},
{
"url": "https://*"
}
]
},
"allow-check-for-update",
"allow-flash-window",
"allow-focus-main-window",
"allow-get-close-behavior",
"allow-get-focus-assist",
"allow-get-start-minimized",
"allow-get-tray-dnd",
"allow-global-hotkeys-supported",
"allow-has-tray-host",
"allow-install-update",
"allow-resolve-close-request",
"allow-secure-session-clear",
"allow-secure-session-get",
"allow-secure-session-set",
"allow-secure-session-supported",
"allow-send-notification",
"allow-set-badge-count",
"allow-set-call-active",
"allow-set-close-behavior",
"allow-set-custom-chrome",
"allow-set-global-hotkeys",
"allow-set-jump-list",
"allow-set-smtc-call-state",
"allow-set-start-minimized",
"allow-set-taskbar-progress",
"allow-set-thumbbar",
"allow-set-tray-call-state",
"allow-set-tray-unread",
"allow-set-tray-update-ready",
"allow-show-rich-toast",
"allow-update-install-kind",
"allow-window-close",
"allow-window-minimize",
"allow-window-start-drag",
"allow-window-toggle-maximize"
]
}
}