Enable Django CSRF middleware for browser apps
Django projects using cookie-backed sessions should include `CsrfViewMiddleware` in `MIDDLEWARE`.
#Metadata
#Why it matters
Without CSRF middleware, Django cannot enforce CSRF tokens on unsafe HTTP methods for browser clients.
#Remediation
Insert `django.middleware.csrf.CsrfViewMiddleware` into `MIDDLEWARE` according to the Django deployment checklist ordering guidance.
#Repository path
The generated metadata points to critiq-rules/libs/rules/catalog/rules/python/py.security.django-missing-csrf-middleware.rule.yaml.