Werkzeug is the WSGI toolkit Flask is built on. safe_join() is the canonical path-traversal sanitizer for serving files. utils.redirect is where Flask's open-redirect surface originates.
.safe_join().redirect().send_file().redirect()Sinkwerkzeug.utils.redirect(location: str, code: int = 302, Response=None) -> Response
Returns a redirect response. Open-redirect sink on user-controlled location.
0.send_file()Sinkwerkzeug.utils.send_file(path_or_file, environ, mimetype=None, ...) -> Response
Serves a file. Path-traversal sink on user-controlled path.
0.safe_join()Sanitizerwerkzeug.utils.safe_join(directory: str, *pathnames) -> str | None
Safely joins a base directory with user-supplied components. Path-traversal sanitizer.
return| FQN | Field | |
|---|---|---|
| werkzeug | fqns[0] |
Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.
from codepathfinder.go_rule import PyWerkzeug