mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-06 02:34:21 +00:00
fix(plugins): restrict child runtime modules
Plugins access their storage through the scoped database API.
This commit is contained in:
@@ -182,6 +182,8 @@ export function pluginPermissionArgs(pluginId: string): string[] {
|
||||
const codeRoot = serverCodeRoot();
|
||||
return [
|
||||
'--permission',
|
||||
// Built-in SQLite is outside Node's filesystem allowlist. Plugins use ctx.db.
|
||||
'--no-experimental-sqlite',
|
||||
`--allow-fs-read=${codeRoot}`,
|
||||
// The server package.json sits one level above dist and Node reads it to
|
||||
// resolve the child's module type. Grant just that file — never its dir,
|
||||
|
||||
Reference in New Issue
Block a user