Uploaded image for project: 'SonarSlang'
  1. SonarSlang
  2. SONARSLANG-403

Improve S2068 (hard-coded credentials) to support map literals

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.9
    • Component/s: Apex, Go, Kotlin, Ruby, Scala
    • Labels:
      None

      Description

      Currently, the rule S2068 supports only variable declaration and assignment using a hardcoded string literal. This rule should also support map literals.

      Ruby example:

      options = { user: "paul", password: "123456"}
      

      Or

      options = { :user => "paul", :password => "123456"}
      

      Or

      options = { "user" => "paul", "password" => "123456"}
      

      Scala example:

      val states = Map("user" -> "paul", "password" -> "123456")
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              alban.auzeill Alban Auzeill
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated: