feat(acl): gate every app command per window via a Tauri AppManifest

build.rs now derives an AppManifest from generate_handler!, which makes
tauri 2.11 apply the ACL to app commands (it skips them entirely without
one). default.json grants the 110 main-window commands, file-viewer.json
the five viewer_* commands, and build.rs refuses to build on a missing,
misspelled, duplicated, misfiled or deny-* grant, or on a hand-written
permission file. Stale autogenerated permissions are pruned per build.

Closes the residual risk recorded by the terminal file viewer: a
compromised viewer window could invoke any app command.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-22 22:26:18 -07:00
co-authored by Claude Opus 5.5
parent 92a2d9de4a
commit 05d991181d
11 changed files with 3038 additions and 8 deletions
+111 -1
View File
@@ -7,6 +7,116 @@
"core:event:allow-unlisten",
"core:webview:allow-internal-toggle-devtools",
"dialog:allow-open",
"dialog:allow-save"
"dialog:allow-save",
"allow-check-docker",
"allow-check-image-exists",
"allow-build-image",
"allow-get-container-info",
"allow-list-projects",
"allow-add-project",
"allow-remove-project",
"allow-update-project",
"allow-start-project-container",
"allow-stop-project-container",
"allow-rebuild-project-container",
"allow-reconcile-project-statuses",
"allow-list-notes",
"allow-save-note",
"allow-delete-note",
"allow-get-container-staleness",
"allow-migrate-project-to-base",
"allow-confirm-migration",
"allow-rollback-migration",
"allow-get-migration-state",
"allow-set-auth-bridge-enabled",
"allow-get-auth-bridge-status",
"allow-set-browser-view-enabled",
"allow-get-browser-view-status",
"allow-check-browser-view-support",
"allow-install-browser-view-support",
"allow-install-browser-view-browser",
"allow-open-browser-view-popout",
"allow-close-browser-view-popout",
"allow-get-browser-view-popout-state",
"allow-set-browser-view-popout-always-on-top",
"allow-open-page-in-container-browser",
"allow-set-container-page-viewport",
"allow-get-container-page-state",
"allow-close-container-page",
"allow-set-browser-view-match-window",
"allow-get-browser-view-match-window",
"allow-acquire-claude-token",
"allow-submit-claude-token-code",
"allow-cancel-claude-token",
"allow-has-claude-token",
"allow-clear-claude-token",
"allow-sweep-claude-token-snapshots",
"allow-get-settings",
"allow-update-settings",
"allow-pull-image",
"allow-detect-aws-config",
"allow-inspect-ca-cert-path",
"allow-list-aws-profiles",
"allow-detect-host-timezone",
"allow-export-settings",
"allow-preview-settings-import",
"allow-apply-settings-import",
"allow-open-terminal-session",
"allow-terminal-input",
"allow-terminal-resize",
"allow-close-terminal-session",
"allow-paste-image-to-terminal",
"allow-upload-host-file-to-terminal",
"allow-start-audio-bridge",
"allow-send-audio-data",
"allow-stop-audio-bridge",
"allow-list-container-files",
"allow-download-container-backup",
"allow-download-container-file",
"allow-upload-files-to-container",
"allow-read-container-file",
"allow-rename-container-path",
"allow-create-container-directory",
"allow-open-file-viewer",
"allow-aws-sso-refresh",
"allow-get-app-version",
"allow-check-for-updates",
"allow-check-image-update",
"allow-get-help-content",
"allow-open-url-external",
"allow-detect-install-options",
"allow-run-docker-install",
"allow-start-web-terminal",
"allow-stop-web-terminal",
"allow-get-web-terminal-status",
"allow-regenerate-web-terminal-token",
"allow-get-stt-status",
"allow-start-stt",
"allow-stop-stt",
"allow-build-stt-image",
"allow-pull-stt-image",
"allow-transcribe-audio",
"allow-get-gateway-status",
"allow-start-gateway",
"allow-stop-gateway",
"allow-check-gateway-health",
"allow-build-gateway-image",
"allow-pull-gateway-image",
"allow-set-gateway-api-key",
"allow-clear-gateway-api-key",
"allow-get-gateway-auth-token",
"allow-regenerate-gateway-auth-token",
"allow-list-claude-sessions",
"allow-resume-session-command",
"allow-list-container-capabilities",
"allow-list-scheduled-tasks",
"allow-add-scheduled-task",
"allow-update-scheduled-task",
"allow-get-scheduled-task-log",
"allow-set-scheduled-task-enabled",
"allow-run-scheduled-task-now",
"allow-remove-scheduled-task",
"allow-get-scheduler-notifications",
"allow-clear-scheduler-notifications"
]
}