feat(fuzz): introduce continuous fuzzing for oscal catalog (#2080) - #2080
feat(fuzz): introduce continuous fuzzing for oscal catalog (#2080)#2080nXtCyberNet wants to merge 71 commits into
Conversation
|
@nXtCyberNet Thx for this PR. Would you be able to present this at an upcoming community call? We have one tomorrow at 11AM ET. Short notice, but there is no rush if that is too soon for you, we can have a presentation two weeks hence. If the time zone is an issue, you could present at the APAC community meeting instead. Or both! See https://oscal-compass.dev/community/#community-meetings-and-communications. Let us know and we can add this topic to the agenda. Thx! |
|
Sure, I’ll try to present tomorrow at 11AM ET. |
Great! I added you to the agenda: #2080 (comment) I see there a a couple of pipeline failures... |
|
Fixes (in part) #2018. |
sorry , the lint pipeline failed because of the PEP8 style , i will fix it in next commit , and the 2nd was due to the difference in file location, i will correct them asap |
550bacc to
0581576
Compare
|
Hi @degenaro , following up from the community call — happy to elaborate on what PR #2080 is actually adding to the project. The core idea is round-trip idempotency testing: the fuzzer loads a mutated JSON input into the Catalog model, serializes it back out, and re-parses it. If the two parsed objects don't match, that's a silent data corruption bug — the kind that unit tests almost never catch because they only test inputs we already expect. What makes this more than just "run a fuzzer and hope for the best" is the structure-aware mutator. Instead of throwing random bytes at the parser (which Pydantic rejects immediately), it preserves valid JSON structure and mutates leaf values — UUIDs, strings, nested arrays, integer fields. This lets it bypass surface-level schema validation and actually exercise the deeper business logic in the Catalog model. On the infrastructure side, ClusterFuzzLite was chosen specifically because it needs zero external setup — everything runs inside GitHub Actions, corpus included. The fuzz run on PRs is capped at 10 minutes and configured as a non-blocking warning, so it won't slow down normal development. As for concrete value already delivered: the harness caught a real AttributeError caused by mixing Pydantic v1 and v2 API calls in the runtime environment. The longer-term goal is OpenSSF Scorecard Fuzzing 10/10 (currently 0/10), which closes issue #2018. The Catalog model is the pilot — once merged, the plan is to generalise the harness and expand to Profile and SSP incrementally. I know CI is currently failing — that's on my list to fix before requesting a formal review. Happy to jump on a call or answer any questions about the design. |
157c794 to
98a0bfa
Compare
|
@degenaro |
…ss#2067) Signed-off-by: Matteo Fari <matteofari06@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: Rohan Dev <rohantech2005@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
…ss#2068) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6.1.0 to 6.2.0. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v6.1.0...a309ff8) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: 6.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com> Signed-off-by: Rohan Dev <rohantech2005@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.3 to 46.0.4. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@46.0.3...46.0.4) --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com> Signed-off-by: Rohan Dev <rohantech2005@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
) Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6.0.1...de0fac2) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com> Signed-off-by: Rohan Dev <rohantech2005@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
…mpass#2070) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.11 to 4.32.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@19b2f06...b20883b) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.32.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.3. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v4.3.0...cdf6c1f) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 5.0.3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
* fix: latest pip-tools fails with pip 26.0 Signed-off-by: degenaro <lou.degenaro@gmail.com> * try again Signed-off-by: degenaro <lou.degenaro@gmail.com> * add comment Signed-off-by: degenaro <lou.degenaro@gmail.com> --------- Signed-off-by: degenaro <lou.degenaro@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Bumps [cryptography](https://github.com/pyca/cryptography) from 46.0.4 to 46.0.5. - [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst) - [Commits](pyca/cryptography@46.0.4...46.0.5) --- updated-dependencies: - dependency-name: cryptography dependency-version: 46.0.5 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
…pass#2087) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.1 to 4.32.3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@6bc82e0...9e907b5) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.32.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
…pass#2090) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.3 to 4.32.4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@9e907b5...89a39a4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.32.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Bumps [actions/stale](https://github.com/actions/stale) from 10.1.1 to 10.2.0. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@9971854...b5d41d4) --- updated-dependencies: - dependency-name: actions/stale dependency-version: 10.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lou DeGenaro <lou.degenaro@gmail.com> Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
|
Sorry for the delayed response over the last 15 days — life got quite busy , I have made significant improvements to the fuzzing harness since the initial review:
I have also addressed the earlier review comments:
The harness is now much more robust and focused on finding real silent data corruption bugs through metamorphic testing rather than random invalid inputs. Could you please take another look at the updated PR when you have time? I'm happy to make any further adjustments or hop on a quick call to discuss. Thanks! |
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
Signed-off-by: nXtCyberNet <rohantech2005@gmail.com>
64cc98c to
4fa5f11
Compare
Summary
This PR introduces a robust continuous fuzzing suite for
compliance-trestleusing ClusterFuzzLite and Atheris. The primary goal is to improve the security, correctness, and long-term reliability of OSCAL parsing by continuously fuzzing the complex and recursive Catalog data model.This implementation directly addresses the OpenSSF Scorecard Fuzzing check (currently 0/10), with the intent of raising it to a full 10/10 by enabling automated, coverage-guided fuzzing on every pull request.
Fix #2018
Types of changes
develop->main)Quality assurance (all should be covered)
Key Changes
1. Fuzzing Harness
tests/fuzz/fuzz_catalog.py, a coverage-guided fuzzing harness targeting the OSCALCatalogmodel.load → serialize → loadremains idempotent and lossless, detecting silent data corruption and logic regressions.2. Structure-Aware Mutation
3. Infrastructure-as-Code for Fuzzing
.clusterfuzzlite/Dockerfile.4. Bug Fixes
AttributeErrorby correctly using Pydantic v1 APIs (parse_raw) for theCatalogmodel, ensuring the fuzzer runs correctly in the current environment.Testing Instructions
To run the fuzzer locally:
Expected behavior:
NEW_UNIT_ADDED).Key links
Before you merge