Django Security
Django security guide covering authentication, authorization, SQL injection, XSS prevention, and production hardening.
- CCM score
- 71 of 100
- skills.sh installs
- 14.4K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers production settings, custom user models, password hashing, sessions, permissions, and RBAC, with code for each
- Includes Django ORM and raw-SQL parameterization patterns, plus template escaping rules for XSS prevention
- Enforces
DEBUG = False, requiredDJANGO_SECRET_KEY, HSTS, secure cookies, and a 12-character minimum password length - Designed for reviewing Django authentication, authorization, input handling, and deployment settings before production release
Install
$ npx -y skills add affaan-m/ecc --skill django-security -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Django Security Best Practices
Comprehensive security guidelines for Django applications to protect against common vulnerabilities.
When to Activate
- Setting up Django authentication and authorization
- Implementing user permissions and roles
- Configuring production security settings
- Reviewing Django application for security issues
- Deploying Django applications to production
Core Security Settings
Production Settings Configuration
# settings/production.py
import os
DEBUG = False # CRITICAL: Never use True in production
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split(',')
# Security headers
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_SECONDS = 31536000 # 1 year
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = True
SECURE_CONTENT_TYPE_NOSNIFF = True
X_FRAME_OPTIONS = 'DENY'
# HTTPS and Cookies
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SAMESITE = 'Lax'
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Security, Backend & APIs, Python
- First seen
- Jul 14, 2026
Questions
What does the django-security skill do?
The django-security skill gives an agent Django security best practices, covering authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention and secure deployment settings. It is meant for reviewing Django authentication, authorization, input handling or deployment settings.
How do I install the django-security skill?
Run npx -y skills add affaan-m/ecc --skill django-security -y in your project to install it. Once installed, the agent can apply Django hardening guidance such as production settings, password validation and permission checks to your code.
Where does django-security rank among security skills?
On the Security category page on Claude Marketplaces, django-security ranks in the top 50. Other skills near it include azure-compliance, entra-agent-id, firebase-security-rules-auditor, security-audit and cloudflare-one.
What does django-security cover that sets it apart?
It goes beyond general security advice by giving Django-specific guidance, including production settings such as secure cookies, HSTS and SECRET_KEY handling. It also covers Django ORM query safety, template escaping for XSS, and custom permission classes for role-based access.
More from affaan-m/ecc
All 257- Python Testing14.3K
- Laravel Security14.3K
- Android Clean Architecture14.3K
- Article Writing14.3K
- Cpp Coding Standards14.3K
- Springboot Security14.2K
- Liquid Glass Design14.2K
- Database Migrations14.1K
- E2e Testing14.1K
- Strategic Compact14K
- Laravel Patterns13.8K
- Verification Loop13.6K
- Codebase Onboarding13.6K
- Springboot Tdd13.4K
- Security Scan13.4K
- Django Tdd13.3K
- Deployment Patterns13.3K
- Search First13.3K
- Deep Research13.2K
- Eval Harness13.1K
- Continuous Learning13K
- Cpp Testing13K
- Jpa Patterns13K
- Rust Patterns12.9K
Similar to Django Security
More Securitylaravel-securityaffaan-m/ecc14.3K installsLaravel security checklist covering authentication, authorization, Eloquent, CSRF, XSS, and secure deployment settings.
secure-code-guardianjeffallan/claude-skills5.7K installsSecurity implementation guide covering password hashing, parameterized SQL, input validation, JWT setup, and OWASP Top 10 prevention.
django-patternsaffaan-m/ecc15.2K installsDjango architecture patterns for scalable apps covering DRF APIs, ORM queries, caching, and middleware.
spatie-securityspatie/guidelines-skills724 installsSecurity guidelines for configuring apps, databases, servers, credentials, and signed Git commits, plus code review for vulnerabilities.
security-best-practicesmindrally/skills997 installsChecklist-style security guidance covering input validation, authentication, secrets, and injection and XSS prevention for backend services.