Find hardcoded authentication credentials

Proprietary

Finds hardcoded passwords flowing into Spring Security user builders: InMemoryUserDetailsManagerConfigurer (inMemoryAuthentication().withUser(...).password(...)) and the User.UserBuilder.password(...) API. Uses taint analysis so credentials assigned to a variable, field, or constant before being passed to .password(...) are also detected.

org.openrewrite.java.security.search.FindHardcodedAuthenticationCredentials
mod run . --recipe=org.openrewrite.java.security.search.FindHardcodedAuthenticationCredentials

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