feat: add fuzzing support with Atheris and Docker configuration#13
Merged
Conversation
Signed-off-by: Ntege Daniel <danientege785@gmail.com>
|
Caution Review failedPull request was closed or merged during review WalkthroughAdds ClusterFuzzLite fuzzing infrastructure consisting of a Docker build environment, automated build script, four Atheris-based fuzz targets for SDK components (contracts, entity IDs, keys, transactions), project configuration, and GitHub Actions CI/CD workflow for regular fuzzing execution. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
This pull request introduces integration with ClusterFuzzLite to enable continuous fuzz testing for the Python SDK. It adds configuration files, Docker setup, build scripts, and several fuzz targets covering key parsing, transaction deserialization, contract parameter encoding, and entity ID parsing. The changes ensure that fuzzing is automated in CI for both pull requests and main branch pushes.
Key changes include:
ClusterFuzzLite Integration:
.github/workflows/clusterfuzzlite.ymlto run ClusterFuzzLite in CI for PRs and pushes tomain, building and running fuzzers with address sanitizer enabled..clusterfuzzlite/Dockerfileand.clusterfuzzlite/build.shto define the Docker environment and build process for Python fuzzers, including setup for Atheris and PyInstaller. [1] [2].clusterfuzzlite/project.yamlto specify Python as the fuzzing language.Fuzz Targets:
.clusterfuzzlite/keys_fuzzer.py: FuzzesPrivateKeyandPublicKeyparsing from strings and bytes..clusterfuzzlite/transaction_from_bytes_fuzzer.py: FuzzesTransaction.from_bytesdeserialization and re-serialization..clusterfuzzlite/contract_params_fuzzer.py: FuzzesContractFunctionParametersABI encoding with various input types..clusterfuzzlite/entity_id_fuzzer.py: Fuzzes entity ID parsing forAccountId,TokenId, andContractId.Dependency Management:
fuzzdependency group inpyproject.tomlfor Atheris and PyInstaller, used exclusively in the fuzzing Docker build.Related issue(s):
Fixes #
Notes for reviewer:
Checklist