CSRF protection disabled in Spring Security
Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
A SecurityConfig-looking class disables CSRF protection (.csrf().disable() or the lambda-DSL equivalent). For any endpoint that relies on cookie-based session authentication, this allows a state-changing request to be forged from another site. Heuristic: a stateless, token-based API (JWT in an Authorization header, no session cookie) has a legitimate reason to disable CSRF, so verify the auth model before treating this as a bug.
Why it matters
Disabling CSRF protection removes the token check that stops a malicious page from submitting a state-changing request to your app using the victim's existing session cookie. For any endpoint that authenticates via a browser session cookie, that is a real cross-site request forgery exposure, not a theoretical one.
How to fix it
Leave CSRF protection enabled for cookie/session-authenticated endpoints; Spring Security enables it by default and mostly needs no extra code beyond including the CSRF token in forms or as a header on state-changing AJAX requests. If this API is genuinely stateless (bearer tokens in an Authorization header, no session cookie), disabling CSRF is a defensible and common choice, in which case document that reasoning in the config itself.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo