mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Disallow code generation in task runner (#12522)
This commit is contained in:
@@ -117,5 +117,16 @@ describe('TaskRunnerProcess', () => {
|
||||
const options = spawnMock.mock.calls[0][2] as SpawnOptions;
|
||||
expect(options.env).not.toHaveProperty('NODE_OPTIONS');
|
||||
});
|
||||
|
||||
it('should use --disallow-code-generation-from-strings flag', async () => {
|
||||
jest.spyOn(authService, 'createGrantToken').mockResolvedValue('grantToken');
|
||||
|
||||
await taskRunnerProcess.start();
|
||||
|
||||
expect(spawnMock.mock.calls[0].at(1)).toEqual([
|
||||
'--disallow-code-generation-from-strings',
|
||||
expect.stringContaining('/packages/@n8n/task-runner/dist/start.js'),
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user