Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzz testing #83

Open
2 tasks
notriddle opened this issue Nov 12, 2017 · 4 comments
Open
2 tasks

Fuzz testing #83

notriddle opened this issue Nov 12, 2017 · 4 comments

Comments

@notriddle
Copy link
Member

We really should do some form of exhaustive testing.

  • Testing to make sure that ammonia doesn't crash. That should be pretty easy, though, since the most complex parts of ammonia are all in html5ever, it probably won't find much.
  • Testing to make sure that a browser never runs JavaScript after Ammonia filters a piece of HTML. That could be a bit harder, but it's probably a lot more valuable.
@willkg
Copy link

willkg commented Nov 19, 2017

If it helps, feel free to use Bleach's test data. We didn't build it in a way that's easy for other projects to use, but I'm game for fixing that if you have ideas.

https://github.com/mozilla/bleach/tree/master/tests

Also:

https://github.com/mozilla/bleach/tree/master/tests_website

@notriddle
Copy link
Member Author

Bleach is under the Apache license.

Ammonia is dual Apache / MIT license, for GPLv2 compatibility and to match with rustc.

@Eijebong
Copy link
Collaborator

@notriddle I played with fuzzing some times ago. The only crash I could find was in html5ever servo/html5ever#305

@mozfreddyb
Copy link
Contributor

For future reference, there's also servo/html5ever#290 (segfault) and servo/html5ever#289 (high CPU usage on malformed input).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants