Find hardcoded algorithm choices
ProprietaryFind cryptographic algorithms selected by a name written in source, directly or through a constant: CryptoConfig.CreateFromName("..."), the string overloads of Create on the System.Security.Cryptography algorithm types (AsymmetricAlgorithm.Create("RSA"), HashAlgorithm.Create("SHA1"), ...), new HashAlgorithmName("..."), new CngAlgorithm("...") and ECCurve.CreateFromFriendlyName / CreateFromValue. Hardcoded algorithms prevent easy migration to stronger or quantum-resistant algorithms and are a crypto-agility issue.
OpenRewrite. CSharp. Recipes. Cryptography. FindHardcodedAlgorithmChoicemod run . --recipe= OpenRewrite. CSharp. Recipes. Cryptography. FindHardcodedAlgorithmChoiceInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.