Integration
Scan LangChain and LangGraph for memory poisoning, prompt injection and leaked secrets
Agents built with LangChain store memory in a vector store, and LangGraph agents (including LangMem) keep long-term memory in a LangGraph store. Mimvo scans the store object your code already builds, so it sees exactly what the agent retrieves, and reports the documents or items to review, quarantine or delete.
Install#
Mimvo is an open-source Python package for Python 3.11+, published on PyPI. The langchain extra adds langchain-core for LangChain vector stores. For a LangGraph or LangMem store, install the langgraph extra instead.
pip install "mimvo[langchain]" # LangChain vector storespip install "mimvo[langgraph]" # LangGraph / LangMem storesScan LangChain and LangGraph from the command line#
One command reads every record, runs the secrets, injection and poisoning checks, and writes a self-contained HTML report you can forward.
mimvo scan langchain \ --factory myapp.memory:store \ --namespace memories \ --report report.html- --factory takes module:attr, imported from the current directory the way uvicorn app:app is: a store, or a function or class that returns one.
- For a LangGraph store, --namespace limits the scan to a namespace prefix such as memories/alice, and --text-field names the item key that holds the text.
- Mimvo lists and fetches documents or items. It never adds, updates or deletes them.
Scan from Python#
The same scan from your own code, for a scheduled job or a notebook.
from pathlib import Pathfrom langgraph.store.memory import InMemoryStorefrom mimvo import Mimvofrom mimvo.scan import LangGraphStoreScanSource, render_htmlstore: InMemoryStore = ... # the store your agent writes tosource = LangGraphStoreScanSource(store, namespace=("memories",))report = Mimvo().scan(source)report.source = "langgraph:memories"Path("report.html").write_text(render_html(report), encoding="utf-8")What Mimvo finds in LangChain and LangGraph#
Thirteen finding codes across three checks. Each finding comes with a severity, a recommended action, the evidence (secrets masked), fix steps, and an OWASP and CWE mapping. Details are in the finding code reference.
Gate CI on the results#
Fail the job on high-severity findings, send results to GitHub code scanning as SARIF, and put a summary on the run page. See Use in CI for a full GitHub Actions workflow.
mimvo scan langchain \ --factory myapp.memory:store \ --namespace memories \ --fail-on high \ --sarif mimvo.sarif \ --markdown "$GITHUB_STEP_SUMMARY"Is it safe to run against production LangChain and LangGraph?#
Lists and fetches documents or items. Never adds, updates, or deletes.
The default detectors run on your machine with no API key and no model download, so memory text does not leave it. Secret values are masked in every report. Hosted detectors are opt-in.
Try it without connecting anything