Java security best practices
ProprietaryApplies security best practices to Java code.
org. openrewrite. java. security. JavaSecurityBestPracticesmod run . --recipe= org. openrewrite. java. security. JavaSecurityBestPracticesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.
- XML parser XXE vulnerability
- Use
Files#createTempDirectory - Use secure temporary file creation
- Zip slip
- Replace
Runtime.exec(String)withRuntime.exec(String[]) - Fix permissive
X509TrustManagerimplementations - Fix permissive
HostnameVerifierimplementations - Replace SQL string concatenation with a
PreparedStatement - SecureRandom seeds are not constant or predictable
- Restrict deserialized classes for JMS
ObjectMessage - Modernize
BufferedWritercreation and prevent file descriptor leaks - Use comparison rather than equality checks in for conditions