C#

C#

By DeepSource

Audit required: Switch to a better crypto algorithmCS-A1002
Security

One or more crypto algorithms such as TripleDESCryptoServiceProvider, DESCryptoServiceProvider, and RC2CryptoServiceProvider are being used by your application. These algorithms are marked as obsolete and are no longer recommended. Please consider switching to a more modern and robust algorithm instead. Please check out the reference for some recommended algorithms.

Audit: Consider using `System.URI` instead of `string`sCS-A1000
Security

Representing URIs as strings can prove to be a security risk as they are difficult to parse, validate and encode. It is therefore recommended that you use the more safer and reliable built-in alternative System.URI.

Use `nameof` operator instead of explicitly spelling out the parameterCS-R1059
Anti-pattern
Autofix

ArgumentException is generally thrown when an unexpected argument is passed to a method. Explicitly spelling out the parameter whilst throwing such exceptions is not a good idea as parameter names are subject to change during code refactoring and may produce misleading information in the stracktrace. It is therefore recommended that you use the nameof operator to spell out such parameters instead.

Use of `TODO/FIXME` comment encounteredCS-D1000
Documentation

TODO/FIXME comments are usually placed within the source code to indicate that there might be a scenario that is either unaccounted for or that a feature requires further enhancements to function as expected/required. In either way, they must be addressed when and where possible to avoid unintended side-effects or breakdown.

Empty `default` label is redundantCS-R1022
Anti-pattern

default case in a switch is executed when none of the provided cases match. Since an empty default case does nothing, it is redundant and can be safely dropped/discarded.