Open jilles-sg opened 9 months ago
Hey there! Thanks for reporting this, I confirm it is indeed an FN. I added a reproducer to keep track of it.
This FN was also reported by a prospect https://discuss.sonarsource.com/t/rspec-2077-rspec-4790-false-negatives/20022
Description
Rule S4790 reports the use of obsolete cryptographic hash algorithms such as SHA1. It catches things like
HashAlgorithm.Create("SHA1")
andSHA1.Create()
. However, at least some of the staticHashData
methods added by .NET 5 are not caught.Repro steps
This example doesn't really motivate the use of the span-based overload, but suppose the hash needs to be combined with other data into a larger message.
Expected behavior
Rule S4790 warns about an obsolete hash algorithm.
Actual behavior
No warning.
Known workarounds
Related information