Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10555

Fail analysis when leak period is invalid

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.4
    • Component/s: None
    • Labels:
    • Edition:
      Community

      Description

      Currently, you can set your leak period to a random string, and it will be interpreted as a version, whether or not that version actually exists in your project. A subsequent analysis against that bad leak value results in no leak period.

      Instead, we should fail fast if the leak setting is not one of

      • valid, in-the-past date
      • positive integer (number of days)
      • previous_version
      • an existing project version

      The analysis error should be:

      Invalid new code period. "[leak string]" is not one of: positive integer, date in the past, "previous_version", or version string that exists in the project.

      Because it's currently possible to have projects with empty new code period values, we'll do a DB migration to reset such projects to use previous_version.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sebastien.lesaint Sebastien Lesaint
                Reporter:
                ann.campbell.2 Ann Campbell
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: