mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 08:53:13 +00:00
fix(plugins): restrict child runtime modules
Plugins access their storage through the scoped database API.
This commit is contained in:
@@ -82,6 +82,7 @@ describe('paths', () => {
|
||||
delete process.env.TREK_PLUGIN_PERMISSIONS;
|
||||
const args = pluginPermissionArgs('flight-tracker');
|
||||
expect(args).toContain('--permission');
|
||||
expect(args).toContain('--no-experimental-sqlite');
|
||||
// read is scoped to the compiled server dir + this plugin's own code dir…
|
||||
expect(args.some((a) => a === `--allow-fs-read=${serverCodeRoot()}`)).toBe(true);
|
||||
expect(args.some((a) => a === `--allow-fs-read=${pluginCodeDir('flight-tracker')}`)).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user