Enable CSRF attack prevention

Proprietary

Cross-Site Request Forgery (CSRF) is a type of attack that occurs when a malicious web site, email, blog, instant message, or program causes a user's web browser to perform an unwanted action on a trusted site when the user is authenticated. See the full OWASP cheatsheet.

org.openrewrite.java.security.spring.CsrfProtection

Optional

onlyIfSecurityConfigBoolean

Only patch existing implementations of WebSecurityConfigurerAdapter.

mod run . --recipe=org.openrewrite.java.security.spring.CsrfProtection

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