Agent PR's Cache Key Omits Tenant ID, Risking Cross-Tenant Data Leakage
A pull request meant to reduce latency by skipping duplicate model calls was reviewed and found to contain serious caching flaws. The cache key is derived only from the prompt text, so tenants sending identical prompts would share cached responses. Failed or empty upstream results were also stored and reused, and the cache had no size limit, expiry, or eviction. The original test suite only covered the happy path and passed despite these defects. The reviewer proposed a corrected key that includes the tenant, model, and prompt, along with isolation and failure tests that expose the original bugs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in