
SReddy547806 (Community Member) asked a question.
The vulnerability states that the headers passed to the Rest Client contains sensitive , but in reality it doesn't. It contains normal, insensitive data.
There are 2 files with similar issue, I have attached sample code base of one file:
public Response delete(String dcsId, Map<String, String> headers) {
return restClient.target(host).path(resourcePath).queryParam("dcsId", dcsId)
.queryParam("jnuuid", LambdaConstant.JNUUID).request().headers(headers).delete();
}
Here, in return statement the flaw is present. It says that the headers passed to it contain sensitive information, whereas it is confirmed that the headers do not contain sensitive information and the data is fetched from system environment variables.
I have attached the code base of what headers contain:-
UUID uuid = UUID.randomUUID();
Map<String, String> headers = new HashMap<>();
headers.add("mcd-locale", "en-Us");
headers.add("mcd-sourceapp", "GMA"););
headers.add("mcd-marketid", "US");
headers.add("mcd-deleteType", "deleteType");
headers.add("mcd-uuid", uuid);
.png)
Hi @SReddy547806 (Community Member)
CWE 201 is flagged usually when the scanner believes that one of the potentially sensitive data is being transferred out of the application.
The question we will ask is: Whether this data is really sensitive or not. The scanner might be wrongly identifying it but is basically giving us all an opportunity to review if we may be passing any sensitive data. The scanner usually refers to configuration or properties as "Sensitive", so it is best we review each of such properties used in the flagged code.
If there is no sensitive data, please feel free to propose mitigation (refer: https://help.veracode.com/r/improve_mitigation) by explaining which config or environmental variables are used and why you think they are not sensitive at all. If they are sensitive, ensure that the transfer of that sensitive data is intended and that it does not violate the application security policy. This flaw is categorized as low severity because it only impacts confidentiality, not integrity or availability.
If 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 Syed