Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django CSP #1303

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft

Django CSP #1303

wants to merge 4 commits into from

Conversation

okaycj
Copy link
Contributor

@okaycj okaycj commented Nov 7, 2023

This is for Issue #1083

From the security review, it was requested to add CSP to our site. This for of protection will allow us to limit what is able to be loaded/executed on our site.

The Django-CSP has been added and implemented. The following has yet to be completed:

  • QA. Each view has different complications with this security restriction. Most often it'll be inline style or scripts.
  • Authorize some JavaScript libraries (most notably google's tag manager) using a nonce.
  • Others. CSP has enough of a learning curve that its not entirely certain what might come up.

It might be worth noting that Chrome seems to have a slightly less restrictive implementation of this feature then firefox.

Copy link

sonarqubecloud bot commented Nov 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bleonar5
Copy link
Contributor

bleonar5 commented Nov 7, 2023

You may be aware of this already, but here are at least three instances of inline javascript in the app:

studies/templates/studies/_image_display.html
web/templatetags/web_extras.py
studies/templates/studies/study_detail.html

@okaycj
Copy link
Contributor Author

okaycj commented Nov 7, 2023

You may be aware of this already, but here are at least three instances of inline javascript in the app:

studies/templates/studies/_image_display.html web/templatetags/web_extras.py studies/templates/studies/study_detail.html

Yup! I was aware of at least one of these, but need to put this down to start working on other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants