Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ func (c Client) Do(req *http.Request, assertions ...Assertion) error {

c.logInfo("[.] %s %s %s", req.Proto, req.Method, req.URL)
startedAt := time.Now()
res, err := c.getHttpClient().Do(req)
// G704: the request URL comes from the operator's own command line, and
// fetching it is the entire purpose of this tool -- no trust boundary is
// crossed, so this is not SSRF.
res, err := c.getHttpClient().Do(req) // #nosec G704 - user asked for this URL
if err != nil {
var b strings.Builder
fmt.Fprintf(&b, "failed to send request:\n- %s\n", err)
Expand Down Expand Up @@ -356,7 +359,7 @@ func (c Client) getHttpClient() *http.Client {
},
}
if c.SkipSslChecks {
tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} // #nosec G402 - user askef for it
tr.TLSClientConfig = &tls.Config{InsecureSkipVerify: true} // #nosec G402 - user asked for it
}

return &http.Client{
Expand Down
Loading