Why vetting models before running them on Ollama matters
Vetting means a repeatable intake gate that every model must pass before any weights reach a serving host. For a regulated team, the question is not whether Ollama can run a model, because it will run almost anything it is pointed at. The question is who decided that a given set of weights, from a given source, under a given license, was allowed onto a server that other people use. Ollama is an MIT-licensed open source runtime, and the license covers the runtime itself. It does not tell you whether a model's weights, its license terms or its file format are acceptable for your organization. Those checks belong to your intake process.
The risk is sharper because the local Ollama API at port 11434 does not require authentication. Anyone who can reach that endpoint can ask the server to use whatever models it already holds, and the model files themselves are the upstream input that the server loads and executes. A model file that carries unsafe code or an unapproved license does not need a vulnerability in Ollama to cause harm. Models are stored in the documented directories (~/.ollama/models on macOS, /usr/share/ollama/.ollama/models on Linux and the .ollama\models folder on Windows), and the OLLAMA_MODELS variable can move that storage elsewhere. Wherever the files land, the intake record should name the storage path on each host so that an unvetted copy cannot sit unnoticed in a default location.
You need a documented intake process when the Ollama server is shared by more than one team, when it sits inside a boundary that auditors or internal risk teams review, or when any prompt or document it handles falls under data protection rules. In those settings, a model that was pulled informally by one engineer becomes an organizational decision the moment others depend on it. Confirm with your compliance and security leads which model sources, license types and file formats they will accept before the first pull, and write those answers down as the gate criteria. Also confirm who is authorized to approve a model, who can copy weights into the model directory and how a rejected model is recorded. These are decisions your organization owns. Ollama does not make them for you, and no single tool settles them.
How to run a model intake process step by step
This sequence turns an informal model download into a reviewed, approved and recorded decision, so every model running on a shared Ollama host can be traced back to its source, license, scan result and approver.
Open and assign the intake request
The requester describes the model, the intended use case, the data it will touch and the team that will run it. A named owner accepts the request and records the model name, upstream publisher, and the intended Ollama host or hosts. The check: an intake ticket exists with a named owner, a stated use case and a data classification, and no one has pulled the model onto a shared host before this point.
Verify the publisher, repository and checksum
The reviewer confirms that the model comes from the publisher the requester named, using the repository page, the publisher's own account and any published checksum or hash. Where a checksum is published, the reviewer computes the same hash on the downloaded files and compares them. Where no checksum is published, the record says so and the file hashes are captured as the baseline for later comparison. The check: a dated record of the source URL, publisher identity, and matching or baseline hashes.
Review the license and usage terms
Legal or compliance reviews the model license and any acceptable use policy attached to the weights, separately from the MIT license that covers Ollama itself. The reviewer notes restrictions on commercial use, redistribution, derivative models and regulated sectors, and checks whether the Modelfile LICENSE line carries the full terms into the local model definition. The check: an approved license entry with the terms summarized, a reviewer name, and a decision on whether the use case is permitted.
Add the model to the approved-weights list
Once the source and license pass, the model and its exact file hashes are added to the approved-weights list that the platform team maintains. Only listed artifacts may be imported into the Ollama model store for production use. Changing a model version, quantization or file requires a new entry. The check: the list shows the model name, version, hashes, license reference, approver and date, and the artifact in the staging area matches an entry.
Scan the model files with ModelScan before loading
Before any framework or Ollama loads the files, the platform team runs ModelScan against the downloaded weights. ModelScan is an Apache-2.0 project from Protect AI that reads model files byte by byte looking for unsafe code signatures, so embedded code is not executed during the scan. Its README recommends scanning before loading pre-trained models, and a scan takes about as long as reading the file from disk. Findings are ranked CRITICAL, HIGH, MEDIUM or LOW, and the CLI returns nonzero exit codes, so the scan can gate a pipeline. Confirm that your file formats are covered, since ModelScan supports PyTorch Pickle, TensorFlow SavedModel and Protocol Buffer, Keras H5 and V3, and classic Pickle, Cloudpickle, Dill and Joblib formats. The check: a saved scan report with the ModelScan version, a zero-finding or accepted-finding result, and the report linked to the intake ticket. Scanning does not prove a model is safe, so it is one control among several.
Import into a staging Ollama host
The approved files are imported into a staging Ollama host that is not connected to production users. The Modelfile is written with the LICENSE line and a reference to the approved entry, and the model is created with
ollama create. The staging host should have cloud features disabled and network egress limited, so the import cannot pull anything unplanned. The reviewer then runs a fixed set of prompts to confirm the model loads and responds as the approved record describes. The check: the model appears in the staging model list, its digest or hash is recorded, and the test outputs are saved with the intake ticket.Obtain sign-off and promote to production
The owner, security reviewer and the team responsible for the target host review the complete intake file: request, source evidence, license decision, scan report, staging test results and the approved-weights entry. Each approver signs the decision in the ticketing or change system. Only then is the same artifact promoted to production hosts, and the import is repeated from the verified files rather than copied from staging without comparison. The check: signed approvals from each role and a production hash that matches the approved entry.
Record which model version runs where
The platform team keeps a register of every model version on every Ollama host, including the model name, hash, approval reference, host, date loaded and date removed. The register is reviewed whenever a host is added, a model is updated or a finding is reported against a model. Retesting after a model change is handled by the red teaming process, and any change to weights, quantization or Modelfile starts a new intake. The check: a current register that matches what each host reports when asked for its installed models, with no model on a host that lacks an approved entry.
What model file scanning catches and what it misses
A file scanner is useful for one class of risk: unsafe code hidden in serialized model files. It says nothing about license terms, provenance, or weights that are malicious in other ways, so treat it as one control inside a wider intake process.
What ModelScan is
ModelScan is an Apache-2.0 open-source project from Protect AI that scans machine learning model files for unsafe code embedded through model serialization attacks. It reads files byte by byte looking for unsafe code signatures instead of loading them, so embedded code never runs. Confirm the license and README on the project repository before adding it to your approved tooling list.
ModelScan repositoryFormats it covers
The scanner targets PyTorch Pickle files, TensorFlow SavedModel and Protocol Buffer files, Keras H5 and Keras V3 files, and classic ML formats saved with Pickle, Cloudpickle, Dill and Joblib. Inventory the formats your approved model sources actually deliver. Any format outside this list needs a separate review step, and GGUF weights pulled for Ollama should be confirmed against the current README before you rely on a scan.
Severity ranking and CI exit codes
Findings are ranked CRITICAL, HIGH, MEDIUM or LOW, so intake reviewers can decide which findings block import and which are recorded for follow-up. The command-line tool returns nonzero exit codes on findings, and a Python API is available for pipelines. Set the gate in your CI job so a failing scan stops the import, and keep the report with the model record.
What the scan does not prove
Hugging Face states that its pickle import scan is not foolproof, and its documentation says the same about its ClamAV and pickle checks. A clean scan shows that known unsafe patterns were not found in the formats checked. It does not show that the weights are free of backdoors, that the training data was clean, or that the file matches the publisher's release. Record the clean result as one input, not as approval.
Hugging Face pickle scanningVersion and Python support
ModelScan 0.8.8 was released on February 18, 2026, and supports Python 3.10 up to but not including 3.13. Pin the version and Python runtime in the intake pipeline so results are reproducible, and record both in the scan log. Confirm current support against the releases page before each upgrade, since newer versions may change format coverage or Python support.
ModelScan releasesChoosing how approved weights enter the server
Pulling from the public Ollama library is the simplest path, but it gives the server a live connection to an external registry every time a model is fetched. The reviewer has to decide which library entries are acceptable, which tags are allowed and whether the pulled digest matches the one that was approved. Provenance evidence is mostly the library listing, the publisher's model card and the digest recorded at review time, so the review record is only as strong as the digest comparison you perform.
- Provenance evidence: the library name, the tag, the published digest and the model card, saved with the approval record.
- Reviewer effort: moderate per model, with repeat review each time a tag changes upstream.
- Server reach: outbound HTTPS to the Ollama registry during pulls only, ideally through an egress proxy that allows the approved hosts.
- Storage: models land in the default directory or the one set with
OLLAMA_MODELS, so set that path on a volume your intake process controls. - Cloud access: pulling does not cover cloud models, which are a separate path. Check that
OLLAMA_NO_CLOUDis set or that cloud access is controlled.
Confirm with your team how pulls are restricted at the network layer and whether the approved digest is checked after every pull.
Importing locally supplied weights through a Modelfile lets a team bring in fine-tuned or vendor-supplied weights that never passed through the public library. The Modelfile is the record of what was built, so it should name the weights source, the base and any LICENSE text that travels with the model. Provenance depends on the team that produced the weights, which makes the upstream chain of custody the main review question.
- Provenance evidence: the source of the weight files, their checksums, the Modelfile and the license text embedded through a
LICENSEline. - Reviewer effort: higher, because the reviewer must trace the weights back to their origin and scan the files before import.
- Server reach: usually none for the weights themselves, since the files are copied in from an approved transfer, but the server may still pull a base model it references.
- Scanning: run a serialization scanner such as ModelScan on pickle-based formats before the import step.
- Storage: imported blobs go into the
OLLAMA_MODELSdirectory, so restrict write access to the intake account.
Confirm that every imported model carries a complete LICENSE line and that the Modelfile is stored under version control with the approval record.
An internal mirror holds approved artifacts in a store your organization controls, and the Ollama server pulls only from that store. This separates the review step from the serving step: approvers work against a fixed set of artifacts, and the serving hosts never reach the public internet. The cost is that someone must run the mirror, keep it synchronized with approvals and handle access to it.
- Provenance evidence: a signed record of each approved artifact, its digest and the reviewer who approved it, held in the mirror's own catalog.
- Reviewer effort: front-loaded, because review happens once per artifact before it enters the mirror rather than on every pull.
- Server reach: only the internal mirror host, which keeps egress for serving hosts closed.
- Operations: someone must own mirror availability, access control and removal of revoked models.
- Cloud access: the mirror does not stop cloud model calls, so keep cloud features disabled on serving hosts.
Confirm how your chosen mirror technology can present approved artifacts to Ollama, since the exact integration depends on your environment and should be tested before you rely on it.
Intake controls and when each fits
This table compares six intake controls for models entering an Ollama server, with what each one proves, when it fits and what it leaves open. No single control is enough on its own, so read the last column as the gap the next control must close.
| Control | What it proves | When it fits | What it does not prove |
|---|---|---|---|
| Source allowlist | The weights came from a publisher or repository your team has approved | Any team that needs a short list of acceptable origins before anyone pulls a model | That the file itself is safe, complete or unchanged after upload |
| License record in Modelfile LICENSE lines | The license terms that apply to the model are written into the model definition Ollama builds | Teams that must show which license governs each model version in use | That the license is compatible with your use, or that the publisher holds the rights it claims |
| File scan gate | The model files were read for unsafe serialized code, such as embedded code in pickle-based formats, before loading | Pickle-based and other serialized weight formats that could carry executable content | That the file is free of threats a scanner does not recognize, or that its training data or behavior is acceptable |
| Checksum or hash record | The exact bytes you reviewed are the bytes you later load, so later changes can be detected | Any shared server where a model is approved once and must stay identical afterward | That the approved bytes were trustworthy when first downloaded |
| Staging host | The model runs and is tested on an isolated server before it reaches the shared production endpoint | Teams that need functional and red team testing before approval, and separate change control | That production hosts hold the same model, configuration or version unless you check them |
| Version register | Which model name, tag, digest and license record run on which server and since when | Multi-server environments and audits that ask what was running on a given date | That the register matches reality unless it is checked against the server itself on a schedule |
How a model moves from source to approved server
A candidate model starts outside the trust boundary on a public source, where its source and license are checked before anything is downloaded. Weights then pass a malicious-code scan gate; files that fail are quarantined and never reach staging. Files that pass are imported into a staging host, approved by a named owner, and only then loaded onto the production Ollama host, where the version is recorded in a register. Check each hand-off, because the scan is one control among several, not a guarantee.
Model intake path from public source to production, with the scan gate and version register.
Recording which model versions run where
A model approval is only useful if the register shows exactly what is running on each server. Each entry should record the model name, the tag or digest, the source it was imported from, its license, the scan result from the intake step, the approver, the date of approval and the target hosts. The tag alone is not enough, because a tag can be repointed to different weights over time. Record the digest for every approved model and treat a change in digest as a new approval, even when the name and tag look the same. Keep the Modelfile with each entry, including its LICENSE lines, so the license obligations travel with the weights.
Ollama itself changes often, and the register should track the runtime version on each host as well as the models. The public release history shows the cadence: v0.40.5 was released on 14 October 2026 and v0.40.6 was published as a pre-release on 16 October 2026. Pin the server version in your deployment records, test a new release on a non-production host, and record the outcome before rolling it out. Confirm with the Ollama GitHub releases page which versions are pre-releases before you allow them into any shared environment.
To check what is loaded on each server, query the API for its installed models and compare the result against the register, recording the digests rather than only the names. Models are stored in the directory set by OLLAMA_MODELS on Linux, so a compare can also be run against the file store on each host. Schedule this comparison and alert when a host reports a model or digest that has no approved entry, or when a register entry has no matching host. That drift check is what catches an unapproved pull, a silent tag change or a host that was rebuilt from an old image.
Security and operational risks in model intake
Model intake fails in a few predictable places: the server is reachable by people who should not reach it, models arrive from sources nobody checked, and the files are never inspected. The cards below pair each risk with the control that closes it, so the intake process can be reviewed step by step.
Unauthenticated API beyond localhost
Ollama's local API at port 11434 does not require authentication. It binds to 127.0.0.1 by default, but changing OLLAMA_HOST to a wider address exposes every model pull, delete and inference call to anyone who can reach that address. Before changing the bind address, confirm that a reverse proxy or gateway with authentication sits in front of the server, and that a firewall limits which hosts can connect. The bind address is the control to check first.
Ollama FAQPulls from unvetted sources
A model pulled straight from a public registry is only as trustworthy as its publisher and its upload history. Intake should record the exact model name, tag, digest and publisher for each model, and approve only sources on a written list. Teams should not pull directly on production hosts. Pulls should happen on a staging host, and the approved artifact should then move to serving hosts.
Model files that are not scanned
Pickle-based weight files can run code when they are loaded, so a file that looks like a normal model can carry an unsafe payload. A scanner such as ModelScan reads the file's bytes for unsafe code signatures without loading it. Scan every weight file before import and fail the intake when a finding of HIGH or CRITICAL appears. Treat a clean scan as one control among several, since no scanner catches everything.
License drift after updates
A model's license can change between versions, and a Modelfile that carried a LICENSE line for the original terms may no longer match the weights now deployed. Each update should trigger a fresh license check against the approved list, and the LICENSE text should be stored with the model record. Confirm terms for commercial use, redistribution and acceptable use before any new version goes live.
Missing records during incidents
When an output is questioned or a model is suspected, teams need to know which exact weights were running, where, and since when. Without a register of model names, digests, hosts and approval dates, responders must reconstruct this from memory. Keep one record per host that lists each loaded model, its approval reference and the change that introduced it, and review it against the server's logs.
Cloud features sending requests outside
Cloud models and web search send requests to Ollama's hosted services rather than staying on the host. Requests leave the environment unless the feature is disabled. Set OLLAMA_NO_CLOUD=1 or the equivalent server configuration on every host that handles regulated data, and confirm the setting appears in the startup logs. Test the change by checking that outbound connections from the host do not go to cloud endpoints.
Ollama FAQQuestions buyers ask about model vetting on Ollama
Does model vetting cost anything beyond staff time?
Ollama itself carries no license fee for running models on your own hardware. The Ollama GitHub repository lists the runtime under the MIT license, and the Ollama pricing page states that running models on your own hardware is always unlimited. The real cost of intake is people and tooling: security or ML staff who review sources and licenses, the time to run file scans, storage for an approved-model store, and the record-keeping process. Paid Ollama plans cover hosted cloud models and do not change this intake work. If you engage a partner, the quote should itemize review hours, tooling setup, documentation and any retest, and state which parts are one-time and which recur when new model versions arrive.
How long does a model intake process take to set up, and what drives it?
Duration depends on how many model sources you use, how many license reviews your legal team must complete, and whether a scanning step already exists in your pipeline. A single approved source with a standard license is much faster to set up than a catalog of community weights with mixed terms. Other drivers include how many file formats you import, whether scans run in CI or by hand, how approvals are routed, and how well your change control already tracks software. Ask any partner for a written timeline that lists each intake stage, who signs off on each one, and what you must supply before work starts.
What does our team have to provide before intake can start?
Plan to supply a list of the model sources you will allow, the people who approve license terms and risk, a target Ollama host or hosts, and the storage location for approved weights. Your security team should name the scanning tools they accept and the rules for blocking or escalating findings. You also need a decision on who may pull models and who may create custom Modelfiles. Without these inputs, intake stalls at the first license question. Request a quote that lists these prerequisites so both sides agree on who owns each one.
Can our own team run model intake in-house?
Yes, many teams can, provided they have someone who understands model file formats, a reviewer who can read model licenses, and an engineer who can wire scanning into a pipeline. The ModelScan README recommends scanning before loading pre-trained models, after training and before deployment, so the process needs to cover those points. In-house teams usually struggle with keeping the approved list current, recording which version runs on which host, and rerunning checks after an update. A partner can help design the process, build the pipeline and hand over a runbook, while your team keeps ownership of approvals.
Does scanning a model file prove that the model is safe?
No. A scan shows that a file does not contain the unsafe code signatures the scanner knows about. ModelScan reads model files byte by byte rather than loading them, and it covers formats such as PyTorch Pickle, Keras H5 and several classic Pickle-based formats. Hugging Face describes its own pickle import scan as not foolproof. Scanning therefore reduces one class of serialization risk, but it says nothing about training data, backdoors in weights or the behavior of the model. Pair scanning with source verification, license review, an allowlist of approved weights and behavioral testing before rollout.
What should a consultant deliver for model vetting on Ollama?
A well-scoped engagement should deliver a written intake procedure, a source and license checklist, a documented approval workflow, and a scanning step wired into the path where approved weights are imported. It should also produce a register that records each approved model, its version, source, license terms, scan result and the Ollama hosts where it runs. Expect a handover with a runbook and a retest plan for when models or scanner versions change. DeployOpen plans, implements and documents self-hosted platforms in your own infrastructure and prepares evidence for compliance assessments, but it does not issue audit reports or certifications. Ask for these deliverables to be named in the written scope.
How do we check a model's license before a Modelfile references it?
Start by recording the license text that ships with the weights, not only the name on the model page, and have legal review any terms that restrict commercial use, redistribution or specific users. A Modelfile can carry a LICENSE line, so the approved license text should be stored with the model record and checked when the Modelfile is built. Confirm the terms with the model publisher or your legal team, because licenses vary and this guide does not interpret any particular one. Re-review the license whenever the model version changes.
What to confirm in your environment before relying on this process
Before you rely on this intake process, confirm that the scanner fits your toolchain. ModelScan's README describes support for the model formats it covers, but the current release's supported Python versions are a separate question. The 0.8.8 release, dated February 18, 2026, supports Python 3.10 up to but not including 3.13, so check the scanner's ModelScan releases page against the interpreter your intake pipeline actually runs. Also confirm which formats your approved list contains. If your list includes formats outside the families ModelScan covers, such as other serialization types or custom loaders, the scan will not tell you anything about those files, and the process needs a second control or a documented exception.
Next, decide whether the open-source scanner meets your policy or whether you need a commercial option. Protect AI describes Guardian as its enterprise product with newer scanners, broader model support and enforcement for Hugging Face models. Ask whether your policy requires vendor support, centrally managed enforcement or coverage beyond what ModelScan's README lists. Record the decision and its reasons, because an assessor will ask why a given scanner was chosen. Also confirm what Hugging Face's own pickle scan covers for the repositories you pull from, and note that its documentation says the scan is not foolproof.
Finally, verify license terms with the people who can answer them. Ollama's MIT license covers the runtime, but each model carries its own terms from the publisher, and those terms can restrict commercial use, redistribution or use in regulated settings. Confirm these with your legal team and the publisher, and copy the license text into your intake record. This process produces evidence for internal reviewers and external assessors, but DeployOpen does not issue audit reports, attestations or certifications. Your independent auditor or certification body decides whether the evidence meets the standard you are assessed against, so agree that question with them before you finalize the process.
How DeployOpen builds model intake for regulated teams
DeployOpen plans, builds and hands over a model intake process for Ollama inside your own infrastructure, so your security and compliance teams can review each model before it reaches a shared server. The work covers source and license checks, file scanning, controlled import of approved weights and a record of which model versions run where.
How we scope
- Agree in writing which model sources, licenses and file types the intake process must accept or reject.
- Define who approves a model, what evidence each approval needs and which Ollama servers are in scope.
- Fix deliverables and timelines in a fixed-scope agreement before any build work starts, with a quote following from that scope.
How we build
- Set up a staging host with no inference traffic where weights are downloaded, scanned and checked before import.
- Wire ModelScan into the intake pipeline so scans run before any file is loaded, with findings gating the import step.
- Build Modelfile templates with LICENSE lines and a registry record that ties each model name to its hash and approval.
How we hand over
- Deliver the intake runbook, approval checklist and scan configuration written for your compliance and security reviewers.
- Walk your platform and security teams through a test import of an approved model and a rejected one.
- Provide the model inventory template and the version record format so audits can trace what runs on each server.
How we support
- Retest the intake pipeline after ModelScan, Ollama or your approval rules change, within the agreed scope.
- Offer ongoing support, upgrades and continuous testing as a retainer if your team wants DeployOpen to keep the process current.
- Confirm with your own environment and vendors which scanner versions and Python runtimes your intake hosts can support before rollout.

