abp icon indicating copy to clipboard operation
abp copied to clipboard

Improve performance and security with rule categories

Open merijng opened this issue 6 months ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

As ABP continues to evolve and incorporate more features, it's becoming increasingly important to address potential performance and security concerns. With the introduction of .NET 6 and beyond, there are tools available that can help identify and mitigate simple performance and security "tweaks". However, many of these "tweaks" are not yet addressed within the ABP framework.

Describe the solution you'd like

I propose updating the .editorconfig file to flag issues in the "security" category as errors and those in the "performance" category as warnings. This approach would enable developers to identify and resolve these warnings and errors efficiently, utilizing Visual Studio's IntelliSense.

This could be a valuable feature for ABP 9, especially considering the performance optimizations introduced in .NET 9. However, for this to be effective, the majority of these warnings and errors should be resolved beforehand.

image

Additional context

Important notes:

  • This pull request does not directly resolve any of the existing warnings or errors.
    • I recommend that the Volosoft/ABP team reviews and approves the pull request, with a plan to address these issues incrementally.
      • Security errors are likely "false positives".
        • For example, the "ToMd5" method might trigger an error due to CA5351. In such cases, marking the method as obsolete and suppressing the specific rule might be sufficient.
  • At a later stage, it could be beneficial to elevate the performance category to an "error" severity, as part of a "Performance as a Feature" initiative.

merijng avatar Aug 14 '24 14:08 merijng