How to keep an EU-sovereign AI coding stack from installing risky packages
You chose Mistral on purpose. Maybe your data is not allowed to leave the EU; maybe procurement required a European provider; maybe you simply did not want your code and your prompts sitting on American servers. Whatever the reason, you made a deliberate decision about sovereignty — about where your AI lives and who can see what it processes.
Then that same assistant runs pip install for you, and the decision quietly stops counting. The packages it
installs are unvetted, the versions might be hours old, and in a regulated environment an unscreened dependency is
not only a security risk — it is an audit finding waiting to happen. You held the AI to a high standard and left the
pipeline feeding it wide open.
mistral-code-cve-gate closes that gap on the same terms you picked Mistral for. It intercepts every install a Mistral-powered coding tool runs, checks it locally — no third-party service in the loop — and keeps an auditable record of every decision.
The problem, in plain terms
Two things make this sharper for a Mistral user than for most. First, sovereignty is only as strong as its weakest link: an AI you host carefully is undermined the moment its install step reaches out to some scanning service elsewhere, or pulls in code that nobody checked. Second, if you work in finance, healthcare or government, “nobody here really knows what the assistant installed” is exactly the kind of sentence that becomes a finding at audit time.
Who runs into this
European teams under NIS2 or DORA, anyone processing personal data under GDPR Article 32, and any organisation that deliberately picked an EU AI provider and now needs the rest of the toolchain to hold the same line.
What mistral-code-cve-gate does — and how it works
The same gate, kept local and sovereign
It intercepts every install the assistant attempts — pip, npm, composer, cargo, go, gem, brew — resolves the full transitive dependency tree, and checks each package against NIST NVD, OSV.dev and the GitHub Advisory Database, with a freshness hold for new pip and npm releases. The check runs on your machine; no dependency list is handed to an outside SaaS. (It shares its engine and configuration with claude-code-cve-gate.)
An auditable record for compliance
Every check emits a structured JSON record on stdout, covering the top-level package and its resolved transitive dependencies — the documentary evidence that NIS2 (supply-chain risk management), DORA (ICT risk) and GDPR Article 32 (secure development practices) expect you to be able to produce.
Install & use it
git clone https://github.com/sharkyger/mistral-code-cve-gate.git
cd mistral-code-cve-gate && bash install.sh
install.sh registers the PreToolUse hook. After that every install your Mistral coding tool attempts is screened
automatically. Full configuration and source are on GitHub:
github.com/sharkyger/mistral-code-cve-gate (MIT).
FAQ
Why a separate gate for Mistral coding tools?
If you chose Mistral for EU data sovereignty, your install pipeline should match that standard. mistral-code-cve-gate runs the check locally, with no third-party SaaS in the loop, so your dependency vetting stays on the same sovereign footing as the AI itself.
Does it produce an audit record?
Yes. Every package check emits an auditable JSON record on stdout, covering the top-level package and its resolved transitive dependencies — the kind of evidence NIS2, DORA and GDPR Article 32 expect for secure development.
Is this an official Mistral tool?
No. mistral-code-cve-gate is an independent, third-party tool and is not affiliated with Mistral. It hooks into the assistant’s PreToolUse extension point.
mistral-code-cve-gate is one of the 5bats supply-chain gates. For a Claude Code stack, claude-code-cve-gate does the same job; for installs you run yourself there are gates for Python, PHP and Homebrew.
