Skip to main content

Go

Vulkro finds the HTTP endpoints in a Go project, traces request data to dangerous sinks and checks go.mod dependencies against the local CVE bundle.

vulkro scan .
vulkro discover . # endpoint map only

What is analysed​

AreaCoverage
Project detectiongo.mod
Routersnet/http, Gin, Echo, Chi, Fiber, gorilla/mux
Access modelEach endpoint gets an auth tier, scopes and tenant scoping, used by the OWASP API Top 10 checks
Taint sourcesr.URL.Query(), r.PostFormValue, r.Header.Get, router path parameters
Taint sinksSQL query construction, os/exec, filesystem paths, outbound request URLs (SSRF), redirects, HTML output (XSS), server-side templates, logs
Go-specific checksZip slip on archive extraction; CRLF and response-header injection (w.Header().Set/Add, http.Redirect, http.SetCookie)
Dependenciesgo.mod and go.sum modules, plus the Go standard library from the go directive, matched against the local CVE bundle. See Dependencies and CVEs

Each taint finding carries the source-to-sink hop chain. See Taint analysis.

Example finding​

func getUser(w http.ResponseWriter, r *http.Request) {
id := r.URL.Query().Get("id")
rows, _ := db.Query("SELECT name FROM users WHERE id = " + id)
defer rows.Close()
}
CRITICAL Attacker-controlled request value reaches a database/sql query sink without a bind parameter
CWE-89 SQL injection · proven (admitted)
main.go:12
Fix: Use a parameterised query (`db.Query("... WHERE id = $1", v)`).
id: go-taint-sql-001:...

Run vulkro explain GO-TAINT-SQL-001 for the full guidance.