Find hardcoded certificates
ProprietaryFind X.509 certificates embedded in source: PEM text (-----BEGIN CERTIFICATE-----) in string literals, and certificates loaded from data written in source (a byte array or collection literal, or Convert.FromBase64String of a constant) by the X509Certificate2 and X509Certificate constructors, X509CertificateLoader and X509Certificate2.CreateFromPem. Embedded certificates cannot be rotated to post-quantum certificates without a code change.
OpenRewrite. CSharp. Recipes. Cryptography. FindHardcodedCertificatemod run . --recipe= OpenRewrite. CSharp. Recipes. Cryptography. FindHardcodedCertificateInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.