- Created `scripts/agent/fuzz-utils.mjs` with shared random data generators.
- Created `scripts/agent/fuzz-nostrEventSchemas.mjs` to fuzz event builders and validators, including `sanitizeAdditionalTags`.
- Created `scripts/agent/fuzz-dmDecryptor.mjs` to fuzz DM decryption with mocked decryptors and custom reproducer generation.
- Created `scripts/agent/fuzz-magnetUtils.mjs` to fuzz magnet URI normalization.
- Verified that all fuzz targets run without crashes.
- Saved execution reports to `artifacts/`.
- Added fuzzing scripts for nostrEventSchemas, dmDecryptor, and magnetUtils.
- Fixed crashes in nostrEventSchemas related to unsafe stringification of content.
- Fixed crash in magnetUtils when options argument is null.
- Added safeStringify helper in nostrEventSchemas.js.
- Included fuzzing reports and reproducers.
Co-authored-by: PR0M3TH3AN <[email protected]>
Fuzzer discovered a crash when `pointerTags` is passed as null.
Added array check to prevent TypeError.
Also added fuzz harnesses for schemas, dm decryptor and magnet utils.
- Add fuzz testing scripts for `nostrEventSchemas.js`, `dmDecryptor.js`, and `magnetUtils.js` in `scripts/agent/`.
- Fix `build...` functions in `nostrEventSchemas.js` to handle `null`/`undefined` inputs.
- Fix `buildVideoPostEvent` to gracefully handle circular references in content serialization.
- Fix `normalizeAndAugmentMagnet` in `magnetUtils.js` to handle non-iterable `extraTrackers`.
- Include minimal reproducers for discovered crashes in `examples/reproducers/`.