Skip to content

test(fuzz): Atheris coverage-guided fuzzing for the record parsers - #12

Merged
anulum merged 2 commits into
mainfrom
land/fuzzing-harness
Jul 18, 2026
Merged

anulum merged 2 commits into
mainfrom
land/fuzzing-harness

Conversation

@anulum

@anulum anulum commented Jul 18, 2026

Copy link
Copy Markdown
Owner

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])

anulum added 2 commits July 18, 2026 16:47
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
@anulum
anulum merged commit cfb8766 into main Jul 18, 2026
14 checks passed
@anulum
anulum deleted the land/fuzzing-harness branch July 18, 2026 15:19

This branch was previously deployed

1 inactive deployment
github-pages — cfb87669 Deployed Jul 18, 2026 by anulum via deploy #56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant