DEV Community

Discussion on: Django web security checklist before deployment | Secure your Django App

Collapse
 
sobolevn profile image
Nikita Sobolev

Awesome article! I can probably add several important things here:

  1. Use django-axes or similar to block brute-force requests
  2. Use Feature-Policy header to switch on only things you really need in user's browser
  3. Use Referrer-Policy header to prevent sensitive information from leaking into other resources
  4. Use safety to make sure your dependencies are secure and do not contain any known vulnerabilities
  5. Use wemake-python-styleguide to check for your source code to be secure

I recommend to use wemake-django-template. It is a new project boilerplate focused on security and code quality. It has everything from the list. And even several more advanced features!

GitHub logo wemake-services / wemake-django-template

Bleeding edge django template focused on code quality and security.

wemake-django-template

wemake.services Awesome Build status Documentation Status Dependencies Status wemake-python-styleguide

Bleeding edge django4.2 template focused on code quality and security.


Purpose

This project is used to scaffold a django project structure Just like django-admin.py startproject but better.

Features

Installation

Firstly, you will need to install dependencies.

The recommended way is via pipx:

pipx install cookiecutter
pipx inject cookiecutter jinja2-git
Enter fullscreen mode Exit fullscreen mode

Or via global pip:

pip install cookiecutter jinja2-git
Enter fullscreen mode Exit fullscreen mode

Then, create a project itself:

cookiecutter gh:wemake-services/wemake-django-template
Enter fullscreen mode Exit fullscreen mode

Who is using this template?

If you use our template, please add yourself or your company in the list

And by the way, don't forget to audit your setup. twa is a great start. It is simple, yet quite feature rich.

Collapse
 
thedevtimeline profile image
Rashid

Wow! Thank you for additional gold information!🚀🚀