Skip to content

fix/oom to v1 - #3020

Merged
Vincent Biret (baywet) merged 2 commits into
support/v1from
fix/oom-to-v1
Aug 13, 2026
Merged

fix/oom to v1#3020
Vincent Biret (baywet) merged 2 commits into
support/v1from
fix/oom-to-v1

Conversation

@baywet

Copy link
Copy Markdown
Member

port of #3005 to v2

Copilot AI and others added 2 commits August 13, 2026 07:02
…on laughs)

Ports the fix merged on main (#3000) to the support/v1 reader, which walks the
SharpYaml node graph directly. Aliases share a single source node, so a tiny
document expands exponentially when materialized into independent OpenApi any
trees, exhausting process memory (CWE-400).

Adds a per-parse node budget enforced by ParsingContext and a nesting depth
limit enforced while materializing any values. Limits are configurable through
the new OpenApiReaderLimits type and default to 5,000,000 nodes and depth 64
(mirroring the System.Text.Json default) as on main.

Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
Co-authored-by: baywet <7905502+baywet@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@baywet
Vincent Biret (baywet) merged commit 1f9aea9 into support/v1 Aug 13, 2026
17 checks passed
@baywet
Vincent Biret (baywet) deleted the fix/oom-to-v1 branch August 13, 2026 14:15
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.

3 participants