Skip to content

feat(fuzz): add fuzz harnesses for jwt, secrets and yaml parsing#340

Open
TBX3D wants to merge 2 commits into
vmfunc:mainfrom
TBX3D:feat/fuzz-harnesses
Open

feat(fuzz): add fuzz harnesses for jwt, secrets and yaml parsing#340
TBX3D wants to merge 2 commits into
vmfunc:mainfrom
TBX3D:feat/fuzz-harnesses

Conversation

@TBX3D

@TBX3D TBX3D commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

adds 7 fuzz targets across the parsers and extractors that read untrusted
input directly: YAML module definitions, JWT analysis and segment
decoding, endpoint/secret extraction from JS, OpenAPI spec parsing, and

<title> extraction from an HTTP body. all corpora are clean after a local run (no crashers); each target asserts its own invariant beyond "must not panic" where one exists (a reported secret match must be a verbatim substring of the input, extracted endpoints must be sorted and deduped).

the YAML fuzz target needed parseYAMLModuleBytes pulled out of
ParseYAMLModule so module bytes can be fuzzed without a temp file; the
path-based function now just wraps it, no behavior change.

split the byte-parsing and validation core out of the file-reading
wrapper so module definitions can be parsed from memory. behavior is
unchanged: ParseYAMLModule reads the file then delegates.
@TBX3D
TBX3D requested a review from vmfunc as a code owner July 9, 2026 21:17
@codecov-commenter

codecov-commenter commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7ea1cd2). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #340   +/-   ##
=======================================
  Coverage        ?   54.97%           
=======================================
  Files           ?       81           
  Lines           ?     6876           
  Branches        ?        0           
=======================================
  Hits            ?     3780           
  Misses          ?     2833           
  Partials        ?      263           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added size/l <500 lines changed scan changes to scan engine modules changes to scan modules tests test changes labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

pr summary

7 files changed (+215 -0)

category files
go source 7
tests 6

cover the untrusted-input parsers that had no fuzz coverage: jwt
analysis and segment decode, js secret scanning, yaml module parsing,
openapi spec parsing, html title extraction and js endpoint extraction.
the secrets, openapi and endpoint harnesses assert invariants (match is
a substring of input, ok implies non-nil spec, results non-empty and
sorted); the rest are crash-only.
@TBX3D
TBX3D force-pushed the feat/fuzz-harnesses branch from d789537 to f16f6aa Compare July 9, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules changes to scan modules scan changes to scan engine size/l <500 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants