Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-4507

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

    Details

    • Type: Security Hotspot Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
    • Message:
      Make sure this debug feature is deactivated before delivering the code in production.
    • Default Severity:
      Critical
    • Impact:
      High
    • Likelihood:
      Low
    • Default Quality Profiles:
      Sonar way
    • Covered Languages:
      C#, Java, PHP, Python, VB.Net
    • Irrelevant for Languages:
      ABAP, C#, C, C++, Cobol, CSS, Flex, Go, HTML, JavaScript, Objective-C, PL/I, PL/SQL, Python, RPG, Swift, T-SQL, TypeScript, VB.Net, VB6, XML
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      1min
    • Analysis Scope:
      Main Sources
    • CWE:
      CWE-489, CWE-215
    • OWASP:
      A3
    • Fortify:
      cakephp_misconfiguration_debug_information

      Description

      Delivering code in production with debug features activated is security-sensitive. It has led in the past to the following vulnerabilities:

      An application's debug features enable developers to find bugs more easily. It often gives access to detailed information on both the system running the application and users. Sometime it even enables the execution of custom commands. Thus deploying on production servers an application which has debug features activated is extremely dangerous.

      Ask Yourself Whether

      • the code or configuration enabling the application debug features is deployed on production servers.
      • the application runs by default with debug features activated.

      You are at risk if you answered yes to any of these questions.

      Recommended Secure Coding Practices

      The application should run by default in the most secure mode, i.e. as on production servers. This is to prevent any mistake. Enabling debug features should be explicitly asked via a command line argument, an environment variable or a configuration file.

      Check that every debug feature is controlled by only very few configuration variables: logging, exception/error handling, access control, etc... It is otherwise very easy to forget one of them.

      Do not enable debug features on production servers.

      See

        Attachments

          Issue Links

          1.
          Java RSPEC-4710 Language-Specification Active Unassigned
          2.
          PHP RSPEC-4711 Language-Specification Active Unassigned
          3.
          C# RSPEC-4885 Language-Specification Active Unassigned
          4.
          VB.NET RSPEC-5027 Language-Specification Active Unassigned
          5.
          Python RSPEC-5234 Language-Specification Active Unassigned
          6.
          JavaScript RSPEC-5246 Language-Specification Active Lars Svensson (Inactive)
          7.
          Xml RSPEC-5599 Language-Specification Active Unassigned

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                alexandre.gigleux Alexandre Gigleux
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: