feat(security): per-window capabilities, overlay locked down

Removed `core:window:allow-set-opacity` from the default capability —
that permission identifier doesn't exist in Tauri 2.11.x. Window
opacity is exposed only on the Rust side; the JS layer routes through
our custom `set_window_opacity` command (added in Task 16).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Michael Chihlas
2026-05-08 19:13:49 -04:00
parent 7e21a39c7f
commit 4782c087b4
2 changed files with 18 additions and 2 deletions

View File

@@ -1,10 +1,19 @@
{ {
"$schema": "../gen/schemas/desktop-schema.json", "$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default", "identifier": "default",
"description": "Capability for the main window", "description": "Capability for the main control window",
"windows": ["main"], "windows": ["main"],
"permissions": [ "permissions": [
"core:default", "core:default",
"opener:default" "core:webview:allow-create-webview-window",
"core:window:allow-set-always-on-top",
"core:window:allow-set-ignore-cursor-events",
"core:window:allow-close",
"core:window:allow-current-monitor",
"opener:default",
"store:default",
"global-shortcut:allow-register",
"global-shortcut:allow-unregister",
"global-shortcut:allow-is-registered"
] ]
} }

View File

@@ -0,0 +1,7 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "overlay",
"description": "Locked-down capability for the overlay window — pages loaded here cannot call Tauri APIs",
"windows": ["overlay"],
"permissions": []
}