sdk/golang/Standard Library/GoHTTPResponseWriter
Standard Library

GoHTTPResponseWriter

Represents net/http.ResponseWriter. Write() and WriteString() are XSS sinks when writing unsanitized user input into the HTTP response body.

1 sink
Taint flow0 sources 1 sink
Sinks — dangerous call
.Write()

Sinks

.Write()Sink
#
Signature
Write(b []byte) (int, error)

Writes raw bytes to response. XSS sink when b contains user input.

tracks:0

Other Methods

.WriteHeader()Neutral
#
Signature
WriteHeader(statusCode int)

Sets HTTP status code. Not a taint sink.

Fully-Qualified Names

FQNField
net/http.ResponseWriterfqns[0]
*.ResponseWriterpatterns

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 GoHTTPResponseWriter

Rules Using This Class