Bounty #1112: Add /attest/submit fuzzer (bounded, safe) - #8410
Open
MrHyplex9511 wants to merge 1 commit into
Open
MrHyplex9511 wants to merge 1 commit into
MrHyplex9511 wants to merge 1 commit into
Conversation
6 tasks
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.
Bounty #1112 — /attest/submit fuzzer
Bounded, safety-first fuzzer for the
POST /attest/submitattestation endpoint, plus an offline pytest suite and README.Deliverables
tools/fuzz_attest.py— stdlib-only fuzzer (urllib/json/argparse). 102 seeded payloads across 6 classes:missing_field,wrong_type,bad_json,oversized,injection,truncated.tools/fuzz_attest/test_fuzz_attest.py— 15 offline pytest tests (no network), covering vocabulary size/categories, dry-run cap, network-free dry run, 4xx/5xx/200 classification, exception handling, credential-field absence, throwaway miner-id guarantee, raw bad_json serialization, base-url validation.tools/fuzz_attest/README.md— usage, safety contract, payload-class and verdict tables.Live bounded run (2026-09-14, https://rustchain.org/attest/submit)
60 requests, 1.5s spacing, seed 1. Every payload rejected as a handled HTTP 4xx — no 5xx, no unexpected 200.
Verdicts:
handled_4xx: 60, anomalies: 0.Safety contract
fuzz-<16 hex>) — no real miner identities or credentials.--delay 1.0minimum spacing (default 1.5);--dry-runmode for CI.Compliance with issue requirements
bad_jsonandtruncated.verdict_countssplit intohandled_4xx/server_5xx/unexpected_200, anomalies flagged with response bodies.Verification
python3 -m pytest tools/fuzz_attest/ -v→ 15 passed.python3 tools/fuzz_attest.py --dry-run --requests 60validates generation offline.Note: the live node's validation appears stricter than docs/API.md (requires
device/minerfields and rejectsclock_skewstrings). Not a bug — just schema drift worth a doc update.