이 페이지는 아직 한국어로 제공되지 않으며 번역 작업 중입니다. 번역에 관한 질문이나 의견이 있으시면 언제든지 저희에게 연락해 주십시오.

Metadata

ID: python-security/request-verify

Language: Python

Severity: Error

Category: Security

Description

The verify parameter controls whether the SSL certificate should be verified during your server requests. It’s strongly recommended to set this parameter to True which is the default value. This rule will warn you when it’s detected False has been set.

Non-Compliant Code Examples

import requests

def fetch_data():
    r = requests.get(w, verify=False, timeout=5)
from requests import get
r = get(w, verify=False)  # verify should be True
r = get(w, verify=False, timeout=10)  # verify should be True

Compliant Code Examples

from requests import get
r = get(w)
r = get(w, timeout=10, verify=True)
from requests import get
r = get(w)
r = get(w, timeout=10)
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis