Works with the AI Agents you already use
Django Settings Security Audit
by CashonlyTian
Shipping a Django project with default settings is a liability.
$7
Django Settings Security Audit
Example session with this skill installed
Audit the Django settings in ./my_web_app for production readiness. Use the brand 'Internal-Audit' and accent color #2ecc71.
- Read your context and instructions
- Compiled the django settings security
- Generated the document
I have completed the security audit for the project in ./my_web_app. The scanner evaluated 10 critical configuration checks.
The unsafe demo project received a
Score of 14/100 (Grade: F, Risk: CRITICAL) with
39 findings. The scan identified hardcoded secrets, DEBUG on, a wildcard ALLOWED_HOSTS, insecure cookies, missing CSRF protection and security headers, database passwords, SMTP without TLS, unbounded uploads and debug tools enabled.
Audit Results — Unsafe Demo
| Category | Score | Status |
|---|---|---|
| Debug & Hosts | 7/15 | FAIL - DEBUG=True and ALLOWED_HOSTS=['*'] |
| Secret Key | 7/15 | FAIL - Hardcoded SECRET_KEY detected |
| Cookies & Sessions | 0/10 | FAIL - Insecure cookies and sessions |
| CSRF Protection | 0/10 | FAIL - CSRF protection missing |
| Security Headers | 0/10 | FAIL - SecurityMiddleware missing |
| Database Secrets | 0/10 | FAIL - Database password in settings |
| Email Security | 0/10 | FAIL - SMTP without TLS |
| File Uploads | 0/10 | FAIL - Unbounded file uploads |
| Dev Tools & CORS | 0/5 | FAIL - Debug tools enabled |
| Logging & Admins | 0/5 | FAIL - Logging and admins not configured |
Audit Results — Clean Demo
The clean demo project received a Score of 100/100 (Grade: A) with 0 findings — all 10 checks pass.
Top 3 Required Fixes
Remove Hardcoded Secrets: SECRET_KEY is defined as a literal string. Move this to an environment variable immediately.
2. Disable Debug Mode: DEBUG is set to True. This leaks sensitive tracebacks in production. Set to False.
3.
Enable Security Middleware: django.middleware.security.SecurityMiddleware is missing from MIDDLEWARE. This prevents HSTS and SSL redirection from functioning.
The full report is available at scan-report.md and a visual scorecard has been generated at scan-2023-10-27.png.
Next steps
- Move all passwords and keys to a
.envfile or system environment variables. - Update
ALLOWED_HOSTSto specific production domains instead of wildcards. - Re-run the audit once fixes are applied to verify the new score.
scan-2023-10-27.png
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
Shipping a Django project with default settings is a liability. This skill audits your settings.py for 10 critical security vectors, identifying leaked secrets, exposed debug modes, and missing production headers before you deploy.
What it does
- Secrets detection identifies hardcoded
SECRET_KEY, database credentials, and SMTP passwords committed to source. - Environment validation checks for active
DEBUGmodes and insecureALLOWED_HOSTSorCORS_ALLOW_ALL_ORIGINSconfigurations. - Middleware audit verifies the presence and configuration of
SecurityMiddlewareandCsrfViewMiddleware. - Header enforcement scans for HSTS, SSL redirect, content-type nosniff, and X-Frame-Options settings.
- Resource protection checks for world-writable file permissions and unbounded memory limits for uploads.
- Scored reporting generates a 0-100 score, letter grade, and risk level assessment.
How it works
- Provide the local path to the Django project directory you want to audit.
- The skill runs a local scan of the
settings.pyfile, skipping heavy directories likenode_modulesor virtualenvs. - Review the generated
scan-report.mdfor a prioritized list of vulnerabilities and specific line references. - View the
scan-YYYY-MM-DD.pngscorecard for a high-level summary suitable for stakeholders or PR attachments.
Frameworks & tools
This skill is purpose-built for the Django web framework. It operates locally on Python-based project structures without requiring external API access or cloud uploads.
Why this beats prompting it yourself
Generic prompts often miss specific Django-isms like the django-insecure- prefix in modern versions or the interaction between SameSite cookies and the Secure flag. This skill applies a rigid 10-point scoring rubric that ensures no configuration category is overlooked.
Use cases
- Auditing a project generated by another AI agent before deployment.
- Reviewing a
settings.pyfile inherited from a legacy repository or tutorial. - Generating a security compliance scorecard for a client hand-off.
- Benchmarking the security posture of local development environments.
Known limitations
Does not audit application code, views, or templates for XSS/SQLi. Scans settings files only, not infrastructure configs like Nginx or Docker. Files over 2MB are skipped.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Audits settings.py only; does not scan views/models for XSS/SQLi. Skips infrastructure files (Docker/Nginx) and files >2MB. Local scan only.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
- Software
Python 3Pillow