Chi HTTP router (chi.Router and chi.Mux). Path parameters extracted via URLParam are taint sources. Chi is one of the most popular lightweight routers in the Go ecosystem.
.URLParam().URLParamFromCtx().URLParam()SourceURLParam(r *http.Request, key string) string
Returns URL path parameter for the given key (e.g. /users/{id}). User-controlled.
return.URLParamFromCtx()SourceURLParamFromCtx(ctx context.Context, key string) string
Returns URL path parameter from the request context. User-controlled.
return.Handle()NeutralHandle(pattern string, h http.Handler)
Registers an http.Handler for a URL pattern. Routing primitive (neutral).
.HandleFunc()NeutralHandleFunc(pattern string, h http.HandlerFunc)
Registers a handler function for a pattern. Routing primitive (neutral).
.Get()NeutralGet(pattern string, h http.HandlerFunc)
Registers a GET handler for a pattern. Routing primitive (neutral).
.Post()NeutralPost(pattern string, h http.HandlerFunc)
Registers a POST handler. Routing primitive (neutral).
| FQN | Field | |
|---|---|---|
| github.com/go-chi/chi/v5.Router | fqns[0] | |
| github.com/go-chi/chi/v5.Mux | fqns[1] | |
| *.Router | patterns | |
| *.Mux | patterns |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
require github.com/go-chi/chi/v5 v5.0.12
from codepathfinder.go_rule import GoChiRouter