mirror of
https://github.com/github/codeql.git
synced 2026-07-23 20:22:02 +02:00
38 lines
874 B
Ruby
38 lines
874 B
Ruby
require "httparty"
|
|
|
|
# BAD
|
|
HTTParty.get("http://example.com/", verify: false) # $ Alert
|
|
|
|
# BAD
|
|
HTTParty.get("http://example.com/", verify_peer: false) # $ Alert
|
|
|
|
# BAD
|
|
HTTParty.get("http://example.com/", { verify_peer: false }) # $ Alert
|
|
|
|
# BAD
|
|
HTTParty.post("http://example.com/", body: "some_data", verify: false) # $ Alert
|
|
|
|
# BAD
|
|
HTTParty.post("http://example.com/", { body: "some_data", verify: false }) # $ Alert
|
|
|
|
# GOOD
|
|
HTTParty.get("http://example.com/")
|
|
|
|
# GOOD
|
|
HTTParty.get("http://example.com/", verify: true)
|
|
|
|
# GOOD
|
|
HTTParty.get("http://example.com/", verify_peer: true)
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", body: "some_data")
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", body: "some_data", verify: true)
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", { body: "some_data" })
|
|
|
|
# GOOD
|
|
HTTParty.post("http://example.com/", { body: "some_data", verify: true })
|