0

Checkmarx report is showing Improper Resource Access Authorization for the following line.

String endPoint=prop.getProperty("endpoint");

As mentioned in this answer, I have added access control check before reading the property. But checkmarx report is still showing the error.

String user="admin";
if(user.equals("admin")) {
    String endPoint=prop.getProperty("endpoint");
}
din_oops
  • 698
  • 1
  • 9
  • 27

1 Answers1

1

Resolved the issue like this

 String endPoint=(String)prop.getOrDefault("endpoint", null );
din_oops
  • 698
  • 1
  • 9
  • 27