Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Django Settings Security Audit

    by CashonlyTian

    1

    Shipping a Django project with default settings is a liability.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Django Settings Security Audit

    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

    CategoryScoreStatus
    Debug & Hosts7/15FAIL - DEBUG=True and ALLOWED_HOSTS=['*']
    Secret Key7/15FAIL - Hardcoded SECRET_KEY detected
    Cookies & Sessions0/10FAIL - Insecure cookies and sessions
    CSRF Protection0/10FAIL - CSRF protection missing
    Security Headers0/10FAIL - SecurityMiddleware missing
    Database Secrets0/10FAIL - Database password in settings
    Email Security0/10FAIL - SMTP without TLS
    File Uploads0/10FAIL - Unbounded file uploads
    Dev Tools & CORS0/5FAIL - Debug tools enabled
    Logging & Admins0/5FAIL - 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 .env file or system environment variables.
    • Update ALLOWED_HOSTS to 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

    Generated

    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 DEBUG modes and insecure ALLOWED_HOSTS or CORS_ALLOW_ALL_ORIGINS configurations.
    • Middleware audit verifies the presence and configuration of SecurityMiddleware and CsrfViewMiddleware.
    • 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

    1. Provide the local path to the Django project directory you want to audit.
    2. The skill runs a local scan of the settings.py file, skipping heavy directories like node_modules or virtualenvs.
    3. Review the generated scan-report.md for a prioritized list of vulnerabilities and specific line references.
    4. View the scan-YYYY-MM-DD.png scorecard 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.py file 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed3 days ago

    What's inside

    Frequently Asked Questions

    No, this skill is designed for local execution. It scans your files directly on your machine and generates reports locally, ensuring your sensitive configuration data and secrets never leave your environment.

    The skill is designed for any Django project using a standard settings.py file, regardless of the version. It is compatible with major AI agent platforms that support local file system access and Python-based tool execution.

    You receive the core audit engine, a standardized 10-point scoring rubric, and automated reporting templates that generate both Markdown logs for developers and visual scorecards for stakeholders.

    While generic prompts might miss subtle configuration conflicts, this skill uses a structured 10-vector rubric specifically tuned for Django-isms, such as detecting the 'django-insecure-' prefix and verifying middleware execution order.

    This skill focuses exclusively on the Django settings layer; it does not scan Python logic in views, HTML templates for XSS, or infrastructure files like Dockerfiles and Nginx configurations.

    New in LLM Ops