Skip to content

Commit

Permalink
Fix code scanning alert no. 13: Shell command built from environment …
Browse files Browse the repository at this point in the history
…values

Fixes: https://github.com/redhat-developer/vscode-openshift-tools/security/code-scanning/13

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
  • Loading branch information
vrubezhny and github-advanced-security[bot] committed Dec 10, 2024
1 parent bd779fb commit c6166d2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion build/install-vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ void testElectron.downloadAndUnzipVSCode().then((executable: string) => {
const extDir = path.join(vsCodeTest, 'extensions');
for (const extension of extensionsToInstall) {
console.log('Installing extension: ', extension );
cp.execSync(`${vsCodeExecutable} --install-extension ${extension} --user-data-dir ${userDataDir} --extensions-dir ${extDir}`);
cp.execFileSync(vsCodeExecutable,
['--install-extension', extension, '--user-data-dir', userDataDir, '--extensions-dir', extDir],
{ shell: true });
}
} else {
console.log('No extension dependencies found in "package.json"');
Expand Down

0 comments on commit c6166d2

Please sign in to comment.