Insecure Socket Bind
Binding the socket with an empty IP address will allow it to accept connections from any IPv4 address provided, thus can introduce security risks.
def insecure_socket_bind_noncompliant():
    import socket
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    # Noncompliant: Empty IP Address is passed when binding to a socket.
    s.bind(('', 0))
def insecure_socket_bind_compliant():
    import socket
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    # Compliant: Non-empty IP Address is passed when binding to a socket.
    s.bind(('192.168.1.1', 0))