77998[FEATURE] Introduce Content Security Policy reporting & inspection
Commit message
Review
-
Code review CR +2 Done
- Oliver Hader +2
- Georg Ringer +1
- Torben Hansen +1
- Andreas Kienast +1
-
Verified V +2 Done
- Oliver Hader +2
- Georg Ringer +1
- Torben Hansen +1
- Andreas Kienast +1
- core-ci +1 CI
Issues 2
Files 50
- Build/Sources/TypeScript/backend/security/element/csp-reports.tsnew+408 −0
- typo3/sysext/backend/Classes/Middleware/ContentSecurityPolicyHeaders.php+6 −1
- typo3/sysext/backend/Classes/Middleware/ContentSecurityPolicyReporter.phpnew+43 −0
- typo3/sysext/backend/Classes/Security/ContentSecurityPolicy/CspAjaxController.php5new+204 −0
- typo3/sysext/backend/Classes/Security/ContentSecurityPolicy/CspModuleController.phpnew+80 −0
- typo3/sysext/backend/Configuration/Backend/AjaxRoutes.php+6 −0
- typo3/sysext/backend/Configuration/Backend/Modules.php+14 −0
- typo3/sysext/backend/Configuration/RequestMiddlewares.php+10 −0
- typo3/sysext/backend/Resources/Private/Language/Modules/content-security-policy.xlfnew+90 −0
- typo3/sysext/backend/Resources/Private/Templates/Security/CspModule.htmlnew+68 −0
- typo3/sysext/backend/Resources/Public/Icons/module-security.svgnew+1 −0
- typo3/sysext/backend/Resources/Public/JavaScript/security/element/csp-reports.jsnew+219 −0
- typo3/sysext/core/Classes/Domain/EqualityInterface.phpnew+28 −0
- typo3/sysext/core/Classes/Middleware/AbstractContentSecurityPolicyReporter.phpnew+131 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Event/InvestigateMutationsEvent.phpnew+76 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Processing/AssetHandler.phpnew+112 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Processing/GoogleMapsHandler.php2new+148 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Processing/HandlerTrait.phpnew+44 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/Report.phpnew+107 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ReportAttribute.phpnew+28 −0
Show 30 more files
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ReportDemand.phpnew+49 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ReportRepository.php2new+233 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ReportStatus.phpnew+29 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/Resolution.php2new+90 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ResolutionRepository.phpnew+139 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/ScopeRepository.php2new+46 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Reporting/SummarizedReport.phpnew+71 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/CoveringInterface.phpnew+30 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Directive.php+7 −3
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/ModelService.php+19 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/MutationMode.php+5 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/MutationSuggestion.phpnew+79 −0
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/Policy.php+82 −19
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php+41 −2
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/SourceCollection.php+58 −5
- typo3/sysext/core/Classes/Security/ContentSecurityPolicy/UriValue.php+44 −4
- typo3/sysext/core/Classes/Type/Map.php+3 −0
- typo3/sysext/core/Configuration/DefaultConfiguration.php+2 −0
- typo3/sysext/core/Configuration/DefaultConfigurationDescription.yaml+6 −0
- typo3/sysext/core/Configuration/Services.yaml+10 −0
- typo3/sysext/core/Documentation/Changelog/12.3/Feature-99499-IntroduceContent-Security-PolicyHandling.rst+23 −2
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/PolicyTest.php+76 −21
- typo3/sysext/core/Tests/Unit/Security/ContentSecurityPolicy/UriValueTest.php+48 −0
- typo3/sysext/core/ext_tables.sql2+37 −0
- typo3/sysext/frontend/Classes/Middleware/ContentSecurityPolicyHeaders.php+6 −1
- typo3/sysext/frontend/Classes/Middleware/ContentSecurityPolicyReporter.phpnew+44 −0
- typo3/sysext/frontend/Configuration/RequestMiddlewares.php+11 −0
- typo3/sysext/install/Classes/Controller/ControllerTrait.php+3 −3
- typo3/sysext/install/Classes/Controller/InstallerController.php+1 −1
- typo3/sysext/install/Classes/Controller/LayoutController.php+1 −1
Review log 5683
Show 3558 earlier messages
-
Oliver Hader uploaded patch set 1 03/01/23, 22:13
-
Oliver Hader updated the commit message in patch set 2 03/01/23, 22:17
-
core-ci voted on patch set 1 V +1 03/01/23, 22:21 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38277
-
core-ci voted on patch set 2 V +1 03/01/23, 22:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38278
-
Oliver Hader uploaded patch set 3
V +103/02/23, 08:43 -
core-ci voted on patch set 3 V +1 03/02/23, 08:50 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38294
-
Georg Ringer voted on patch set 3 CR +2 03/02/23, 13:26
-
Georg Ringer voted on patch set 3 V +2 03/02/23, 13:26
-
Oliver Hader wrote 03/02/23, 15:13
Removed Code-Review+2 by Georg Ringer -
Oliver Hader wrote 03/02/23, 15:13
Removed Verified+2 by Georg Ringer -
Oliver Hader commented on patch set 3 03/07/23, 12:17
This change is ready for review.ReportRepository.php:70Leads to ``` An exception occurred while executing a query: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'db.sys_http_report.uuid' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by` and needs to be solved in a different way. ``` -
Oliver Hader uploaded patch set 4
V +103/07/23, 17:37 -
Oliver Hader commented on patch set 4 03/07/23, 17:38
ReportRepository.php:70ReplyDone -
core-ci voted on patch set 4 V +1 03/07/23, 17:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38619
-
Benjamin Kott uploaded patch set 5
V +103/09/23, 16:32 -
core-ci voted on patch set 5 V -1 03/09/23, 16:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38706
-
Oliver Hader uploaded patch set 6
V -103/09/23, 17:01 -
core-ci voted on patch set 6 V +1 03/09/23, 17:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38708
-
Oliver Hader uploaded patch set 7
V +103/10/23, 10:17 -
core-ci voted on patch set 7 V +1 03/10/23, 10:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38762
-
Oliver Hader uploaded patch set 8
V +103/10/23, 23:35 -
Oliver Hader uploaded patch set 9 03/10/23, 23:41
-
core-ci voted on patch set 8 V -1 03/10/23, 23:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38783
-
core-ci voted on patch set 9 V -1 03/11/23, 00:46 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38784
-
Markus Klein commented on patch set 9 03/11/23, 07:37
is this line supposed to be removed before merge? I would rather see it within the ticket -
Oliver Hader uploaded patch set 10
V -103/11/23, 12:44 -
core-ci voted on patch set 10 V -1 03/11/23, 12:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38791
-
Oliver Hader uploaded patch set 11
V -103/11/23, 15:12 -
Oliver Hader updated the commit message in patch set 12 03/11/23, 15:13
-
Oliver Hader commented on patch set 12 03/11/23, 15:15
Reply
Yepp, these comments have to be adjusted, refined and put to proper RST files. This changeset is still work-in-progress - however testing and feedback is appreciated. -
Oliver Hader marked it work in progress 03/11/23, 15:19
-
core-ci voted on patch set 11 V +1 03/11/23, 15:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38796
-
core-ci voted on patch set 12 V +1 03/11/23, 15:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38797
-
Oliver Hader updated the commit message in patch set 13
V +103/11/23, 18:09 -
core-ci voted on patch set 13 V +1 03/11/23, 18:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38807
-
Jasmina Ließmann wrote 03/12/23, 09:18
Removed cc Jasmina Ließmann. -
Oliver Hader uploaded patch set 14
V +103/15/23, 09:25 -
core-ci voted on patch set 14 V +1 03/15/23, 09:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38963
-
Oliver Hader uploaded patch set 15
V +103/15/23, 11:00 -
core-ci voted on patch set 15 V +1 03/15/23, 11:08 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/38974
-
Oliver Hader rebased onto patch set 16
V +103/16/23, 00:33 -
core-ci voted on patch set 16 V +1 03/16/23, 00:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39027
-
Oliver Hader uploaded patch set 17
V +103/16/23, 10:38 -
core-ci voted on patch set 17 V +1 03/16/23, 10:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39049
-
Oliver Hader uploaded patch set 18
V +103/16/23, 11:46 -
core-ci voted on patch set 18 V +1 03/16/23, 11:53 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39054
-
Oliver Hader uploaded patch set 19
V +103/18/23, 08:42 -
core-ci voted on patch set 19 V +1 03/18/23, 08:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39178
-
Oliver Hader uploaded patch set 20
V +103/23/23, 11:33 -
core-ci voted on patch set 20 V +1 03/23/23, 11:42 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39464
-
Oliver Hader voted on patch set 20 CR -1 03/23/23, 13:23
-
Oliver Hader uploaded patch set 21
CR -1V +103/23/23, 15:04 -
core-ci voted on patch set 21 V +1 03/23/23, 15:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39479
-
Oliver Hader uploaded patch set 22
V +103/23/23, 15:53 -
core-ci voted on patch set 22 V +1 03/23/23, 16:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39482
-
Oliver Hader uploaded patch set 23
V +103/23/23, 22:36 -
Oliver Hader commented on patch set 23 03/23/23, 22:37
This change is ready for review. -
core-ci voted on patch set 23 V +1 03/23/23, 22:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39502
-
Susi Moog commented on patch set 23 03/24/23, 14:46
Tested with sentry as external reporting tool: when using an external reporting URI everything works as expected, however, it would be nice to: - not have the backend module available if reporting is disabled or configured to an external URL - if not possible, then it would be nice to have a hint in the backend module that there may be no reports because there is an external report URL configured -
Oliver Hader commented on patch set 23 CR -1 03/26/23, 08:07
On it, received some additional feedback during TYPO3camp Dresden -
Michael Schams wrote 03/26/23, 09:58
Removed cc Michael Schams. -
Oliver Hader uploaded patch set 24
CR -1V +103/26/23, 14:29 -
Oliver Hader commented on patch set 24 03/26/23, 14:34
Reply
Thx. I've added some hints in the UI in case CSP handling is disabled or remote reporting is used. -
core-ci voted on patch set 24 V -1 03/26/23, 14:51 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39646
-
Oliver Hader uploaded patch set 25
V -103/26/23, 15:02 -
core-ci voted on patch set 25 V +1 03/26/23, 15:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39649
-
Torben Hansen voted on patch set 25 V +1 03/26/23, 17:58
-
Georg Ringer voted on patch set 25 V +1 CR +1 03/26/23, 19:03
-
Andreas Kienast commented on patch set 25 V +1 03/27/23, 06:26
CspAjaxController.php:62Shouldn't this be 403? There's nothing wrong on server side, IMO.CspAjaxController.php:83Suggestion: use an enum for actions, not necessarily for this patch.GoogleMapsHandler.php:75`$event->setMutationSuggestions(self::$suggestion);`?Resolution.php:31Method is unused.ScopeRepository.php:36findAllext_tables.sql:417char, we always have 36 characters -
Andreas Kienast commented on patch set 25 03/27/23, 07:00
ext_tables.sql:417ReplyNever mind, the Database Analyzer always converts this to VARCHAR... -
Andreas Kienast uploaded patch set 26
CR +1V +103/27/23, 07:15 -
Andreas Kienast commented on patch set 26 03/27/23, 07:23
GoogleMapsHandler.php:75ReplyDoneResolution.php:31ReplyDoneScopeRepository.php:36ReplyDone -
core-ci voted on patch set 26 V +1 03/27/23, 07:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39664
-
Andreas Kienast commented on patch set 26 V +1 CR +1 03/27/23, 07:37
Remaining comments of me shall not block this patch. -
Benni Mack commented on patch set 27
CR +1V +103/27/23, 08:27Published edit on patch set 26. -
Benni Mack commented on patch set 27 03/27/23, 08:29
CspAjaxController.php:62ReplyDoneCspAjaxController.php:83ReplyI suggest using separate actions for this module but I also think, we could do this in the next iteration- -
Oliver Hader commented on patch set 27 03/27/23, 08:30
CspAjaxController.php:83ReplyI don't think this is necessary since that `enum CspAjaxControllerAction` would not be reused at other places in the PHP code. -
core-ci voted on patch set 27 V +1 03/27/23, 08:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/39672
-
Andreas Kienast voted on patch set 27 V +1 CR +1 03/27/23, 08:49
-
Georg Ringer voted on patch set 27 V +1 CR +1 03/27/23, 09:19
-
Torben Hansen voted on patch set 27 V +1 CR +1 03/27/23, 09:23
-
Oliver Hader commented on patch set 27 V +2 CR +2 03/27/23, 09:34
Thanks folks! ❤️ -
Oliver Hader merged patch set 28 03/27/23, 09:34