1

I am using this code to read all the files in Java folder with which are ending with ".properties".

@Value("classpath*:com/tech/java/*.properties")
    private Resource[] files;

for (Resource resource : files) {

File file = resource.getFile();

try (BufferedReader br = new BufferedReader(new FileReader(file))) {

Fortify scan is failing at try (BufferedReader br = new BufferedReader(new FileReader(file))) with the security vulnerability saying that there is a chance of path manipulation.

BSMP
  • 4,596
  • 8
  • 33
  • 44
sandeep
  • 11
  • 1
  • this may help - [Fortify Path Manipulation error](https://stackoverflow.com/questions/21263056/fortify-path-manipulation-error) – Hemant May 02 '20 at 09:43
  • How to create the whitelist for my filepath. can you please help me with this. – sandeep May 02 '20 at 20:07

0 Answers0