When you visit any website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and change our default settings. However, blocking some types of cookies may impact your experience of the site and the services we are able to offer.
More information
We've used the .NET RedirectUrlCleanserAttribute from the library and it worked.
We found that the stock cleansers in Veracode are web development focused and less C# client/server focused. We've ended up writing our own and using the [FileCleanser] C# Veracode DLL attribute to mark them. Even so we still have to mitigate many as "false positives". Veracode seems not to handle deep stack level tracing well, e.g. this caller used our cleanser method and still flags the "called" method as "insecure".
Hi @Scott J (Community Member) ,
Thank you for your feedback.
If you know of any commonly used cleansing functions I would very much like to request that you propose an idea in the Veracode Community Ideas at https://community.veracode.com/s/ideas , your industry experience is invaluable input for Veracode Program Management.
If you have issues where a [FileCleanser] custom cleanser is correctly operating on the data for the file path and the custom cleanser feature has been enabled by your security team but Veracode Static Analysis is not proposing a mitigation for you I would 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.
Please provide a link to the Triage Flaws view with the flaws as well as the flaw ids.
Thank you,
Boy Baukema
Hi @YG790424 (Community Member) ,
Thank you for initiating this discussion, we're looking forward to hear everyones experiences with Custom Cleansers. As a Veracode Application Security Consultant I see many teams use Custom Cleansers. Here are some things that are important to keep in mind when using Veracode Custom Cleansers:
1. Supported Cleansing Functions ( https://help.veracode.com/reader/4EKhlLSMHm5jC8P8j3XccQ/IiF_rOE79ANbwnZwreSPGA ) are preferable. These have been vetted by Veracode Research and will automatically close the flaw.
2. Marking one of your functions as a Custom Cleanser is a good fit if:
A. All data flows through it before reaching the point where the flaw is reported (this typically means the function should be used very close to where the flaw was found).
B. The data is returned from the function (it's not used for a boolean decision).
C. You are actively developing the application. You may not want simply apply mitigations manually for legacy projects.
3. Custom Cleansers have to be enabled by your security team: https://help.veracode.com/reader/RXjxbTR2MDQdN3gX4l53CQ/qBpw6yXOpKGELy9APnDXIA
If you would like advice on flaw remediation or to discuss any potential false positives I recommend you schedule 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.
Thank you,
Boy Baukema