The analysis is based on the provided commit 0d9e4a7bb3ae2eef8d38f2e970ff916599a2b2a6, which addresses the code injection vulnerability.
The commit diff explicitly shows modifications to two functions where eval() is used:
langroid.vector_store.base.VectorStore.compute_from_docs: The patch modifies this function to add a call to sanitize_command for the calc input before it is passed to eval(). This directly corresponds to the vulnerability described in the advisory GHSA-22c2-9gwg-mj59, which mentions LanceDocChatAgent using pandas eval() through vector_store.compute_from_docs().
langroid.agent.special.table_chat_agent.TableChatAgent.pandas_eval: This function is also modified in the patch to add a call to sanitize_command for the exprn input before it is passed to eval(), contingent on a new full_eval configuration flag.
In both cases, the 'before' state (implied by the patch that adds sanitization) involved passing potentially user-controlled input directly to eval(), which is a classic code injection vulnerability. The functions are identified by their full namespace, class, and method name as they would appear in runtime profiles. The evidence is taken directly from the changes in the commit patch, specifically the lines where eval() was used on unsanitized input (removed lines) and the introduction of sanitization (added lines).