Skip to content

Add property-based fuzz tests#18

Merged
kellenmurphy merged 1 commit into
mainfrom
feat/fuzz-testing
May 16, 2026
Merged

Add property-based fuzz tests#18
kellenmurphy merged 1 commit into
mainfrom
feat/fuzz-testing

Conversation

@kellenmurphy

Copy link
Copy Markdown
Owner

Summary

  • Adds src/lib/fuzz.test.ts with property-based fuzz tests using fast-check
  • Tests all parsers (SAML decoder, JWT decoder, X.509 DER/ASN.1 parser, generic fallback) against arbitrary inputs on every CI build
  • Core invariant: any arbitrary input either returns a valid result or throws an Error — never a non-Error throw
  • The DER parser gets two fuzz passes: arbitrary base64 strings and valid base64 of arbitrary byte sequences (exercises the parser independently of atob input validation)
  • Updates SECURITY.md to document the fuzzing approach, update the reporting address to me@kellenmurphy.com, and add GitHub private advisory as the primary reporting channel
  • Satisfies CII Best Practices fuzzing criterion

All 181 tests pass, 100% coverage maintained.

- Add fast-check fuzz tests for all parsers (saml, jwt, cert, generic)
- Invariant: arbitrary input never causes a non-Error throw
- Update SECURITY.md: GitHub private advisory as primary reporting channel,
  me@kellenmurphy.com as alternate, fuzzing section documenting approach
@codecov

codecov Bot commented May 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kellenmurphy
kellenmurphy merged commit 49381af into main May 16, 2026
5 checks passed
@kellenmurphy
kellenmurphy deleted the feat/fuzz-testing branch June 15, 2026 17:26
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