While using file upload function the security scan is showing high risk. The code as show below,
<input type="file" accept=".csv" (change)="uploadfile($event)">
uploadfile(e) {
const reader = new FileReader();
reader.onload = () => {
const data = reader.result;
this.performcalc(data);
};
reader.readAsBinaryString(e.target.files);
}
while the above code scan, it show high risk. In between have done validation and sanitize, but still showing high risk.
Is there any better solution to avoid security risk.
See socket.dev's analysis on Cordova. The short version is: 3 of its dependencies are deprecated.