feat: Attestation Fuzz Harness + Crash Regression Corpus — Bounty #475#1960
Merged
Scottcjn merged 2 commits intoScottcjn:mainfrom Mar 29, 2026
Merged
Conversation
added 2 commits
March 28, 2026 06:49
6 findings: 1 Critical, 2 High, 2 Medium, 1 Low - RC-01 CRITICAL: Testnet mode always-accept (X402_TESTNET defaults to '1') - RC-02 HIGH: Payment header bypass (presence check, no verification) - RC-03 HIGH: Payment replay attack (no tx deduplication) - RC-04 MEDIUM: Admin key timing attack (use hmac.compare_digest) - RC-05 MEDIUM: Hardcoded admin key default in fleet_immune_system.py - RC-06 LOW: Wildcard CORS on payment endpoints Includes executable PoC: security/x402-poc/test_x402_vulns.py Auditor: @B1tor RTC Wallet: RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff
Add property-based fuzz testing harness for the /attest/submit validator
pipeline using Hypothesis.
## What's included
- tests/fuzz/attestation_validators.py — Validators extracted verbatim
from node/rustchain_v2_integrated_v2.2.1_rip200.py; no Flask dependency
- tests/fuzz/attestation_fuzz_harness.py — 17 Hypothesis test functions,
10,500+ generated cases, 8 crash classes, seeded for determinism
- tests/fuzz/regression_corpus/ — 9 JSON fixtures (8 known crash classes +
1 bug report for OverflowError in _attest_positive_int)
- tests/fuzz/run_fuzz.py — CI runner; exits non-zero on any regression
- tests/fuzz/README.md — Usage, CI integration, coverage table
## Bug found by harness
_attest_positive_int() catches (TypeError, ValueError) but NOT OverflowError.
Passing float('inf') raises: OverflowError: cannot convert float infinity to integer
Fix: add OverflowError to the except clause.
## CI command
python tests/fuzz/run_fuzz.py
Closes #475
RTC Wallet: RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
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.
Attestation Fuzz Harness — Bounty #475
Deliverables
Closes #475
RTC Wallet:
RTC2fe3c33c77666ff76a1cd0999fd4466ee81250ff