opensafely-core / opensafely-core/reports

Review if django-csp can be replaced with Django's future CSP feature

Open
#954 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

deck-scrubbing
Dominant language
Python
Stars
0
Forks
1
Avg merge
1d 22h
Merged PRs (30d)
5

Description

Note: this is the same task as for job-server.

Why are we doing this?

  • Django has recently added its own support for Content Security Policy on 2025-06-27; it's been co-authored by a django-csp maintainer.
  • django-csp is an extra dependency. We typically have a policy of removing third-party dependencies where it's possible to easily replicate the functionality we're using.

How will we know when it's done?

When we're using Django's own CSP support, and have removed django-csp as a dependency.

What are we doing?

  • Awaiting a version of Django with the CSP feature included.
  • Validating that we can have a suitable configuration with Django's own support.
  • If so:
    • replace the django-csp configuration with a configuration for Django;
    • and then remove django-csp.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the current django-csp configuration and dependency declarations, then compare them with Django's CSP support once an appropriate Django version is available; done means Django provides the needed configuration and django-csp has been removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, security
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.