Repository navigation
fix(event-import): cap decoded record size before readline buffers (#1255) - #1276
Conversation
🦋 Changeset detectedLatest commit: b308bf9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
[Medium impact] The PR appears safe to merge with no outstanding findings.
|
Coverage Report for CI Build 46260903702Coverage increased (+0.04%) to 77.622%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
Summary
Fixes #1255.
Addresses CWE-409 / Denial of Service by enforcing a streaming record size limit before
readlinebuffers an entire record into memory.Changes
RecordSizeLimitExceededErrortyped error naming the limit and record number.createRecordSizeLimiterstreaming Transform that tracks byte counts between newline (\n) boundaries.maxRecordBytes, destroys the source stream and fails early withRecordSizeLimitExceededError.maxRecordBytesinEventImportOptions(defaults to 1MB).