Conversation
There was a problem hiding this comment.
Orca Security Scan Summary
| Status | Check | Issues by priority | |
|---|---|---|---|
| Infrastructure as Code | View in Orca | ||
| SAST | View in Orca | ||
| Secrets | View in Orca | ||
| Vulnerabilities | View in Orca |
🛡️ The following SAST misconfigurations have been detected
| NAME | FILE | ||
|---|---|---|---|
| User Input Can Control File Paths Leading to Directory Traversal | fail.java | View in code | |
| Potential XSS Vulnerability from Unsanitized Servlet Parameters | fail.java | View in code |
| Files.deleteIfExists(destinationFile); | ||
| Files.copy(is, destinationFile); | ||
| } | ||
| log.debug("File saved to {}", new File(destinationDir, multipartFile.getOriginalFilename())); |
Check warning
Code scanning / Orca Shift-Left Security
User input is being used to control a file path, which can lead to directory traversal vulnerabilities (e.g., using '../' to access unintended directories). It's crucial to sanitize any user-controlled variables in file paths to mitigate this risk. Consider using utility methods, like org.apache.commons.io.FilenameUtils.getName(...), to extract only the file name from a given path. Warning
| modelAndView.setViewName("files"); | ||
| File changeIndicatorFile = new File(destinationDir, username + "_changed"); | ||
| if (changeIndicatorFile.exists()) { | ||
| modelAndView.addObject("uploadSuccess", request.getParameter("uploadSuccess")); |
Check warning
Code scanning / Orca Shift-Left Security
The Servlet can receive GET and POST parameters from multiple methods. These values are potentially unsafe and should be validated or sanitized before being used in sensitive APIs. Warning

No description provided.