Code of Conduct
Feature Description
Now, with DSP taken care of, should we tackle subresource integrity next?
The header is supported by all browsers and might serve as a great addition to Django excellent security suite.
Problem
With supply chain attacks climbing to 3rd place on the OWASP ranking, I believe it might be a commendable effort.
Approving CDNs and vendors is a start, but I’d love SHA512 hashes, just in case 😉
Request or proposal
proposal
Additional Details
https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Subresource_Integrity
Implementation Suggestions
@RealOrangeOne has been maintaining django-sri for a good while now.
However, his approach was limited by Django's storage system.
I would propose to:
- The actual header implementation is mostly a copy-paste job of the CSP middleware.
- Add a
integrity() function to the BaseStorage as well as a sample implementation for the FileSystemStorage.
- Optionally, add an
integrity template tag to static, which doesn't call url but the new integrity function.
- Finally, we can safely wrap string paths in media assets in the Script and
CSS objects, which render integrity values into the template.
Code of Conduct
Feature Description
Now, with DSP taken care of, should we tackle subresource integrity next?
The header is supported by all browsers and might serve as a great addition to Django excellent security suite.
Problem
With supply chain attacks climbing to 3rd place on the OWASP ranking, I believe it might be a commendable effort.
Approving CDNs and vendors is a start, but I’d love SHA512 hashes, just in case 😉
Request or proposal
proposal
Additional Details
https://developer.mozilla.org/en-US/docs/Web/Security/Defenses/Subresource_Integrity
Implementation Suggestions
@RealOrangeOne has been maintaining django-sri for a good while now.
However, his approach was limited by Django's storage system.
I would propose to:
integrity()function to theBaseStorageas well as a sample implementation for theFileSystemStorage.integritytemplate tag tostatic, which doesn't callurlbut the newintegrityfunction.CSSobjects, which render integrity values into the template.