-
Notifications
You must be signed in to change notification settings - Fork 107
V12 #2102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
1f5fd86 to
ca9bbbf
Compare
05fa616 to
36c320d
Compare
|
|
||
| function bootstrap() { | ||
| execSync(path.resolve('scripts/clean.js'), opts) |
Check warning
Code scanning / CodeQL
Shell command built from environment values Medium
absolute path
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix this vulnerability and avoid misinterpretation of a file path passed to the shell, the project should explicitly invoke the script using the Node.js interpreter and pass the path as an argument, rather than passing the resolved path directly as the shell command to execSync. The best practice is to use execFileSync("node", [path.resolve("scripts/clean.js")], opts) instead. This approach ensures that the file path is not interpreted by the shell, and special characters, spaces, or shell metacharacters in the path cannot alter command execution. The edit should be made only on line 68 in scripts/bootstrap.js, replacing the usage of execSync for executing the clean script.
-
Copy modified lines R68-R72
| @@ -65,7 +65,11 @@ | ||
| } | ||
|
|
||
| function bootstrap() { | ||
| execSync(path.resolve('scripts/clean.js'), opts) | ||
| require('child_process').execFileSync( | ||
| 'node', | ||
| [path.resolve('scripts/clean.js')], | ||
| opts | ||
| ); | ||
| buildProject() | ||
| } | ||
|
|
…ts and add new size prop
INSTUI-4816
INSTUI-4811
INSTUI-4805
INSTUI-4803
No description provided.