AMulla151322 likes this.
  • Hi @AMulla151322 (Community Member)​ 

     

    It is not clear which line is getting flagged for CWE ID 404.

     

    In general, Please use following mitigation strategies to fix CWE ID 404:

    1. Locate which line and variable is getting flagged and identify which and what resource need to clean up. Usually, it is flagged for File IO handle references, Database connection or statement references, Input/Output Stream reader and writer references, Network/socket handles etc.
    2. The 'using' statement in C# is a convenient way for resources that implement the IDisposable interface (such as file streams, database connections, etc.), to ensure that Dispose() is called. (Also called even if exception occurs.) [Refer : https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/using]
    3. If your class owns unmanaged resources then consider implementing a finalizer to release those resources in case the Dispose method is not called explicitly.

     

    It is best to get more details from the 'Description' of the specific flaw from the Triage Flaws page to determine on which resource, the finding is reported.

    If after reviewing the details in the Triage Flaws view in the Veracode Platform you still have 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.

     

    Regards,

    Kashif

    Expand Post

Topics (4)

No articles found
Loading

Ask the Community

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