fix(core): Prevent prototype pollution in task runner (#12588)

This commit is contained in:
Iván Ovejero
2025-01-15 09:51:42 +01:00
committed by GitHub
parent 674ba3c59a
commit bdf266cf55
5 changed files with 99 additions and 5 deletions

View File

@@ -106,9 +106,13 @@ export class TaskRunnerProcess extends TypedEmitter<TaskRunnerProcessEventMap> {
startNode(grantToken: string, taskBrokerUri: string) {
const startScript = require.resolve('@n8n/task-runner/start');
return spawn('node', ['--disallow-code-generation-from-strings', startScript], {
env: this.getProcessEnvVars(grantToken, taskBrokerUri),
});
return spawn(
'node',
['--disallow-code-generation-from-strings', '--disable-proto=delete', startScript],
{
env: this.getProcessEnvVars(grantToken, taskBrokerUri),
},
);
}
@OnShutdown()