mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: In our fork React Native macOS, we run [Github's CodeQL ](https://codeql.github.com) to analyze for vulnerabilities. One common one that comes up is the use of `exec` with an uncontrolled absolute path (Example: https://github.com/microsoft/react-native-macos/security/code-scanning/14). The very simple fix to this is to replace calls to `exec` with `execFileSync`, which more or less does the same thing (but more securely!). ## Changelog [INTERNAL] [SECURITY] - Use `execFileSync` over `exec` for cases with uncontrolled absolute paths Pull Request resolved: https://github.com/facebook/react-native/pull/36491 Test Plan: CI should pass Reviewed By: cipolleschi Differential Revision: D44131032 Pulled By: dmytrorykun fbshipit-source-id: 8e0ebb07076838216f878f802ec937d2df44f33a