Standard Library

GoHTTPClient

Represents net/http.Client. Do(), Get(), Post() are SSRF sinks when the URL comes from user input.

3 sinks
Taint flow0 sources 3 sinks
Sinks — dangerous call
.Get()
.Post()
.Do()

Sinks

.Get()Sink
#
Signature
Get(url string) (*Response, error)

Makes GET request. SSRF sink when url is user-controlled.

tracks:0
.Post()Sink
#
Signature
Post(url, contentType string, body io.Reader) (*Response, error)

Makes POST request. SSRF sink when url is user-controlled.

tracks:0
.Do()Sink
#
Signature
Do(req *Request) (*Response, error)

Executes arbitrary HTTP request. SSRF sink.

tracks:0

Fully-Qualified Names

FQNField
net/http.Clientfqns[0]
net/httpfqns[1]
http.Clientpatterns

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import GoHTTPClient

Rules Using This Class