Repository navigation
Retire the Media Parser Fuzz Gate, Since Its Inputs Are Trusted - #570
Conversation
Every media file the gate and the normalizer read is the maintainer's own, so OPERATIONS.md "Trust Boundaries" rules out defending them against crafted shapes. The fixture builders the media gate tests used move to checks/tests/media_fixtures.py, and the fuzzer's own seed tests go with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #570 +/- ##
==========================================
Coverage ? 67.12%
==========================================
Files ? 11
Lines ? 2494
Branches ? 0
==========================================
Hits ? 1674
Misses ? 820
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
An unresolved finding leaves the PR description and OPERATIONS.md disagreeing on whether fork runs read untrusted pull-request media files, which the retirement rationale depends on.
1 open issue
What changed in this PR
This PR retires the media parser fuzz gate. The fuzzer generated malformed versions of committed media to test the metadata gate and normalizer. The PR treats that work as unnecessary because the media is the maintainer's own, so the fuzzer, its CI step, and its docs are removed. The metadata-leak and accidental-damage checks in the media gate stay. The fixture builders the gate tests need move into a new shared module.
Changes:
- Deletes the fuzzer script and its CI step in the validate action.
- Moves the fixture builders into
checks/tests/media_fixtures.py.jpeg_fixtureandexif_segmentlose the parameters only the fuzzer used. - Removes the fuzzer's seed-sampling tests, its entry in the CLI usage test, and its mentions in the README files.
| File | Description |
|---|---|
| README.md | Removes the paragraph that described the fuzzer in the media section. |
| checks/tests/test_media_metadata_gate.py | Imports the shared fixtures module, drops the fuzzer seed tests, and removes the unused random import. |
| checks/tests/test_cli_usage.py | Removes the fuzzer script from the CLI usage list. |
| checks/tests/media_fixtures.py | New module with the fixture builders moved from the fuzzer, with unused parameters removed. |
| checks/README.md | Removes the fuzzer's table row and its link reference. |
| checks/media_parser_fuzz_gate.py | Deleted. This was the fuzzer script. |
| .github/actions/validate/action.yml | Removes the CI step that ran the fuzzer. |
Review effort: Lite

Summary
Retires the media parser fuzz gate. Per
OPERATIONS.md"Trust Boundaries", the media tooling reads the maintainer's own media. In a fork's run it reads the pull request's untrusted files, where the worst a crafted file does is fail that run's own check. So that section adds nothing to defend the tooling against crafted shapes, and the fuzzer tests exactly those.checks/media_parser_fuzz_gate.pyand its step in the validate action.checks/tests/media_fixtures.py. Each is unchanged except thatjpeg_fixtureandexif_segmentlose the parameters only the fuzzer passed.README.mdandchecks/README.md.OPERATIONS.mdalready says nothing is added against a crafted file.The media gate's own checks for metadata leaks and accidental damage stay.
Part of #549. That issue closes from the promotion pull request.
Verification
cd checks && uvx ruff check . && uvx ruff format --check . && uvx mypy@latest: clean.cd checks && python3 -m unittest discover -s tests: 200 tests, OK.prose_lint.py --diffagainst the merge base: no findings.Local review
Two passes ran. The first raised three findings:
jpeg_fixtureand thetailparameter ofexif_segmentwere dead once the fuzzer was gone. Both were fixed in the second commit.jpeg_segmentandpng_chunkduplicate builders inscripts/normalize_media.py. Declined, since fixtures built independently of the encoder under test keep a defect in that encoder from cancelling out of the test. This duplication predates the change, which only moves it.The second pass raised nothing.
🤖 Generated with Claude Code