- 필수 기능
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- 디지털 경험
- 소프트웨어 제공
- 보안
- 로그 관리
- 관리
- 인프라스트럭처
- ci
- containers
- csm
- ndm
- otel_guides
- overview
- slos
- synthetics
- tests
- 워크플로
ID: python-security/requests-http
Language: Python
Severity: Warning
Category: Security
Making a request with http enables attackers to listen to the traffic and obtain sensitive information. Use https://
instead.
def test1():
url1 = "http://api.tld"
requests.get(url1)
def test2():
url2 = "http://api.tld/user/{0}".format(user_id)
requests.get(url2)
def test3():
url3 = f"http://api.tld/user/{user_id}"
requests.get(url3)
requests.get(url4)
def test1():
requests.get("http://api.tld")
requests.get("http://api.tld/user/{0}".format(user_id))
requests.get(f"http://api.tld/user/{user_id}")
def download_stuff(identifier, data):
directory = "/tmp"
attachments = data.get("attachments", [])
attachment_url = attachments[0].get("attachment_url", "")
try:
response = requests.get(attachment_url, timeout=300)
response.raise_for_status()
except requests.exceptions.RequestException:
return (False, "")
def test1():
requests.get("https://api.tld")
requests.get("https://api.tld/user/{0}".format(user_id))
requests.get(f"https://api.tld/user/{user_id}")
|
|
For more information, please read the Code Analysis documentation
Identify code vulnerabilities directly in yourVS Code editor
Identify code vulnerabilities directly inJetBrains products