DHobert101612 (Community Member) asked a question.

Fixes for CWE117 in a Global.asax.cs file not being recognized

I have done some research on how to fix flaws for CWE 117. The fixes are in a Global.asax.cs file, but when I check them in, package them up, and submit them for a scan to determine whether the fixes are valid the scan does not seem to recognize my updates.

 

I made some significant changes to the code unit in question and to the affected code, so I know that the line # on which the flaws were being detected has changed. Nevertheless, the report shows the flaws on the same line #, which suggests to me that the changes are not being recognized by Veracode. Any ideas on how to get changes in a file like Global.asax.cs to be "seen". Personally I would expect them to simply be compiled into the website DLL(s).

 

Thanks!

 

Dan


  • Hi @DHobert101612 (Community Member)​ ,

     

    If updates to the source code are not detected by Veracode Static Analysis this is typically a sign that what is sent for Veracode Static Analysis is not the same as the source code, typical causes include:

     

    • Specifically for aspx / asax pages, not precompiling these files, for more guidance on how to do so please see: https://help.veracode.com/r/c_precomp_VS
    • Compilation output may be cached, please consider Cleaning your project before compiling and publishing.

     

    Please consider also verifying with a tool like ILSpy ( https://github.com/icsharpcode/ILSpy ) whether the corrected code is inside one of the dlls (for Global.asax.cs this will likely be called "App_Global.dll") that is sent to Veracode for Veracode Static Analysis.

     

    If you have any other questions, I would recommend you schedule a consultation call to discuss.

    You can check out this knowledge article (https://community.veracode.com/s/article/How-to-schedule-a-consultation-call) on how to schedule a consultation call with us.

     

    Thank you,

    Boy Baukema

    Expand Post

Topics (3)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.