Skip to content

👷 ci(fuzz): native Go fuzzing of the mqweb MQSC DISPLAY parser (CI-20) - #182

Merged
konih merged 1 commit into
mainfrom
fuzz-native-mqsc-parser
Jul 31, 2026
Merged

👷 ci(fuzz): native Go fuzzing of the mqweb MQSC DISPLAY parser (CI-20)#182
konih merged 1 commit into
mainfrom
fuzz-native-mqsc-parser

Conversation

@konih

@konih konih commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Summary (CI-20)

Restores fuzzing to CI — the OpenSSF Scorecard Fuzzing check has been 0 since the v1alpha1↔v1beta1 conversion round-trip fuzz was retired in Phase 8e. This adds a native Go fuzz target over a real parser of untrusted external input.

What

  • FuzzParseMQSCDisplayAttributes (internal/adapter/mqrest/mqsc_display_parse_fuzz_test.go) fuzzes parseMQSCDisplayAttributes — the parser that turns mqweb REST runCommand DISPLAY text (from an external queue manager) into KEY(value) attribute maps. Asserts it never panics and upholds its output contract on arbitrary bytes: keys non-empty, lower-cased, [a-z0-9] only; values carry no surrounding single-quote.
  • Seed corpus (real AMQ8864I …details. PROFILE(APP.Q) … samples + adversarial edges) doubles as regressiongo test runs it every build.
  • fuzz matrix job in ci.yaml (30s -fuzztime, CGO_ENABLED=0, SHA-pinned, go-cache), modeled on the retired CI-8 job: retries only transient infra failures, but fails immediately with no retry if a new crash corpus appears under testdata/fuzz, so a real finding is never masked.

Verification

  • go test ./internal/adapter/mqrest/ green (seed corpus).
  • Local -fuzz -fuzztime=20s: ~560k execs, 137 interesting inputs, no crash, invariants held.
  • go build ./..., task format:check clean; golangci clean on the package; actionlint clean for the new job.

Notes

  • Single-target matrix is intentionally extensible — add more FuzzXxx targets (e.g. LTPA/auth body parsing) as follow-ups by appending to matrix.target.
  • Whether OpenSSF flips Fuzzing 0→10 depends on its next scan detecting the func Fuzz target; the CI job provides active fuzzing regardless.

…I-20)

Restores fuzzing to CI (OpenSSF Scorecard 'Fuzzing' was 0 since the v1alpha1 conversion
round-trip fuzz was retired in Phase 8e). Adds FuzzParseMQSCDisplayAttributes over
parseMQSCDisplayAttributes — the parser of untrusted mqweb REST DISPLAY text — asserting it
never panics and upholds its key/value output contract on arbitrary input. Seed corpus doubles
as regression (run by `go test`); 20s local run = 560k execs, no crash.

New `fuzz` matrix job in ci.yaml (30s fuzztime, CGO-free, SHA-pinned) modeled on the retired
CI-8 job: retries only transient infra failures, but fails immediately (no retry) if a new
crash corpus appears under testdata/fuzz so a real finding is never masked.
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@konih
konih merged commit c0f5a09 into main Jul 31, 2026
22 checks passed
@konih
konih deleted the fuzz-native-mqsc-parser branch July 31, 2026 11:51
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