opensafely-core / opensafely-core/reports
Review if django-csp can be replaced with Django's future CSP feature
Open
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-cspmaintainer. django-cspis 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-cspconfiguration with a configuration for Django; - and then remove
django-csp.
- replace the
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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