Avoid unsafe Django production settings
Production Django settings should disable debug mode, restrict hosts, protect secrets, and enable HTTPS-aligned cookie flags.
#Metadata
#Why it matters
Misconfigured Django defaults expose debug traces, enable host header attacks, leak secrets, and weaken cookie transport protections.
#Remediation
Align settings with your deployment checklist—disable DEBUG, pin ALLOWED_HOSTS, load secrets from the environment, and enable secure cookie and HTTPS flags.
#Repository path
The generated metadata points to critiq-rules/libs/rules/catalog/rules/python/py.security.django-unsafe-production-settings.rule.yaml.