The protection against session fixation is switched off
What it finds
By default Spring Security gives a user a new session when they log in, so that a session id planted before the login does not become authenticated. sessionFixation() .none() keeps the old session, and with it any id an attacker made the victim use (CWE-384).
Reported is none() called on the result of sessionFixation().
From the rule's source, session_fixation_off.rs.
class Security { void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception { http.sessionManagement().sessionFixation().none();tx0 reports: stays valid after it http.sessionManagement().sessionFixation().migrateSession(); }} Turn it on, off or suppress it
The rule runs in every tier. To turn it off for a project, set its level in tx0.toml:
[rules]
"tx0/java:session-fixation-off" = "off"To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:
// tx0: ignore[tx0/java:session-fixation-off] reason="..."tx0 explain tx0/java:session-fixation-off shows the same in the terminal. Found a false positive? Report it.