Hardcoded IP address
We recommend that you do not hardcode IP addresses because they might change. A hardcoded IP address can make your code vulnerable to denial of service attacks and IP address spoofing to bypass security checks.
def hardcoded_ip_address_noncompliant():
    sock = socket(AF_INET, SOCK_STREAM)
    # Noncompliant: IP address is hardcoded.
    sock.bind(('193.168.14.31', 80))
def hardcoded_ip_address_compliant(ip_add=None):
    sock = socket(AF_INET, SOCK_STREAM)
    # Compliant: IP address is not hardcoded.
    sock.bind((ip_add, 5080))