Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
The @csrf_exempt decorator (from django.views.decorators.csrf), or @method_decorator(csrf_exempt, ...) on a class-based view, turns off Django's CSRF middleware check for that endpoint. An attacker can then forge cross-site requests that the victim's browser submits with their session cookie, a CSRF vulnerability.
Do not exempt views from CSRF. Keep the default protection and submit the CSRF token from your client. For machine-to-machine endpoints such as webhooks, validate a signed request signature (e.g. an HMAC header) instead of disabling CSRF wholesale.
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.