Find hardcoded provider names

Proprietary

Find cryptographic service providers and key storage providers selected by a name written in source, directly or through a constant: new CngProvider("..."), the provider name of new CspParameters(...) and assignments to CspParameters.ProviderName. A hardcoded provider ties the application to one implementation and blocks moving to providers that offer post-quantum algorithms.

OpenRewrite.CSharp.Recipes.Cryptography.FindHardcodedProviderName
mod run . --recipe=OpenRewrite.CSharp.Recipes.Cryptography.FindHardcodedProviderName

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.