[HtmlSanitizer] Add fuzzing and mutation testing workflows - #64321
#64321Conversation
|
Hey! I see that this is your first PR. That is great! Welcome! Symfony has a contribution guide which I suggest you to read. In short:
Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change. When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor! I am going to sit back now and wait for the reviews. Cheers! Carsonbot |
|
I do not understand the unit / integration test failures. It doesn't seem likely that these changes could have caused them, as I did not touch the tests nor existing code inside src/. (The static analysis failures make sense, because of how PHP-Fuzzer works. I'm not sure the best way to hack around it.) |
|
Thanks for this, and thanks for your patience with how long it took to get an answer. Closing. We would rather run this kind of analysis as an occasional audit than carry fuzzing and mutation testing as standing CI infrastructure, since the maintenance of a workflow is ours forever. The wiring here shows why it is not free either. The fuzzer triggers on every pull request touching None of that is a criticism of fuzzing HtmlSanitizer, which is exactly the right component to point this at. Findings from campaigns you run on your side are very welcome: anything exploitable through https://symfony.com/security, the rest as regular bug reports. |
This PR adds both fuzz-testing and mutation testing to the CI workflow in GitHub Actions, with specific tests added to the HtmlSanitizer component. If accepted, I plan to do follow-up work to add improved test coverage to other Symfony components.
Since this is CI-only work, I don't consider it a new feature, deprecation, or bug fix, but that's only from one perspective of what the word "feature" means. Please feel free to push back if you think I'm incorrect.
Context: https://old.reddit.com/r/PHP/comments/1tjdjho/claude_mythos_audited_symfony_and_found_19/on2010n/
cc @javiereguiluz