Find String.toByteArray() calls without an explicit charset
ProprietaryString.toByteArray() uses the platform default charset, which differs across operating systems and produces non-portable bytes when hashed or signed. Pass Charsets.UTF_8 (or another explicit charset) so the resulting bytes are stable.
org. openrewrite. kotlin. security. FindStringToByteArrayDefaultCharset$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. security. FindStringToByteArrayDefaultCharset$KtRecipe'Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.