Record Sinatra bind anti-pattern
ober
5dd80e7a9166ad6c1b7d58f1e111034fcf52dcc7
--- a/data/anti-patterns.sexp +++ b/data/anti-patterns.sexp @@ -2746,4 +2746,23 @@ ("title" . "Do Not Use GNU Awk-Only Features In Portable Doc/Test Tools") - ("tools" "rg" "make check-docs" "git diff --check"))) + ("tools" "rg" "make check-docs" "git diff --check")) + (("advice" + . + "Verify the run path passes the bind address into the lower HTTP server. In the current jerboa-sinatra path, run!/sinatra-run! compute bind but call httpd-start with only port and handler, so a port must first patch std/net/httpd or the lower server to honor address binding via tcp-listen.") + ("avoid" + . + "Do not document or implement network binding as solved merely because jerboa-sinatra accepts a bind: argument or has a bind app setting.") + ("id" . "jerboa-sinatra-bind-option-not-plumbed") + ("kinds" "docs" "module" "debug-error") + ("pattern" + . + "\\(run!.*bind:|\\(sinatra-run!.*bind:|set-option! \"bind\"") + ("severity" . "medium") + ("tags" "jerboa-sinatra" "httpd-start" "bind" "tcp-listen" + "webserver") + ("title" . "Do Not Assume jerboa-sinatra bind: Is Honored") + ("tools" + "rg \"bind|httpd-start|tcp-listen\"" + "jerboa_howto" + "jerboa_security_scan")))