fix(fs): allow open, seek and fstat in the write permission sets (#3630)

* fix(fs): allow open, seek and fstat in the write permission sets

The stream path of writeFile calls `open`, which only the nested command
list of `allow-write-file` granted (plugins/fs/permissions/write-all.toml,
write-files.toml), so `fs:allow-appdata-write-recursive` and the other
write sets rejected streamed writes; seek/fstat were missing for
FileHandles created under these sets.

Adds open, seek and fstat to write-all and write-files. This widens the
write sets slightly (open is already implied by allow-write-file); the
generated reference does not list set members, so nothing to regenerate.

* use dependencies instead
This commit is contained in:
Lucas Fernandes Nogueira authored and GitHub committed 2026-10-10 16:06:43 -03:00
1 parent db25585357
commit 6a263bec1c
5 files changed
+147 -65

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
---
fs: patch
fs-js: patch
---
The `write-all` and `write-files` permissions (and so every `allow-*-write[-recursive]` set) are now sets of the `allow-*` command permissions, so they also allow the commands a command depends on. `writeFile` with a `ReadableStream` uses `open` and failed with "not allowed" under these sets.