Bundleconfig Class Registerbundles method without absolute paths or fixed Uris

Asked

Viewed 38 times

0

If I am here it is because I have not been able to find at the moment something exact or that satisfies my problem. Let me explain:

I’m using the SONARQUBE or just SONAR for code evaluation, error detection, good practice, etc on my work project.

And he (SONAR) accused some inconsistencies something like good security practice in the Bundleconfig.Cs class

How so?

Well, the class BundleConfig.cs comes with the method RegisterBundles() already configured by default as Visual Studio itself creates, correct?

Parte do Código

SONAR, however, asks me to refactor my code to not use absolute paths or fixed Uris, and he criticizes the above image code as:

Crítica do SONAR

I tried to do something similar to:

  1. https://stackoverflow.com/questions/14797063/hard-coding-a-relative-path-in-c-sharp
  2. https://stackoverflow.com/questions/14697074/asp-net-mvc-4-0-bundles-with-multiple-absolute-urls-for-styles
  3. http://go.microsoft.com/fwlink/? Linkid=301862
  4. And other communities that I consulted, but all ideas of solutions have errors, they don’t work within the class, or they didn’t serve the purpose that I need to apply to BundleConfig.cs

So I just created this doubt because I’ve really exhausted all my knowledge hype.

If anyone has any suggestions or ideas as to how I can resolve it will be welcome.

Thank you for your attention.

  • 1

    Hunch, I don’t think there’s much to do in this case other than recognize these criticisms as a false positive. Nor would it be worth changing your "Bundler" to a Grunt or Gulp just for sonar analysis.

  • @Leandroangelo I share the same idea and I believe you are right (I voted as a useful comment). Because that’s what I was thinking, but I did the post with the question to have a second opinion, because analysts will question and I need to be grounded.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.