• Anthony Fielding (Veracode)

    Hi @CIraheta403878 (Community Member)​,

    Thanks for your question.

     

    If you made a change to the code so the application no longer outputs generic error messages and find the Veracode Platform is still reporting this flaw after re-packaging, re-uploading and re-scanning the application, then it is most likely there will be another instance of the flaw occurring. This could be within a different parameter on the same line, or on a different line entirely for example. I recommend reviewing the flaw description which should help you to identify the source.

     

    If you would like assistance with remediating the flaw I recommend scheduling a consultation with a Veracode Application Security Consultant. You can find details on how to schedule a consultation here: https://help.veracode.com/reader/DGHxSJy3Gn3gtuSIN2jkRQ/7YQTCDJKFEQzL3gL_N90hQ.

     

    If you think the Veracode Platform is incorrectly reporting this flaw I recommend you contact our technical support team. Here's how you can log a case:

    1. Navigate to the upper right corner of any page in the Community, click on your user avatar.
    2. Select Contact Support from the drop-down menu.

     

    Thanks,

    Anthony Fielding

    Expand Post
  • CIraheta403878 (Community Member)

    I modified my code like this:

     

     httpPost = new HttpPost(endpointUrl);

            httpPost.setEntity(stringEntity);

            httpPost.setConfig(requestConfig);

            httpPost.setHeaders(headers.toArray(new Header[headers.size()]));

            try {

              response2 = httpClient.execute(httpPost);

              if (response2.getStatusLine().getStatusCode()!=200) {

                response = factory.newHttpResponse(new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_INTERNAL_SERVER_ERROR, null), null);

                response.setEntity(new StringEntity("Error en el llamado"));

              } else {

                response = factory.newHttpResponse(new BasicStatusLine(HttpVersion.HTTP_1_1, response2.getStatusLine().getStatusCode(), null), null);

                response.setEntity(response2.getEntity());

              }

            } catch (Exception e) {

              logger.excepcion(e);

              response = factory.newHttpResponse(new BasicStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_INTERNAL_SERVER_ERROR, null), null);

              response.setEntity(new StringEntity("Error en el llamado"));

            }

     

    But still the same error, any ideas?

    Expand Post
    • Anthony Fielding (Veracode)

      Hi @CIraheta403878 (Community Member)​,

      Thank you for your code snippet. I can see in the catch statement it appears you are returning a generic error message to the user, however I suspect the flaw may lie in the use of logger.excepcion(e). Whilst this exception may not be presented to the user, is it possible that sensitive data such as HTTP POST form parameters could be stored within the exception which might then be logged?

       

      If this logging event could be made more generic (i.e. don't include the exception if possible), the Veracode Platform should close the flaw as remediated.

       

      Thanks,

      Anthony

      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.