Find long or disabled HTTP session timeout

Proprietary

Finds calls to HttpSession.setMaxInactiveInterval(int) whose integer-literal argument exceeds 30 minutes or is zero/negative (which disables session expiration). Long-lived or non-expiring sessions increase the window for session hijacking and replay (CWE-613).

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

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