From 7bc315227b878a9beb6921f6d48027e92e3b0ba3 Mon Sep 17 00:00:00 2001 From: anupamme Date: Tue, 25 Aug 2026 02:26:10 +0000 Subject: [PATCH] fix: javascript.lang.security.detect-child-process.detect-child-process security vulnerability Automated security fix generated by OrbisAI Security --- test.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test.js b/test.js index 59d037b..4c2308b 100644 --- a/test.js +++ b/test.js @@ -2,16 +2,15 @@ // Run `./changelog-maker.js` by itself to set this up. import { dirname, join } from 'path' -import { execSync } from 'child_process' +import { spawnSync } from 'child_process' import { test } from 'tap' import chalk from 'chalk' const __dirname = dirname(new URL(import.meta.url).pathname) function exec (args) { - const stdout = execSync(`"${process.execPath}" ${join(__dirname, 'changelog-maker.js')} ${args}`).toString() - - return stdout + const result = spawnSync(process.execPath, [join(__dirname, 'changelog-maker.js'), ...args.split(' ')], { encoding: 'utf8' }) + return result.stdout } test('test basic commit block', (t) => {