From 19d5ef569472a0929eca4016d3ffff1ebf9aa2d5 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 1 Oct 2024 19:05:20 -0700 Subject: [PATCH] Fix code scanning alert no. 67: Shell command built from environment values Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- server/migrations/20240930113921-hash-api-keys.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/migrations/20240930113921-hash-api-keys.js b/server/migrations/20240930113921-hash-api-keys.js index ef23f58fbb..7a6b7f0ad1 100644 --- a/server/migrations/20240930113921-hash-api-keys.js +++ b/server/migrations/20240930113921-hash-api-keys.js @@ -1,6 +1,6 @@ "use strict"; -const { execSync } = require("child_process"); +const { execFileSync } = require("child_process"); const path = require("path"); /** @type {import('sequelize-cli').Migration} */ @@ -20,7 +20,7 @@ module.exports = { `server/scripts/${scriptName}` ); - execSync(`node ${scriptPath}`, { stdio: "inherit" }); + execFileSync("node", [scriptPath], { stdio: "inherit" }); }, async down() {