I am using checkmarx for security vulnerabilities in code. (react-native). I enabled deep linking in react-native using this guide from the official documentation for ios https://reactnative.dev/docs/linking. From the documentation i added this code to AppDelegate.m
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
return [RCTLinkingManager application:application openURL:url options:options];
}
However checkmarx reports that i need to sanitize or validate the url to prevent XSS attacks, any idea on how to achieve this?