SonarSource Rules
  • Products

    In-IDE

    Code Quality and Security in your IDE with SonarQube Ide

    IDE extension that lets you fix coding issues before they exist!

    Discover SonarQube for IDE

    SaaS

    Code Quality and Security in the cloud with SonarQube Cloud

    Setup is effortless and analysis is automatic for most languages

    Discover SonarQube Cloud

    Self-Hosted

    Code Quality and Security Self-Hosted with SonarQube Server

    Fast, accurate analysis; enterprise scalability

    Discover SonarQube Server
  • SecretsSecrets
  • ABAPABAP
  • AnsibleAnsible
  • ApexApex
  • AzureResourceManagerAzureResourceManager
  • CC
  • C#C#
  • C++C++
  • CloudFormationCloudFormation
  • COBOLCOBOL
  • CSSCSS
  • DartDart
  • DockerDocker
  • FlexFlex
  • GitHub ActionsGitHub Actions
  • GoGo
  • HTMLHTML
  • JavaJava
  • JavaScriptJavaScript
  • JSONJSON
  • JCLJCL
  • KotlinKotlin
  • KubernetesKubernetes
  • Objective CObjective C
  • PHPPHP
  • PL/IPL/I
  • PL/SQLPL/SQL
  • PythonPython
  • RPGRPG
  • RubyRuby
  • RustRust
  • ScalaScala
  • ShellShell
  • SwiftSwift
  • TerraformTerraform
  • TextText
  • TypeScriptTypeScript
  • T-SQLT-SQL
  • VB.NETVB.NET
  • VB6VB6
  • XMLXML
  • YAMLYAML
XML

XML static code analysis

Unique rules to find Bugs and Code Smells in your XML code

  • All rules 37
  • Vulnerability7
  • Bug5
  • Security Hotspot9
  • Code Smell16
 
Tags
    Impact
      Clean code attribute
        1. Components should be explicitly exported

           Vulnerability
        2. Custom permissions should not be defined in the "android.permission" namespace

           Vulnerability
        3. Exported component access should be restricted with appropriate permissions

           Vulnerability
        4. Struts validation forms should have unique names

           Vulnerability
        5. Struts filters should not miss their corresponding filter-map

           Vulnerability
        6. Default EJB interceptors should be declared in "ejb-jar.xml"

           Vulnerability
        7. Basic authentication should not be used

           Vulnerability

        Struts filters should not miss their corresponding filter-map

        intentionality - logical
        security
        maintainability
        Vulnerability

          This vulnerability exposes the application to failures of a wide range of application-specific features the Strut filter was supposed to perform, such as authentication, logging, encryption, and more.

          Why is this an issue?

          How can I fix it?

          More Info

          Filters are used to intercept requests and responses from a server and allow developers to manipulate them. When a filter is declared, but the corresponding filter assignment is inadvertently not, then the code is vulnerable to security problems or business logic instability.

          If a filter is defined in the web application descriptor file web.xml but is not used in a "filter mapping", this is an indication that it may have been forgotten.

          What is the potential impact?

          If a filter is not used in a <filter-mapping> element, it will not be called. Below are some examples of the impact of this oversight.

          Unauthorized access

          One of the main uses of Struts filters is to provide security measures such as authentication and authorization. If a filter is forgotten in the filter mappings, unauthorized users could gain access to sensitive data or perform actions that they are not authorized to perform.

          Functional problems

          Filters can also be used to modify requests and responses, format data, or even handle errors. If these features are not included in the filter mappings, they may not work as expected, resulting in a poor user experience or even application crash.

          Performance issues

          Some filters are designed to improve the performance of your application, such as those that implement caching strategies. If these are not mapped, you may experience slow response times or increased server load on your application.

            Available In:
          • SonarQube IdeCatch issues on the fly,
            in your IDE
          • SonarQube CloudDetect issues in your GitHub, Azure DevOps Services, Bitbucket Cloud, GitLab repositories
          • SonarQube Community BuildAnalyze code in your
            on-premise CI
            Available Since
            9.3
          • SonarQube ServerAnalyze code in your
            on-premise CI
            Developer Edition
            Available Since
            9.3

          © 2008-2025 SonarSource SA. All rights reserved.

          Privacy Policy | Cookie Policy | Terms of Use