Skip to content

Fix Python false negatives on litellm, Bedrock, Cohere, Mistral, Ollama

Choose a tag to compare

@akanthed akanthed released this 21 Jul 15:06
· 60 commits to main since this release

This patch closes two false-negative bugs in the Python scanner surfaced by community testing: apps built on litellm, boto3 Bedrock clients not literally named bedrock, Cohere, Mistral, or Ollama were producing zero findings — even with --paranoid — because their call syntax wasn't recognized despite the SDK import itself being detected. Separately, AI001 (prompt injection) only looked 10 lines ahead of a request read for an LLM call, missing injection in any handler with realistic logic (logging, rate limiting, RAG lookups) in between.

AI001 now tracks request-tainted variables across the whole enclosing function instead of a fixed line window, and the LLM call-pattern list covers the additional SDKs. No new rules, no breaking changes — bug-fix only, verified against the exact repro cases with new regression tests.