Content security policy icon

Content security policy

Premium Certified Partner
Maintained by Brendan Heywood, Catalyst IT
This plugin allows an admin to create a Custom Security Policy (CSP) in both reporting mode and enforcing mode. A simple use case is to detect and cleanup issues with non secure content after a migration from http to https, through to advanced policies to mitigate from XSS attacks.
Price option: Free

Supports Moodle 2.7-5.0 See all versions
Latest release: 3 weeks ago
Installations: 1326
Downloads (last 90 days): 733

Frankenstyle name: local_csp
Local plugins

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hi there, the versions listed as compatible with this plugin only seem to go up to Moodle v4.4. There is a branch in VCS for MOODLE_500_STABLE though. Is that branch compatible with Moodle v5+ ? Thanks!
Sorry!!! I was very confuses. Cookie is not relation with CSP. It's on httpd.conf.
Close my post.
The last change in Github is more than one year old. It would be nice if the current version from github (2022060300) could be published here, was the latest version in the Moodle plugins database is very old ... 2019100100 !!!
Thank you for the nice plugin.
Let me have a question. I may mis-understand something.
--
I made this setting. It seems nice for testing cookies.
"HttpOnly;Secure;SameSite=Strict"
But it seems no effect for this value.
Set-Cookie: MoodleSession
The cookie is "secure; SameSite=None".
I tested the version from GitHub on my Moodle 3.9.17+ test server and it installed successfully, although the README.md file is a bit out of date.
So, install the version from https://github.com/catalyst/moodle-local_csp. This https://moodle.org/plugins/local_csp page doesn't always have the latest version of the plugin.
Is this plugin still supported in the currently supported versions of Moodle, as of October 2022, i.e. Moodle 3.9 and up?
https://github.com/catalyst/moodle-local_csp/issues/77
Hi,
May I have the list of what CSP is supported in this plugin? Thank you.
hi Will,
Have you actually tested it in 3.3? I'd be surprised if it didn't work as-is in 3.3 but I haven't tested it myself. If there is any issues under 3.3 can you please raise them here https://github.com/catalyst/moodle-local_csp/issues
thanks
Any plans to release this for Moodle 3.3?
Oh ... I think I got it ... I need to apply specific policy for IE... I just used the default policies that were included in the plug-in. And I figured out my report issue - when I removed the custom css for the theme the report showed nothing, put it back, we get the violations again.
Never mind... just viewed the browser compatibility at https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP sad
One more question.
Does this plug-in work with IE-11?
I can block content in Chrome and FFox so far but same content not blocked in IE-11.
TIA!!
Hi, just installed this on our test system and seems great so far. Running Moodle version 3.2. I have 2 questions:
1. The https://github.com/moodlerooms/moodle-tool_httpsreplace reported a far greater number of potentially problematic domains than the CSP violation report did. I guess I'd have to dig around in the code to find out what each is doing exactly to determine why but if anyone has an idea about this that would be very helpful!
2. I generated a few pages of CSP violation reports, made some changes and reset all statistics. I think perhaps that was not the correct thing to do. Our system technically should be producing the same report it did initially but since I reset statistics I can't seem to find a way to make this happen. I've cleared caches and disabled and re-enabled the plug-in. I can't find anything in the documentation about this. Am I missing something? TIA!
Approval issue created: CONTRIB-6759