Opened 10 years ago

Closed 9 years ago

#14201 closed New feature (fixed)

Add a "security overview" page to the docs

Reported by: Russell Keith-Magee Owned by: David Fischer
Component: Documentation Version: 1.2
Severity: Normal Keywords: security
Cc: djfische@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


We should have a single place in the docs that addresses security issues, in the same vein as the discussion on database optimization.

This is to highlight problems that aren't security issues, but could lead to security issues if not addressed or understood adequately.

Example topics:

  • How XSS is handled
  • How CSRF is handled
  • Limitations of Django's CSRF handling with MItM attacks and with untrusted subdomains.
  • Server configuration issues that should be kept in mind (e.g., keeping code out of the server root, throttling file upload size c.f. #14192).

Attachments (2)

fo (1 bytes) - added by db 10 years ago.
14201-security.diff (8.6 KB) - added by David Fischer 9 years ago.
updated security doc with sql injection and clickjacking

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by Russell Keith-Magee

Triage Stage: UnreviewedAccepted

Changed 10 years ago by db

Attachment: fo added

comment:2 Changed 10 years ago by db

woops sorry, didn't mean to do that...

comment:3 Changed 9 years ago by Graham King

Keywords: security added
Severity: Normal
Type: New feature

comment:4 Changed 9 years ago by David Fischer

Cc: djfische@… added
Easy pickings: unset

comment:5 Changed 9 years ago by David Fischer

I think this is a great idea. However, there will be quite a bit of overlap between this page and the "How it works" and "Limitations" sections of the CSRF docs. Are you thinking about moving those sections or do you think this new section should just link to them?

comment:6 Changed 9 years ago by Luke Plant

I reckon we should just link to them - similar to how the DB optimization docs link to multiple specific sections of another document.

comment:7 Changed 9 years ago by David Fischer

Has patch: set
Owner: changed from nobody to David Fischer

I added a patch containing the topic doc on security. Feel free to add to it or let me know if there are any other security topics you would like to see in it.

comment:8 Changed 9 years ago by Luke Plant

This patch is a great start. We should also include:

  • SQL injection (I know, Django makes you forget it even exists, isn't it wonderful?)
  • Clickjacking

I think we should also have a dedicated section on SSL, and how to really get that hardened, which really requires setting both SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE to be True. That in turn might bring up the subject of how to securely redirect HTTP traffic to HTTPS. which is tricky due to reverse proxies. (See #14597 - warning: epic ticket!). I'm happy to write this bit, having some experience here.

Regarding OWASP - I don't think their stuff on CSRF is up to much, especially their prevention cheat sheet, so perhaps we shouldn't link to that. I've corresponded with them by e-mail at length, and pointed out the flaws in their argument regarding using CSRF tokens in the query string, but they didn't seem interested in fixing that page. I'd fix it myself, except you need permissions, and my requests for an account have gone unheeded (though they said I was welcome to edit it), and eventually I got worn out trying to improve things.

Changed 9 years ago by David Fischer

Attachment: 14201-security.diff added

updated security doc with sql injection and clickjacking

comment:9 Changed 9 years ago by David Fischer

I updated the doc with information on SQL injection (how did I forget) and clickjacking. I also removed the links to OWASP.

comment:10 Changed 9 years ago by Luke Plant

Triage Stage: AcceptedReady for checkin
UI/UX: unset

There are a few small corrections I need to make, and there are probably always going to be things that could be added, but this is basically RFC.

comment:11 Changed 9 years ago by Luke Plant

Resolution: fixed
Status: newclosed

In [16360]:

Fixed #14201 - Add a "security overview" page to the docs

Thanks to davidfischer for the initial patch!

Note: See TracTickets for help on using tickets.
Back to Top