feat(testing): added contract fuzzing and property-based testing - #717
Open
Codex723 wants to merge 1 commit into
Open
feat(testing): added contract fuzzing and property-based testing#717Codex723 wants to merge 1 commit into
Codex723 wants to merge 1 commit into
Conversation
…tructure - Add 4 contract fuzzing harnesses: fuzz_wasm_validation, fuzz_contract_invocation, fuzz_contract_spec_parse, fuzz_test_generator - Add contract property-based tests (tests/contract_property_tests.rs) with 6 test groups covering WASM validation, hash computation, mock invocation, storage, addresses, and environment - Update fuzz/Cargo.toml with new contract fuzz targets - Update fuzzing CI workflow to include contract fuzz targets in fuzz-smoke matrix and contract property tests - Update FUZZING_GUIDE.md with contract fuzzing section, examples, and documentation - Add contract fuzzing seed corpus files for WASM validation, spec parsing, and test generation - Update .cargo-mutants.toml to include contract testing source files
|
@Codex723 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
D-11: Add Contract Fuzzing and Property-Based Testing
Summary
Integrates fuzzing tools and property-based testing frameworks to automatically discover edge cases and vulnerabilities in Soroban contracts. This PR adds 4 contract-specific fuzzing harnesses, 18 property-based tests across 6 test groups, seed corpora, CI pipeline integration, mutation testing coverage, and comprehensive documentation.
Changes
New Files
fuzz/fuzz_targets/fuzz_wasm_validation.rsfuzz/fuzz_targets/fuzz_contract_invocation.rsfuzz/fuzz_targets/fuzz_contract_spec_parse.rsfuzz/fuzz_targets/fuzz_test_generator.rstests/contract_property_tests.rsfuzz/corpus/fuzz_wasm_validation/valid_wasm.binfuzz/corpus/fuzz_contract_spec_parse/valid_spec.jsonfuzz/corpus/fuzz_contract_spec_parse/empty_spec.jsonfuzz/corpus/fuzz_contract_spec_parse/malformed_spec.jsonfuzz/corpus/fuzz_test_generator/valid_source.rsfuzz/corpus/fuzz_test_generator/empty_source.rsModified Files
fuzz/Cargo.tomltempfiledependency.github/workflows/fuzzing.ymlFUZZING_GUIDE.md.cargo-mutants.tomlAcceptance Criteria
tests/contract_property_tests.rsfuzz/fuzz_targets/.cargo-mutants.tomlupdated to include contract source filescargo-llvm-covcoverage generation with Codecov upload.github/workflows/fuzzing.ymlupdated with contract fuzz targets and property testsFUZZING_GUIDE.mdupdated with contract fuzzing section, examples, and security focus areasHow to Test
Related Issue
Closes #308