redline
MediumError handlingmissing-timeout

Network call without a timeout

Network call without a timeout. requests.get has no timeout, so a slow server can hang this forever.

This is how the comment reads inline, under the flagged line.

Why it matters

Without a timeout one stuck upstream holds a worker until the process dies. At scale that becomes an outage.

What to do

Pass timeout= (and retry with backoff if the call is idempotent).

Examples

Flagged
requests.get(url)
Better
requests.get(url, timeout=10)

What it catches

It reads a pattern on each line, aware of strings and comments. Languages: Python. Scope: All files. These cases are the rule's own tests: the first set must be flagged and the second must not.

Flagged

r = requests.get(url)

Left alone

r = requests.get(url, timeout=5)

Research

Network calls with no timeout or abort signal. One slow upstream can hang a worker forever.

Turn it off or change it

In a config file for the CLI, or in the API's rules field:

{
  "rules": {
    "disable": [
      "missing-timeout"
    ],
    "severity": {
      "missing-timeout": "low"
    }
  }
}

Read the source or report a false positive.