Insecure connection using unencrypted protocol
Connections that use insecure protocols transmit data in cleartext. This introduces a risk of exposing sensitive data to third parties.
def ftp_connection_noncompliant():
    import ftplib
    # Noncompliant: insecure ftp used.
    cnx = ftplib.FTP("ftp://anonymous@example.com")
def ftp_connection_compliant():
    import ftplib
    # Compliant: secure ftp_tls used.
    cnx = ftplib.FTP_TLS("ftp.example.com")