-
Notifications
You must be signed in to change notification settings - Fork 106
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 2 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() | ||
| } | ||
|
|
…token-based theme system - Remove theme.ts files from View and ContextView components - Switch from withStyleRework to withStyle decorator - Update components to use NewComponentTypes and SharedTokens - Enhance calcMarginFromShorthand to support hyphen-case tokens - Add elevationTokenToBoxShadow utility for box-shadow token conversion - Add processBorderRadiusValue and processBorderWidthValue helpers - Add withFocusOutline parameter to calcFocusOutlineStyles - Fix ContextView placement padding override with high-specificity selector
… borderStyle to use token instead
…ble in the docs app
No description provided.