I have an app in React Native, and when I run npm install I received this error "found 15 vulnerabilities (5 moderate, 10 high) in 1182 scanned packages". After run npm audit the most of error contains this:
High Prototype Pollution in set-value
Package set-value
Patched in >=4.0.1
Dependency of react-native
Path react-native > @react-native-community/cli > @react-native-community/cli-plugin-metro > metro-config > metro-core > jest-haste-map > sane > anymatch > micromatch > braces > snapdragon > base > cache-base > set-value
and this:
Moderate Inefficient Regular Expression Complexity in chalk/ansi-regex
Package ansi-regex
Patched in >=5.0.1
Dependency of react-native
Path react-native > @react-native-community/cli > strip-ansi > ansi-regex
Could anyone help me fix these problems?
For Moderate Inefficient Regular Expression Complexity in chalk/ansi-regex see Qix's comment on the following thread: https://github.com/chalk/ansi-regex/commit/8d1d7cdb586269882c4bdc1b7325d0c58c8f76f9
tldr: sanitize user input before it hits an API, if applicable