Skip to content

Files

Latest commit

 

History

History
25 lines (15 loc) · 596 Bytes

B113.md

File metadata and controls

25 lines (15 loc) · 596 Bytes

Pattern: Missing request timeout

Issue: -

Description

Checks for requests calls without a timeout specified.

Nearly all production code should use this parameter in nearly all requests, Failure to do so can cause your program to hang indefinitely.

Example of insecure code:

requests.get('https://gmail.com')

Example of secure code:

requests.get('https://gmail.com', timeout=5)

Further Reading