Review main Merged

85554[TASK] Reduce amount of noisy CSP reports

Oliver Hader CR +2 V +2 Easy +24 −3 updated 01/07/25, 17:57

Commit message

To reduce the amount of invalid reports (e.g. caused by
automated security scans that are brute forcing any URL
with random parameter), the internal CSP reporting
endpoint now requires an additional hash value.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Garvin Hicking +1
    • Stefan Bürk +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1922

  1. Oliver Hader uploaded patch set 1 08/08/24, 11:24

  2. core-ci voted on patch set 1 V +1 08/08/24, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/63042

  3. Andreas Kienast commented on patch set 1 08/08/24, 12:19

    AbstractContentSecurityPolicyReporter.php:58

    Where is the query param passed to the request?
  4. Garvin Hicking commented on patch set 1 08/08/24, 22:34

    AbstractContentSecurityPolicyReporter.php:58 Reply

    I believe typo3/sysext/core/Classes/Security/ContentSecurityPolicy/PolicyProvider.php L94 in this patch?
  5. Andreas Kienast commented on patch set 1 08/09/24, 05:50

    AbstractContentSecurityPolicyReporter.php:58 Reply

    Argh, thanks. For whatever reason I didn't notice the other changed file. Scrap my comment.
  6. Andreas Kienast voted on patch set 1 CR +1 08/09/24, 07:00

  7. Garvin Hicking commented on patch set 1 CR +1 V +1 08/09/24, 10:47

    Works for me, and IMO a good idea. I wonder though if `isCspReport` may be a more natural place to do this validation (also moving the requestTime check there)?
  8. Benni Mack updated the commit message in patch set 2 CR +1 V +1 10/18/24, 13:42

  9. Garvin Hicking voted on patch set 2 CR +1 V +1 10/18/24, 19:42

  10. Benni Mack rebased onto patch set 3 CR +1 V +1 10/28/24, 09:00

  11. Andreas Kienast commented on patch set 3 CR +1 V +1 10/28/24, 09:03

    Reply

    I don't think it matches there. Whether the hmac is valid or not, the request is still a CSP report, from a technical POV.
  12. core-ci voted on patch set 3 V +1 10/28/24, 09:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68712

  13. Garvin Hicking commented on patch set 3 CR +1 V +1 10/28/24, 09:12

    Reply

    ack
  14. Oliver Hader updated the commit message in patch set 4 CR +1 V +1 12/24/24, 11:29

  15. Oliver Hader commented on patch set 4 12/24/24, 11:30

    I'd opt for back-porting this to TYPO3 v12 as well.
  16. core-ci voted on patch set 4 V +1 12/24/24, 11:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/71600

  17. Garvin Hicking voted on patch set 4 CR +1 V +1 12/24/24, 13:00

  18. Stefan Bürk voted on patch set 4 CR +1 01/03/25, 09:20

  19. Stefan Bürk voted on patch set 4 V +1 01/03/25, 13:17

  20. Christian Kuhn voted on patch set 4 CR +1 V +1 01/06/25, 13:31

  21. Oliver Hader voted on patch set 4 CR +2 V +2 01/07/25, 17:57

  22. Oliver Hader merged patch set 5 01/07/25, 17:57