Skip to content

Run the fuzz harness in CI and extend it to the SARIF/JSONL exporters, the skill loader and the config parser #121

Closed

Description

@vsn411

Problem: fuzz/fuzz_parsers.py (Atheris) covers the report severity parser, skill frontmatter and severity filters, and CONTRIBUTING.md asks contributors to run it for a minute before a PR. Nothing runs it automatically, so a regression in the parsers (which turn untrusted agent output into exit codes and dashboard content) would only be caught by hand. The newer surfaces have no harness at all: report/sarif.py and the JSONL export (crash or invalid document on odd records), skills/loader.py (user-supplied skill files, #79), settings.py (config.toml), docext.py (uploaded PDF/DOCX/PPTX), and the runtime ingest payload parsing.

Build:

  1. A CI job (fuzz.yml, on PRs touching src/secfoo/report/, skills/, settings.py, docext.py, runtime/, plus a nightly schedule) that runs each harness for 60 seconds on Linux with Atheris and fails on a crash, uploading the reproducer as an artifact. Seed corpora live under fuzz/corpus/<harness>/ so CI starts from real inputs (the reports in examples/sample-output/ are a good seed).
  2. New harnesses: fuzz_sarif_export.py (random finding records → findings_to_sarif → must validate against the SARIF 2.1.0 schema), fuzz_skill_loader.py (random frontmatter and bodies → load or a clean SkillLoadError, never another exception), fuzz_config.py (random TOML → load_config or ConfigError), fuzz_docext.py (mutated PDF/DOCX/PPTX → text or a clean error, with a time limit per input), and fuzz_runtime_ingest.py (random NDJSON events → accepted or rejected, never a 500).
  3. Property tests next to each harness in the tests/test_property_parsers.py style, so the invariants also run in the normal suite on every platform.
  4. Fix every crash found; each fix gets its reproducer added to the corpus.

Where to look: fuzz/fuzz_parsers.py, tests/test_property_parsers.py, src/secfoo/report/sarif.py, src/secfoo/skills/loader.py, src/secfoo/settings.py, src/secfoo/docext.py, src/secfoo/runtime/, CONTRIBUTING.md.

Done when: the fuzz job runs on PRs and nightly; five new harnesses exist with seed corpora; the crashes found during the hackathon are fixed and listed in the PR with their reproducers.

Activity

  1. added
    enhancement
    help wanted
    hackathon
    difficulty: medium
    on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: mediumenhancementhackathonhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions