Uploaded image for project: 'SonarPython'
  1. SonarPython
  2. SONARPY-313

Rule S4507: Delivering code in production with debug features activated is security-sensitive

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13
    • Component/s: Rules
    • Labels:
      None

      Description

      from django.conf import settings
      
      settings.configure(DEBUG=True)  # Questionable when set to True
      settings.configure(DEBUG_PROPAGATE_EXCEPTIONS=True)  # Questionable when set to True
      
      def custom_config(config):
          settings.configure(default_settings=config, DEBUG=True)  # Questionable
      

      Django's "global_settings.py" configuration file

      # NOTE: The following code raises issues only if the file is named "global_settings.py". This is the default
      # name of Django configuration file
      
      DEBUG = True  # Questionable
      DEBUG_PROPAGATE_EXCEPTIONS = True  # Questionable
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                andrea.guarino Andrea Guarino
                Reporter:
                nicolas.harraudeau Nicolas Harraudeau
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: