Home

Hard coded IP address

Rule description

  • Hard coded IP address should not be used

 

Non-compliant Code Example

String ls_ip
String ls_ipv6

ls_ip = "127.0.0.1" //Non compliant code(Ip hard coded)
ls_ipv6 = "2001:cdba:0:0:0:0:3257:9652" //Non compliant code(Ip hard coded)

ls_ip = "3.3.3.3" //Non compliant code(Ip hard coded)
ls_ip = testIP("2.2.2.2") //Non compliant code(Ip hard coded)
Return testGlobalIP("1.1.1.1") //Non compliant code(Ip hard coded)
Visual Expert 2020
 VEPBRULE3