Repository navigation
test(fuzz): Atheris coverage-guided fuzzing for the record parsers - #12
Merged
Merged
Conversation
RigorFoundry parses untrusted content-addressed audit records; every parser is
contractually fail-closed (ValueError on hostile input, never an unexpected
crash or hang). Add coverage-guided fuzzing to verify that continuously and to
close the OpenSSF Scorecard Fuzzing check.
- fuzz/ Atheris targets for AuditReport.from_dict, Candidate.from_dict,
AuditPolicy.from_json, and ReviewRecord.from_dict, over a shared JSON-boundary
harness (fuzz/_record_fuzz.py) that tolerates only ValueError and
RecursionError and lets any other exception surface as a finding.
- requirements/fuzz.{in,txt}: Atheris 3.1.0, hash-locked via pip-compile
--generate-hashes (wheels for CPython 3.12+).
- .github/workflows/fuzz.yml: least-privilege, digest-pinned actions, bounded
per-target runs on PR / main / weekly, failing on any crash.
- docs/fuzzing.md + nav; ruff per-file-ignore for the Atheris instrument-imports
pattern (E402) in fuzz/.
Dev-only harness: not shipped in the wheel, outside the mypy/coverage/pytest
scope, and self-scan clean. Local shakeout ran each target ~2M executions with
no crash. Gates green: ruff + tree-wide format, strict MyPy, typos, bandit,
tools.audit, strict MkDocs.
Authored by Anulum Fortis & Arcane Sapience ([email protected])
Seat: RIGOR-FOUNDRY/claude-9dcc
Verified: https://pypi.org/pypi/atheris/3.1.0/json
The Fuzz job installed only runtime and Atheris, so 'pip install --no-build-isolation .' had no build backend (hatchling) and failed. Install requirements/build.txt first, mirroring the other CI jobs. Verified end-to-end in a clean venv: build+runtime+fuzz+package install, target runs clean. Authored by Anulum Fortis & Arcane Sapience ([email protected]) Seat: RIGOR-FOUNDRY/claude-9dcc
This branch was previously deployed
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.
Adds Atheris fuzz targets for the untrusted-JSON record parsers (AuditReport/Candidate/AuditPolicy/ReviewRecord), hash-locked atheris 3.1.0, a least-privilege digest-pinned Fuzz workflow, and docs. Dev-only harness (not shipped, outside mypy/coverage/pytest scope, self-scan clean). Closes the OpenSSF Scorecard Fuzzing check. Local shakeout: ~2M executions/target, no crash.
Authored by Anulum Fortis & Arcane Sapience ([email protected])