Details

    • Type: Language-Specification
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Impact:
      Unknown 'null' severity
    • Likelihood:
      Unknown 'null' severity

      Description

      Sensitive Code Example

      Dim UrlHttp As String = "http://example.com"                ' Noncompliant
      Dim UrlFtp As String = "ftp://anonymous@example.com"        ' Noncompliant
      Dim UrlTelnet As String = "telnet://anonymous@example.com"  ' Noncompliant
      
      Using Smtp As New SmtpClient("host", 25)    ' Noncompliant, EnableSsl Is Not Set
      End Using
      Using Telnet As New MyTelnet.Client("host", port) ' Noncompliant, rule raises Security Hotspot On any member containing "Telnet"
      End Using
      

      Compliant Solution

      Dim UrlHttps As String = "https://example.com"
      Dim UrlSftp As String = "sftp://anonymous@example.com"
      Dim UrlSsh As String = "ssh://anonymous@example.com"
      
      Using Smtp As New SmtpClient("host", 25) With {.EnableSsl = True}
      End Using
      Using Ssh As New MySsh.Client("host", port)
      End Using
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            pavel.mikula Pavel Mikula
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: