• Hi @RBlackburn522523 (Community Member)​,

     

    Veracode Static Analysis detects CWE-80 flaws using data-flow analysis. To achieve this, a model of your application code is generated, which describes the possible data flows. A CWE-80 flaw will be suppressed when every flow into the attack vector is detected to pass through a cleanser function.

     

    When using a wrapper function, the complexity of the model increases and there are likely to be flows that do not include the cleanser function. These may not be obvious from reading the source code -- such as when exceptions are involved.

     

    To have Veracode Static Analysis recognise the use of the supported cleanser function, I recommend using it as close to the attack vector statement as possible. For example, if the attack vector is Response.Write:

     

    Response.Write(HtmlEncode(taintedValue));

     

     

    Kind regards,

    Duncan

     

    Expand Post
    • RBlackburn522523 (Community Member)

      Can you help me to understand what kind of test I can run locally to know why it is failing your data-flow analysis?

      • Hi @RBlackburn522523 (Community Member)​,

         

        When CWE-80 flaws are reported, the Static Analysis engine traces the flow of untrusted data back to its source to generate Data Paths. These can be inspected in the Triage Flaws page for the scan in the Veracode Platform. You should be able to use these to check that the cleansing functions are effective. It is possible the data path information is incomplete. In which case you will need to use your IDE to check the chain of calling functions.

         

        If you would like to discuss this in detail, please schedule a consultation with one of our Application Security Consultants.

         

        Kind regards,

        Duncan

        Expand Post

Topics (5)

No articles found
Loading

Ask the Community

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