Skip to content

fix(deps): Treat ambiguous slash extglobs as risky in picomatch patch - #983

Merged
BYK merged 1 commit into
masterfrom
fix/picomatch-patch-slash-bodies
Nov 18, 2026
Merged

BYK merged 1 commit into
masterfrom
fix/picomatch-patch-slash-bodies

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

The local picomatch patches from #982 for GHSA-fc5q-39xc-vjpf keep the repetition of any single-branch extglob with a literal /. They assume the slash fixes where each repeat starts. Two shapes break that and still backtrack exponentially:

  • +(**/a): a globstar crosses /.
  • +(*/*): one repeat's trailing * and the next repeat's leading * share a path segment, so every segment can split two ways.

Now a slash body keeps its repetition only when it has no globstar and every path segment holds at most one *, counting the segment shared across repeats. Globs like +(src/*/) and +(src/*/*.js) match as before. +(**/a), +(*/*) and +(*a/*) are literalized, like the other risky extglobs. The change covers the 4.0.7 and 2.3.2 patches in root and docs/.

via @BYK.

--

View Session [Sentry]

The slash exemption kept the repetition for any single-branch body with a
literal slash. A globstar crosses the slash (+(**/a)), and two stars in one
path segment split ambiguously across repeats (+(*/*)), so both still
backtracked exponentially. Keep the repetition only when every path
segment, including the one shared by adjacent repeats, holds at most one
star.
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-11-18 12:22 UTC

@sentry-junior
sentry-junior Bot marked this pull request as ready for review November 18, 2026 12:16
@sentry-junior
sentry-junior Bot requested a review from BYK November 18, 2026 12:16
@BYK
BYK merged commit 3f0e515 into master Nov 18, 2026
29 checks passed
@BYK
BYK deleted the fix/picomatch-patch-slash-bodies branch November 18, 2026 12:21
sentry-junior Bot added a commit to getsentry/junior that referenced this pull request Nov 21, 2026
The watched-merge case names getsentry/craft#983. The shared GitHub HTTP
fixture now serves it merged, with no Dependabot alerts, so a lookup in a
live run gets data instead of an unhandled-request error.
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