Repository navigation
Conversation
The reference attribute regex admitted `.` both inside segments and as the repeated group separator, so a malformed dotted path could be partitioned exponentially many ways before rejection. A 40-segment reference took minutes on the synchronous parse thread. Require `.` strictly between segments: each character now has exactly one consumption path. This also rejects previously tolerated empty or trailing segments (`a.`, `a..b`), which could never resolve to a record. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
SanHsien
added a commit
to SanHsien/hypit
that referenced
this pull request
Oct 28, 2026
…i#447-hypit-ai#456; advance watermarks PRs hypit-ai#442, hypit-ai#443 and hypit-ai#444 were ported ahead of upstream (d5afdfe, 541ab59, 5dc763c) because the fork has the same defect and it is reachable from outside input. The rest are recorded with the fork-side evidence and a re-review trigger in docs/fork/DECISIONS.md. Release track unchanged at v0.3.1; watermarks PR 455, issue 456. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #447
Summary
One ReDoS finding from a security review of markup parsing:
packages/markup/src/syntax.tsvalidated dotted reference names with^[A-Za-z_][A-Za-z0-9_.:-]*(?:\.[A-Za-z_][A-Za-z0-9_.:-]*)*$..appears both inside the segment character class and as the separator, so on a malformed dotted name the regex engine tries exponentially many partitions — measured ~330 ms at 25 trailing dots, doubling per dot; ~40 dots is effectively a parse-thread hang. Any.svmlfile can reach this.ident(.ident)*—^[A-Za-z_][A-Za-z0-9_:-]*(?:\.[A-Za-z_][A-Za-z0-9_:-]*)*$—.only separates, so each character has exactly one consumption path and matching is linear.a.,a..bandx.y.(trailing/consecutive dots). Those are now rejected, which is a correctness fix as well as a security one — no test or fixture relied on the loose form.Behavior relative to main
camera.lensa.b.b.b…b!(25 dots + bad tail)a./a..b/x.y.Red / green
packages/markup/test/syntax.test.ts(new): parses a normal dotted reference, rejects empty/trailing segments, and rejects a long malformed input — the last fails by timeout on main and returns immediately here.Verification
node --import tsx --test packages/markup/test/syntax.test.ts— 16 pass.pnpm check(tsc -p tsconfig.json --noEmit) — clean.Merge Danger
a.,a..b) were previously admitted and are now validation errors.Checklist
Generated with Devin