Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

633 B
Raw Blame
# Unbounded memory growth – data structures without a clear max limit
# Can lead to OOM under load.

rules:
  - id: unbounded-asyncio-queue
    message: asyncio.Queue() with no maxsize can grow unbounded. Use asyncio.Queue(maxsize=N) for integrations (e.g. log queues).
    severity: ERROR
    languages: [python]
    pattern-either:
      - pattern: asyncio.Queue()
      - pattern: asyncio.Queue(maxsize=0)
    metadata:
      category: reliability
      cwe: "CWE-400: Uncontrolled Resource Consumption"
      tags: [python, reliability]
      confidence: HIGH
      source: https://docs.python.org/3/library/asyncio-queue.html