regexp package. FindString() and FindAllString() return tainted matches. MustCompile() with user-controlled pattern is a ReDoS risk.
.Compile().MustCompile().FindString()NeutralFindString(s string) string
Returns leftmost match. Source of tainted string from user input.
| FQN | Field | |
|---|---|---|
| regexp | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
// standard library — no go.mod entry required
from codepathfinder.go_rule import GoRegexp