This repository includes a deterministic malformed-input regression gate for POST /attest/submit plus a replayable regression corpus under tests/attestation_corpus/.
Current explicit corpus entries cover these malformed input classes:
- Invalid JSON root:
null - Invalid JSON root: array
- Miner identifier shape mismatch
- Device payload scalar/object mismatch
- Signals payload scalar/object mismatch
- Signals MAC list shape mismatch
- Fingerprint checks array/object mismatch
- Report payload scalar/object mismatch
python tests/replay_attestation_corpus.py tests/attestation_corpus/malformed_report_scalar.jsonThe script prints the HTTP status code and parsed JSON response, and exits non-zero if replay causes a server-side 5xx.
python -m pytest tests/test_attestation_fuzz.py -vPowerShell:
$env:ATTEST_FUZZ_CASES = "10000"
python -m pytest tests/test_attestation_fuzz.py -k mutation_regression_no_unhandled_exceptions -vBash:
ATTEST_FUZZ_CASES=10000 python -m pytest tests/test_attestation_fuzz.py -k mutation_regression_no_unhandled_exceptions -vThis is the CI-mode gate for "no unhandled exceptions" in the attestation parsing path. Set ATTEST_FUZZ_SEED only when you need to reproduce a specific random sequence locally.