Commit ba91d16
committed
sec(desktop): narrow capabilities — drop shell:default, process:default, http://*
Replace over-broad default grants with the minimum set the UI actually
needs:
- shell:default → shell:allow-open (only shellOpen(url) is called from
the frontend — no shell:execute).
- process:default → process:allow-restart (relaunch is the only usage;
exit-arbitrary is not).
- http:default now scopes to https://* and the loopback http origins
(localhost / 127.0.0.1). Plain-HTTP arbitrary hosts are refused;
users who need an insecure remote provider must opt in explicitly
rather than getting it by default.
- opener:allow-open-path entries with "app": true are removed; the
app alias is now validated server-side (validate_open_app_name)
and the `open_path` Tauri command already gates the filesystem
target (validate_open_target), so the extra "app": true surface
is redundant and only widened the XSS blast radius.
Closes #8/21.1 parent baf3463 commit ba91d16
1 file changed
Lines changed: 11 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
| 15 | + | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
| |||
35 | 31 | | |
36 | 32 | | |
37 | 33 | | |
38 | | - | |
| 34 | + | |
39 | 35 | | |
40 | 36 | | |
41 | | - | |
| 37 | + | |
42 | 38 | | |
43 | 39 | | |
44 | 40 | | |
45 | 41 | | |
46 | 42 | | |
47 | 43 | | |
48 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
| |||
0 commit comments