Whitelisting a specific hardcoded IP

So I have in some code the following hardcoded IP being declared:

def nodeInfo(self):

And, yes, the hardcoded IP is exactly that because it acts as a placeholder; this is sample code we added to show people how use our code. All of our sample code is in a separate test directory. sonarqube is flagging that as a Security Hotspot, which is fine. But

  1. How to find out which rule called that out?
  2. How can I whitelist it for that specific IP? I really would rather not whitelist the test dir, but that is on the table.

Hey there.

No whitelist is available for this rule (S1313, by the way). Why not simply mark the hotspot “Reviewed as Safe”?

The reason is I want to be specific to that fake IP, but flag any other hardcoded one. i.e. if developers get code flagged because of hardcoded IP, that means they did not use the fake IP.

Also, how would I find out it was rule S1313? I do want my posts here to be as accurate and complete as possible.