navidrome/plugins/testdata
Deluan Quintão 810b14ed57
fix(plugins): confine plugin filesystem mounts to their root (#5881)
* fix(plugins): confine plugin filesystem mounts to their root

A plugin granted read-write filesystem access could escape its mount by
creating a relative symlink inside it and then writing through that link,
reaching any path the server process can write, including navidrome.db.

wazero resolves guest paths by concatenating them onto the host root. Its
WASI layer validates every path argument except the symlink target, which
path_symlink forwards unvalidated by design, and fs.ValidPath splits on
"/" only, so on Windows a "..\" path escapes the mount as well.

Mounts now go through a jailedFS wrapper that denies symlink creation and
rejects any path that is not filepath.IsLocal. That requires bypassing
extism's AllowedPaths, which discards any FSConfig passed alongside it, so
the mounts are built directly and applied per instance instead. Following
symlinks that already exist in a mount is unchanged: music libraries rely
on it, and read-only mounts already reject creating new ones.

* test(plugins): guard against setting extism AllowedPaths

Extracts the extism manifest construction so a test can assert AllowedPaths
is never set. Setting it makes extism build its own FSConfig and discard the
jailed mounts, silently restoring the symlink escape.

Verified by simulating the regression: with AllowedPaths populated for plugins
holding the filesystem permission, the new spec fails, as do two of the
end-to-end sandbox specs.
2026-08-02 12:27:08 -04:00
..
partial-metadata-agent feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
test-artwork feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
test-cache-plugin feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
test-config feat(plugins): add JSONForms-based plugin configuration UI (#4911) 2026-01-19 20:51:00 -05:00
test-kvstore feat(plugins): add TTL support, batch operations, and hardening to kvstore (#5127) 2026-02-28 23:12:17 -05:00
test-library fix(plugins): confine plugin filesystem mounts to their root (#5881) 2026-08-02 12:27:08 -04:00
test-lyrics refactor(lyrics): single ParseLyrics entry point + all-format plugin lyrics (#5632) 2026-06-19 18:25:35 -04:00
test-matcher feat(plugins): expose the song Matcher as a host service (#5643) 2026-07-01 11:19:15 -04:00
test-metadata-agent feat(plugins): share plugin DTOs via a types package (#5655) 2026-06-29 21:20:33 -04:00
test-scheduler feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
test-scrobbler feat(plugins): add PlaybackReport to scrobbler capability (#5452) 2026-05-02 16:14:53 -04:00
test-sonic-similarity feat(plugins): share plugin DTOs via a types package (#5655) 2026-06-29 21:20:33 -04:00
test-subsonicapi-plugin feat(plugins): add SubsonicAPI CallRaw, with support for raw=true binary response for host functions (#4982) 2026-02-04 15:48:08 -05:00
test-taskqueue feat(plugins): add TaskQueue host service for persistent background task queues (#5116) 2026-03-03 13:48:49 -05:00
test-users feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00
test-websocket feat(plugins): change websockets Data field type to []byte for binary support 2026-03-02 16:38:00 -05:00
Makefile feat(plugins): New Plugin System with multi-language PDK support (#4833) 2026-01-14 19:22:48 -05:00