Member of the Security-Team. My user-sbassett board should be fairly up-to-date, though we also track some other work within Asana these days.
User Details
- User Since
- Sep 12 2018, 3:52 PM (403 w, 3 d)
- Roles
- Administrator
- Availability
- Available
- IRC Nick
- sbassett
- LDAP User
- SBassett
- MediaWiki User
- SBassett (WMF) [ Global Accounts ]
Wed, Jun 3
Tue, Jun 2
Mon, Jun 1
Revisiting this over the past month, it looks like we're receiving, on average, ~ 2500 report-only reports each day for the current upload.wikimedia.org CSP config:
@ssingh - I think we should remove the restrictions/filters and just serve this for report-only policy across all of upload.wikimedia.org for all media files for a few days. And then ultimately set it as an enforcing CSP. At this point I'm not seeing any compelling reason not to aggressively move forward with this either in the comments here or CSP report-only log data.
Thu, May 28
Improved privacy - We can disable data collection for users who have explicitly enabled user scripts (which might lead to them being more identifiable in anonymized data)
@Mr._Starfleet_Command - Was there a reason to remove that warning? I think it's still probably valid.
Wed, May 27
Just to confirm: this does not appear to be affecting all wikis. When I try similar actions on enwiki, the reauth prompts work as expected for me.
Tue, May 26
Thu, May 21
Wed, May 20
Tue, May 19
And this is fixed.
Mon, May 18
As discussed at today's clinic, @Catrope et al are fine with this going through gerrit now, as we should not be blocked on any communications issues.
Fri, May 15
@ssingh - It's that, with current MW config, we should be seeing both the report-to directive in the CSP policy (and corresponding report endpoint) and the report-uri directive. We are currently seeing the correct report-to directive (and corresponding report endpoint) everywhere now (not as I had previously reported). This shouldn't really have anything to do with the report-to header.
I don't see why this and the other related patches cannot just go through gerrit as code hardening efforts. The incident is resolved, the account recovery process is still disabled and we will be putting in place a much stronger account recovery process early next week.
Thu, May 14
Well, this has had an impact on CSP reports:
Wed, May 13
Confirmed user is new WMF staff. Added to securtiy@.
So looking at mediawiki.org - when logged out, I get the old report-uri directive and no reporting-endpoints header. When logged in, I only get the report-to directive and the correct reporting-endpoints header. I understood that the current config should be setting both directives in both situations. @ssingh, @Bawolff - any thoughts on what might be happening here? I find the behavior confusing, since we should no longer be setting CSP via any session-related flags/values or $wgExtensionFunctions.
Tue, May 12
This works fine for me testing locally with MediaWiki master and MediaWiki-docker:
content-security-policy: script-src 'unsafe-eval' blob: 'self' localhost localhost:* 127.0.0.1 127.0.0.1: 'unsafe-inline'; default-src 'self' data: blob: localhost localhost:* 127.0.0.1 127.0.0.1:; style-src 'self' data: blob: localhost localhost:* 127.0.0.1 127.0.0.1: 'unsafe-inline'; object-src 'none'; report-uri /w/api.php?action=cspreport&format=json; report-to csp-report-to-endpoint ... reporting-endpoints: csp-report-to-endpoint='/w/api.php?action=cspreport&format=json';
And the extensive unit tests that account for multiple config scenarios still appear to be correct and passing.
This is in production now, at least on group0 and group1. And report-uri should be configured as a default:
> print_r( $wmgCSPUseReportURIDirective ); = true
Mon, May 11
I've confirmed that @CWilliams-WMF has Phab 2fa enabled. Just need to confirm this access request (@Rsilvola @EMill-WMF)
May 6 2026
This is currently allowed under the enforcing CSP within both Wikimedia production and the beta cluster. So @Bawolff's code suggestion isn't really relevant at this time as:
(Because CSP is not in use yet, but also the plan is to whitelist all of *.wikimedia.org just generally)
is no longer accurate, as we are setting an enforcing CSP in Wikimedia production and the beta cluster, and we are allowing *.wikimedia.org, likely indefinitely. And while rolled out in haste due to 2026-user-javascript-incident, an enforcing CSP was always a desired goal of Product Safety and Integrity and not something that we envision as a temporary solution at this time.
This is currently allowed under the enforcing CSP within both Wikimedia production and the beta cluster. But that may not always be the case. Regardless, this is an exception that will likely always require some kind of work-around.
We are now enforcing CSP within Wikimedia production, though with a generous allow-list, for the time being: https://github.com/wikimedia/operations-mediawiki-config/blob/35f7e4c45a33a22f171c721d6c24d18f127d36fb/wmf-config/InitialiseSettings.php#L12892-L12969. We plan to tighten up this policy over the coming months in Wikimedia production.
No longer seeing this as an issue in recent versions of Chrome and Firefox. Possibly fixed within some previous CSP improvement or config patch?
This is currently allowed under the enforcing CSP within Wikimedia production: https://github.com/wikimedia/operations-mediawiki-config/blob/35f7e4c45a33a22f171c721d6c24d18f127d36fb/wmf-config/InitialiseSettings.php#L12892-L12969. But that may not always be the case. Regardless, this is an exception that will likely always require some kind of work-around.

