Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings

[HtmlSanitizer] Add fuzzing and mutation testing workflows - #64321

#64321
Closed
soatok wants to merge 1 commit into
symfony:8.2symfony/symfony:8.2from
soatok:8.1soatok/symfony:8.1Copy head branch name to clipboard
Closed

[HtmlSanitizer] Add fuzzing and mutation testing workflows#64321
soatok wants to merge 1 commit into
symfony:8.2symfony/symfony:8.2from
soatok:8.1soatok/symfony:8.1Copy head branch name to clipboard

Conversation

@soatok

@soatok soatok commented May 21, 2026

Copy link
Copy Markdown
Q A
Branch? 8.1
Bug fix? no
New feature? no
Deprecations? no
Issues no
License MIT

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

@carsonbot

Copy link
Copy Markdown

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:

  • Always add tests
  • Keep backward compatibility (see https://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (see https://symfony.com/releases)
  • Features and deprecations must be submitted against the 8.1 branch.

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!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@soatok

soatok commented May 21, 2026

Copy link
Copy Markdown
Author

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.)

@fabpot fabpot modified the milestones: 8.1, 8.2 May 25, 2026
@nicolas-grekas

Copy link
Copy Markdown
Member

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 src/Symfony/**, which is close to every pull request, at 100000 runs per target with a four hour timeout, and targets are auto-discovered, so each component you added would multiply that. A crash found by one of those campaigns would then turn an unrelated contributor's PR red for something their change did not cause. The corpus does not persist between runs either, so every campaign restarts from the six seeds and never gets deeper, which is where the value of fuzzing actually comes from.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.