From bec6c9f2e7d773d43b73217cc7377de90cc1d21f Mon Sep 17 00:00:00 2001 From: Hannu Hartikainen Date: Tue, 13 Jun 2023 12:46:50 +0300 Subject: [PATCH] Run external binary without environment variables (The environment variables contain the slack token and an AWS token that could be used to write logs.) --- lambda/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lambda/index.js b/lambda/index.js index 548f57d..c8a30c9 100644 --- a/lambda/index.js +++ b/lambda/index.js @@ -62,7 +62,7 @@ exports.handler = async (snsrecs) => { let p = child_process.spawnSync( process.env.LAMBDA_TASK_ROOT + "/" + process.env.BOT_EXE, [tmpfile], - {shell: false, timeout: 5000}); + {shell: false, timeout: 5000, env: {}}); res = p.stdout.toString() || p.stderr.toString(); if (res) { res = "\`\`\`\n" + res + "\`\`\`"; -- 2.45.2