JS-066 HIGH: .gitignore glob is catastrophically backtrackable (ReDoS)

shared/util/ignore.js's glob() (the IGNOGlob port behind be status/ls wt-scan) implements */** by recursing on EVERY suffix with no memoization, so a pattern like *a*a*a*a*az against a long non-matching path is exponential. .gitignore is untrusted — a checkout writes attacker-controlled content and load() walks UP to $HOME stacking every .gitignore — and match() runs once per worktree entry, so a hostile repo wedges the single-threaded runtime. Method: Issues.

Input

Context

Goals

Constraints

WIP

Design decisions

TODOs

Blockers and bummers

Outcome