Skip to content

Commit f447863

Browse files
authored
Fix: Passes missing arguments to comply with CVE
* Fix: Passes shell_true to comply with CVE --- Close #5923
1 parent 5db0e7f commit f447863

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

packages/extension-vscode/.vscode/launch.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,15 @@
88
"name": "Launch Client",
99
"runtimeExecutable": "${execPath}",
1010
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
11-
"stopOnEntry": false,
1211
"sourceMaps": true,
12+
"autoAttachChildProcesses": true,
1313
"outFiles": ["${workspaceRoot}/dist/src/**/*.js"],
1414
},
1515
{
1616
"type": "node",
1717
"request": "attach",
1818
"name": "Attach to Server",
1919
"address": "localhost",
20-
"protocol": "inspector",
2120
"port": 6009,
2221
"skipFiles": [
2322
"<node_internals>/**/*.js"

packages/extension-vscode/src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const supportedDocuments = activationEvents.map((event: string) => {
2121
let client: LanguageClient;
2222

2323
export const activate = (context: ExtensionContext) => {
24-
const args = [context.globalStoragePath, 'webhint'];
24+
const args = [context.globalStorageUri.fsPath, 'webhint'];
2525
const module = context.asAbsolutePath('dist/src/server.js');
2626
const transport = TransportKind.ipc;
2727

packages/extension-vscode/src/utils/process.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { spawn, SpawnOptions } from 'child_process';
77
/* istanbul ignore next */
88
export const run = (command: string, options?: SpawnOptions) => {
99
const parts = command.split(' ');
10-
const spawnOptions: SpawnOptions = { stdio: 'inherit', windowsHide: true, ...options };
10+
const spawnOptions: SpawnOptions = { shell: true, stdio: 'inherit', windowsHide: true, ...options };
1111
const child = spawn(parts[0], parts.slice(1), spawnOptions);
1212

1313
return new Promise<void>((resolve, reject) => {

0 commit comments

Comments
 (0)