Local AI Safety Audit

Run the check-up yourself

This takes about ten minutes. You don’t need to know how to program. You’ll download one folder, type one line, and read the answers.

What the check-up does: it looks at the six weak spots described in the article on your own computer, and tells you in plain words whether any of them needs attention.

What it never does:

You can read every line of it on GitHub.


Step 1: Get Python (one time only)

The check-up is written in Python, a free program many tools use.

Step 2: Download the check-up

  1. Open github.com/MohanVishe/template-drift-audit.
  2. Click the green Code button, then Download ZIP.
  3. Find the ZIP in your Downloads folder and unzip it:
    • Windows: right-click it and choose Extract All.
    • Mac: double-click it.

You now have a folder called template-drift-audit-main.

Step 3: Open a terminal in that folder

A terminal is a window where you type commands.

Step 4: Start your AI app

If you use Ollama or LM Studio, open it now. The check-up can only see a server that’s running.

Step 5: Run the check-up

Type this line and press Enter.

Windows:

python -m tda check

Mac and Linux:

python3 -m tda check

On Windows, if a Microsoft Store window opens instead, Python isn’t installed yet. Go back to Step 1 and make sure you ticked Add python.exe to PATH.

Also check the folder your AI helper works in

AI coding helpers and agents read the folder you point them at. To check that folder, add --folder and the folder’s location in quotes:

python -m tda check --folder "C:\Users\you\Documents\my-project"

On a Mac, the location looks like "/Users/you/Documents/my-project". Use python3 instead of python.

Tip: you don’t have to type the location. Type everything up to and including --folder , then drag the folder into the terminal window.

If you leave out --folder, the check-up skips this part and says so.

Example: what the check-up printsProduced by the real check-up code for a made-up computer that has Ollama open to its network, an old version, and a .env file in the project folder.
Local AI safety check-up (read-only: nothing was changed or sent anywhere) [!!] A local AI server is reachable from other devices It accepts connections from other devices, not only from this computer. Anyone on the same Wi-Fi, and possibly the internet, may be able to use it. Ollama has no password of its own. - Ollama (port 11434) What to do: Set OLLAMA_HOST to 127.0.0.1 (or remove the setting) and restart Ollama. In LM Studio, turn off "Serve on Local Network". If another device really needs it, put a login in front of it rather than leaving the port open. [!!] Ollama 0.15.2 is missing published security fixes These problems are fixed in newer releases: - a crafted model upload can leak memory: CVE-2026-7482, fixed in 0.17.1 - Windows auto-updater accepts unchecked updates: CVE-2026-42248 / CVE-2026-42249, fixed in 0.23.3 What to do: Update Ollama from ollama.com. [!!] 1 of 2 models comes from outside Ollama's library A model file can be published by anyone. Models from people you don't know deserve more care, especially if you let them use tools. - Hugging Face: someone: hf.co/someone/Some-Model-GGUF:Q4_K_M - Ollama library: qwen2.5:7b What to do: Prefer the model maker's own release, or Ollama's library, for anything that can run commands or read files. [OK] No warning signs in the chat templates of 2 models This looks for web addresses and for rules that react to particular words. It does not prove a template is safe. [!!] 1 secret-looking file in my-project An AI helper that works in this folder can read these files. If the model makes a mistake, or is misled by something it reads, it could send them somewhere. (Only the names were checked; the files were not opened.) - .env What to do: Move keys and passwords out of the folders you let an AI helper work in, or give the helper a separate folder with copies of only what it needs. [--] Your conversations are kept in 1 place on this computer These are ordinary files. Anyone who can use your account, and any backup or sync tool that copies your user folder, can read them. (Only names and sizes were checked.) - Ollama terminal history (the last 100 lines typed into `ollama run`): ~\.ollama\history (2.2 KB) What to do: Delete chats you no longer need from inside the app. To stop Ollama keeping terminal history, set OLLAMA_NOHISTORY to 1. 4 things to look at.

Reading the answers

Each answer starts with a mark:

[OK]All good.
[!!]Worth fixing. The line underneath says why, and What to do says how.
[--]For information, or couldn't check. For example, your AI app wasn't open, or you didn't give a folder.

Here’s what each check means, and what to do if it shows [!!]:

“A local AI server is reachable from other devices” or “OLLAMA_HOST lets other devices connect”

Your AI app answers other devices, not just this computer, or it will the next time it starts. Ollama has no login, so anyone who can reach it can chat with your models, add new ones or delete them.

Fix (Ollama on Windows): open the Start menu, type “environment variables” and choose Edit environment variables for your account. Find OLLAMA_HOST in the list and click Delete, or change its value to 127.0.0.1. Click OK, then quit Ollama from the system tray (the small icons by the clock) and open it again.

Fix (Ollama on Mac or Linux): OLLAMA_HOST is usually set in a startup file or a service setting, wherever the guide you followed told you to put it. Remove that line, then restart Ollama.

Fix (LM Studio): in the server settings, turn off Serve on Local Network.

Really need it on another device? Ask someone technical to put a login in front of it. Don’t leave the port open.

“Ollama … is missing published security fixes”

Your version has known security problems that newer versions fix. The message lists which ones.

Fix: download the latest Ollama from ollama.com and install it over the old one. Your models stay where they are.

“… models come from outside Ollama’s library”

Anyone can upload a model to Hugging Face, and the uploader decides what instructions travel with it. That matters most when the model can use tools: run commands, read files or browse.

Fix: for anything that uses tools, prefer the model maker’s official release or Ollama’s own library.

“… model templates have something worth a look”

Every model file carries a small set of instructions called a chat template. It decides exactly what text the model reads. The check looks for two unusual things in it:

Both could let a template behave differently from what you expect. This doesn’t prove the model is bad. It means a person should look.

For a sense of how often it happens: I ran this same check over 95 different templates from popular models. It flagged 3. All three turned out to be ordinary, visible features, such as typing a special word to switch the model’s “thinking” mode on or off. So expect this message to be rare, and expect most cases to be harmless once someone reads them.

Fix: if you didn’t expect it, remove the model (ollama rm <name>) and get it from the maker’s official source.

“… secret-looking files in …”

Files such as .env, id_rsa or *.pem usually hold passwords and keys. An AI helper working in that folder can read them.

Fix: move them out of the folders you let an AI helper work in, or give the helper its own folder with only what it needs.

“Ollama is set to save a copy of every request”

A debugging setting called OLLAMA_DEBUG_LOG_REQUESTS is switched on. While it’s on, Ollama writes the full text of every chat request to a folder in your temp folder.

Fix: delete the setting the same way as OLLAMA_HOST above, quit and reopen Ollama, then delete the folders whose names start with ollama-request-logs- in your temp folder. (On Windows, type %TEMP% in the File Explorer address bar to open it.)

“Your conversations are kept in … places”

This one is marked [--], because it’s information, not a fault. It lists where your chats are saved and how big those files are. Anyone who uses your account, and any backup or sync tool, can read them.

What you can do: delete old chats you don’t need from inside the app. To stop Ollama keeping a history of what you type in a terminal, add a setting called OLLAMA_NOHISTORY with the value 1. On Windows, use the same Edit environment variables for your account window and click New.

“No folder given, so no folder was checked for secrets”

You ran the check-up without --folder. Run it again as shown in Step 5 to check the folder your AI helper uses.


Want to go deeper?

The check-up is the quick version. The same project also measures something harder to see: whether the prompt Ollama gives a model is the prompt its maker designed. That part needs a few more tools and is described in How it works.