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.