Skip to content
vetkitChecksChangelogDocumentation

vetkit.kotlin.spring-security.csrf-disabled

Spring Security CSRF protection is disabled.

Last updated:

Suite: Security

kotlin

Spring Security CSRF protection is disabled.

Category: SECURITY · Engine rule severity: WARNING

How to fix it

Keep CSRF protection enabled for browser clients that authenticate with cookies/sessions. Disabling it is only appropriate for stateless APIs authenticated by an Authorization header; mark those with SessionCreationPolicy.STATELESS.

References

Source: packages/engine/rules/sast/kotlin.yml.

Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.