I am trying to read a file stored in filesystem in Java using the below code.
byte[] readAllBytes = null;
File templateFile = new File("/myfolder/abc.png");
readAllBytes = Files.readAllBytes(templateFile.toPath());
While scanning this code in Checkmarx tool, the tool raises an issue of "Incorrect Permission Assignment For Critical Resources" . I have referred here about this issue and understand that it is about creating a file with the correct permissions so that it is not misused. But here, I am not creating a file, but I am reading a file. In this case how will I resolve this issue in Checkmarx?