Skip to content

Add fuzzing to CI - #12887

Open
Dreamsorcerer wants to merge 29 commits into
masterfrom
fuzz
Open

Add fuzzing to CI#12887
Dreamsorcerer wants to merge 29 commits into
masterfrom
fuzz

Conversation

@Dreamsorcerer

Copy link
Copy Markdown
Member

No description provided.

@Dreamsorcerer
Dreamsorcerer requested a review from webknjaz as a code owner June 9, 2026 18:36
@Dreamsorcerer Dreamsorcerer added the backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot label Jun 9, 2026
@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.25%. Comparing base (77c5108) to head (c90edb3).
⚠️ Report is 9 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12887      +/-   ##
==========================================
- Coverage   98.99%   98.25%   -0.75%     
==========================================
  Files         132      131       -1     
  Lines       49454    49702     +248     
  Branches     2572     2619      +47     
==========================================
- Hits        48959    48835     -124     
- Misses        371      733     +362     
- Partials      124      134      +10     
Flag Coverage Δ
Autobahn ?
CI-GHA 98.27% <ø> (-0.64%) ⬇️
OS-Linux 98.04% <ø> (-0.64%) ⬇️
OS-Windows 96.46% <ø> (-0.59%) ⬇️
OS-macOS 97.35% <ø> (-0.59%) ⬇️
Py-3.10 97.54% <ø> (-0.59%) ⬇️
Py-3.11 97.80% <ø> (-0.59%) ⬇️
Py-3.12 97.88% <ø> (-0.59%) ⬇️
Py-3.13 97.86% <ø> (-0.59%) ⬇️
Py-3.14 97.25% <ø> (-1.23%) ⬇️
Py-3.14t 96.98% <ø> (-0.59%) ⬇️
Py-pypy-3.11 ?
VM-macos 97.35% <ø> (-0.59%) ⬇️
VM-ubuntu 98.04% <ø> (-0.64%) ⬇️
VM-windows 96.46% <ø> (-0.59%) ⬇️
cython-coverage 38.15% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@codspeed-hq

codspeed-hq Bot commented Jun 9, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 84 untouched benchmarks
⏩ 83 skipped benchmarks1


Comparing fuzz (c90edb3) with master (203c1c5)2

Open in CodSpeed

Footnotes

  1. 83 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on master (8aac7bf) during the generation of this report, so 203c1c5 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

Comment thread .github/workflows/cifuzz.yml Outdated
@Dreamsorcerer
Dreamsorcerer requested a review from asvetlov as a code owner June 15, 2026 22:47
Comment thread fuzzers/http_parser.py Fixed
Comment thread fuzzers/http_parser.py Fixed
Comment thread fuzzers/http_payload_parser.py Fixed
Comment thread fuzzers/http_payload_parser.py Fixed
Comment thread fuzzers/payload_url.py Fixed
Comment thread fuzzers/payload_url.py Fixed
Comment thread fuzzers/payload_url.py Fixed
Comment thread fuzzers/payload_url.py Fixed
Comment thread fuzzers/web_request.py Fixed
Comment thread fuzzers/web_request.py Fixed
Comment thread fuzzers/web_request.py Fixed
Comment thread fuzzers/web_request.py Fixed
Comment thread fuzzers/web_request.py Fixed
Comment thread fuzzers/web_request.py Fixed
Comment thread fuzzers/http_parser.py Outdated
Comment thread fuzzers/http_payload_parser.py Outdated
Comment thread fuzzers/multipart.py Outdated
Comment thread fuzzers/payload_url.py Outdated
Comment thread fuzzers/web_request.py Outdated
Dreamsorcerer and others added 2 commits June 16, 2026 00:49
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Comment thread fuzzers/http_payload_parser.py Outdated
@Dreamsorcerer

Copy link
Copy Markdown
Member Author

@DavidKorczynski Could you check over this PR and confirm how to complete the integration with oss-fuzz repo?

@soccerlover29

Copy link
Copy Markdown

Tested the fuzz branch locally with the OSS-Fuzz base-builder-python image: two bugs in fuzzers/multipart.py crash the fuzzer (StreamReader never imported -> NameError; HeadersDictProxy passed a plain dict instead of CIMultiDict -> AttributeError: 'dict' object has no attribute 'getall'). Full details in my comment on oss-fuzz issue #15791. Fix PR targeting this branch is coming shortly.

Comment thread fuzzers/multipart.py Outdated
Comment thread fuzzers/multipart.py Outdated
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
Comment thread fuzzers/multipart.py Dismissed
@greptile-apps

greptile-apps Bot commented Aug 13, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains; the previously reported undefined CIMultiDict symbol is now imported at module scope before the multipart fuzz target uses it.

Reviews (4): Last reviewed commit: "Update http_parser.py" | Re-trigger Greptile

Comment thread fuzzers/multipart.py
@Dreamsorcerer

Copy link
Copy Markdown
Member Author

Looks like this needs to be merged with fuzzers only first, so oss-fuzz can update their end, then we can add the CI runs after that.

Comment thread fuzzers/multipart.py
from aiohttp.helpers import HeadersDictProxy


class FuzzStream(StreamReader):
@DavidKorczynski

Copy link
Copy Markdown

@DavidKorczynski Could you check over this PR and confirm how to complete the integration with oss-fuzz repo?

From an OSS-Fuzz perspective this looks reasonable. It may be easier to first fix the broken OSS-Fuzz builds -- you can see logs here https://oss-fuzz-build-logs.storage.googleapis.com/index.html#aiohttp

If you'd like, I'm happy to push a PR on the OSS-Fuzz side to fix things, which may resolve the CI failures here. Let me know if you'd like me to do that. Once that is done, I suspect it will be easier to get this PR over the line and the CIFuzz signals green.

Did you confirm this work locally with OSS-Fuzz's helper.py and build_fuzzers and check_build commands?

@Dreamsorcerer

Dreamsorcerer commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@DavidKorczynski Could you check over this PR and confirm how to complete the integration with oss-fuzz repo?

From an OSS-Fuzz perspective this looks reasonable. It may be easier to first fix the broken OSS-Fuzz builds -- you can see logs here https://oss-fuzz-build-logs.storage.googleapis.com/index.html#aiohttp

If you'd like, I'm happy to push a PR on the OSS-Fuzz side to fix things, which may resolve the CI failures here. Let me know if you'd like me to do that. Once that is done, I suspect it will be easier to get this PR over the line and the CIFuzz signals green.

Did you confirm this work locally with OSS-Fuzz's helper.py and build_fuzzers and check_build commands?

Thanks, I iterated a little with someone's bot on google/oss-fuzz#15990
I think I need to skip the CI part in this PR and merge the fuzzers, and then that PR can be merged, and then I can add the CI part back in here.

Do you think it'll be possible to get this atheris PR merged and released soon?
google/atheris#110
Or, should I just ignore the mypy errors for now and get this merged?

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

Labels

backport-3.15 Trigger automatic backporting to the 3.15 release branch by Patchback robot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants