Skip to main content
AI provenance is Earnie’s third domain, alongside open source and cryptography. It finds the AI models your project ships and the AI services, SDKs, and dataset-loading libraries your code uses. It’s available where your organisation has AI provenance enabled. When it’s enabled, every scan runs it unless you turn it off: clear AI provenance under Scanners on the New scan page, or leave ai out of --scanners in the Earnie CLI.

Two Kinds of AI Finding

The AI provenance scanner produces two kinds of finding, and you decide each kind with its own decisions: A model finding always needs a decision. An AI-usage finding is inventory until a policy flags it: it stays visible in Review, but it isn’t counted as work. See AI model findings and Inventory in Triaging findings. Most of this page is about model findings.

Identifying a Model File

The scanner treats these files as model weights, instead of skipping them as binaries: .safetensors, .gguf, .bin, .pt, .pth, .pkl, .onnx, .tflite, .mlmodel, .h5, .keras, and .pb. For each one, Earnie matches the file against the SCANOSS model knowledge base. A model finding shows:
  • the Candidate component, a purl that identifies the model
  • Matched by, how Earnie matched it, from Exact file hash down to File name only
  • Confidence, shown as High, Medium, or Low, never as a raw score
  • Related candidates, the known models the match couldn’t fully separate it from, when there are any
  • what the knowledge base records about the model: its Model license, its Lineage (the base models it was derived from), its Datasets (the training datasets the model’s authors declare on its model card, which Earnie records but doesn’t verify), and its Model card

Model Status

Every model file produces a finding, even when Earnie can’t identify it. Its status says what happened: When the matching service doesn’t answer, Earnie can still guess the model from its file name. The status is then Identified, but Matched by reads File name only, there’s no confidence band, and the finding says the identification is a guess from the file name alone. The Require review of unidentified AI models template catches these guesses too. See Starter Templates.
A model that Earnie couldn’t match doesn’t fail the scan, and Earnie counts it as scanned, not skipped. Coverage stays full, and the file still appears as a finding.

The Models Page

A project’s Models page lists every model file the project knows about: the files Earnie found in repository scans and source archives, plus the models you added by upload or from Hugging Face. Under the title, a line reads From the scan the list reflects, the newest completed scan that ran AI provenance, with its commit and when it finished. Export opens the export menu on the AIBOM preset. See In the SBOM. Above the table, two panels count the same models:
  • Identified models says how many are identified, for example “7 of 13”, and lists under it the other states that have a model, such as Low confidence, Not identified, and Failed, each with its count.
  • License category splits the models into Permissive, Copyleft, Use restricted, Non-commercial, Proprietary, and Unknown license (a model with no licence on record). Only identified models have a licence category, so the panel says how many models it covers, and it’s left out when none has one.
The identified count, each state, and each part of the split is a link that opens the table filtered to it, keeping the other filters you’ve set, and the one in force is marked. A model whose files are in more than one state, or that’s identified with low confidence, counts in each of them; a model with files in two licence categories counts in each. Each row shows the model file, how Earnie identified it, its Source (Repository, Source archive, Model upload, or Hugging Face), and its Decision. Search by file name, path, candidate, or licence, and filter by decision, source, identification, or licence category. The filters offer only values that some model carries. The filters and the open model are kept in the page address, so a link shares exactly what you see. Select a model to open it beside the table, or in a panel on the right on a narrower screen. It shows how the model was identified, the match, the evidence, the file, its policy results, and its activity. You don’t decide model findings on this page. The model’s decision appears as read-only text marked Made in Review, and Decide in Review opens the finding in the Review workspace, where you approve, reject, or reopen it. The only action on the list is Delete, for uploaded models. To delete several at once, select their rows and choose Delete. Repository and source archive files have no checkbox, because their repository or archive owns them. While uploads are running or paused, a line above the filters says so, for example “1 upload in progress · 2 paused”. Details opens the Uploads panel with their progress and the paused uploads. When there’s nothing to list, the page says why: No completed scan yet, No models in this project, or, if your organisation doesn’t have AI provenance, “This organization does not run AI model detection.” If the filters match nothing, the page shows Nothing matches these filters and offers Clear filters.

Uploading a Model

Some models your organisation uses don’t live in a scanned repository. You can add one from a project’s Models page. Select Add model, then choose the source:
  • Upload a file. Upload one model file, or a Hugging Face snapshot as a .tar, .tar.gz, or .tgz archive, so you don’t have to upload each file of a model by hand. If your connection drops or the page closes, choose the same file again and Earnie resumes the upload from where it stopped.
  • From Hugging Face. Identify a model from its Hugging Face repository, without uploading anything.
To upload from a script or a pipeline instead, use earnie model scan <file>. It resumes an interrupted upload the same way and waits for the result. See Scanning an AI Model in the Earnie CLI. The upload limit is the model size cap, which is 3 GB unless your Earnie deployment sets another. Earnie checks the size before the upload starts, and refuses a larger file with a note that fingerprinting larger models where they live isn’t available yet. Each uploaded model gets its own scan. Earnie identifies the model, looks up its licence and lineage, and evaluates the project’s model policies against it. You triage the finding like any other, and an identified model goes into the SBOM. The model appears on the Models page, linked to the scan that identified it. To delete it later, open it and choose Delete upload, or select its row and choose Delete.
Earnie doesn’t keep the weights. It deletes an uploaded file once its scan ends, whatever the outcome. It keeps the file’s SHA-256 hash, so it can recognise the same file if you upload it again.
When you delete a model from the Models page, Earnie removes the model and any weights still stored. Its findings are marked resolved and keep their triage, so uploading the same file again reopens them.

Gated Hugging Face models

Some Hugging Face repositories are gated: an account must accept the model’s terms, as for Llama, before Hugging Face shows the hashes of its files. Without them, a gated model you add from Hugging Face is Declared, not verified. An administrator can set your organisation’s own Hugging Face read token under Settings → Integrations, in the Hugging Face token section. Earnie stores it encrypted, never shows it again, and sends it to huggingface.co only when it reads a model’s information and file list. A gated model whose terms that account accepted is then identified by its file hashes like any public one. SCANOSS never supplies a token and never accepts a model’s terms for you.
  • Test token asks Hugging Face which account the token acts for: Valid, Refused, or Unreachable. It can’t tell which models the account accepted.
  • Replace token and Remove change or delete it. Setting and removing it are recorded in the audit log, without the token.
  • A token never makes adding a model worse. If Hugging Face refuses it, Earnie reads the repository again without it.
  • Models you added before the token was set keep their result until you add them again.

Git LFS Models

A repository that keeps its models in Git LFS commits only pointers. By default, an AI provenance scan reports each one as Git LFS pointer and can’t fingerprint it. To fetch the models instead, an Operator or Admin turns on Fetch Git LFS models in the AI provenance section of the project’s Scan Configuration. After that, a repository scan that runs AI provenance downloads each model a pointer refers to, up to the model size cap, and identifies it like a committed file. To decide for one scan only, use Download Git LFS models on the New scan page. Fetching works only on scans of a Git repository. If a model fails to fetch, Earnie leaves it as a pointer and the scan continues.
Off by default. Fetching an LFS object counts against the repository owner’s Git LFS bandwidth quota, so Earnie fetches only for projects that opt in.

Writing Policies Against AI Findings

Every finding carries an AI Provenance field group, finding.ai. Its AI Finding Kind field, finding.ai.kind, tells a model finding (model) from an AI-usage finding (usage). On a finding that a field doesn’t apply to, such as an open-source match, the field is empty, so a rule that reads it evaluates to false instead of raising an error. These are the model fields most policies need: An AI-usage finding has its own fields instead, such as AI Detection Type (finding.ai.detection_type), AI Vendor (finding.ai.vendor), AI SDK (finding.ai.sdk), and AI Provider (finding.ai.provider). They identify what the code uses and who provides it. A dataset finding (AI Detection Type dataset) means Python code loads data with Hugging Face datasets, PyTorch, or TensorFlow. Dataset Source (finding.ai.dataset_source) names that library as huggingface, pytorch, or tensorflow. The finding doesn’t name the dataset the code loads. The Sentence builder offers no negation on AI fields, because “AI SDK is not openai” would also match every finding that isn’t an AI usage. AI Vendor is the exception. It also offers is not and is not one of, so you can keep a list of approved vendors. Put a negated vendor condition next to AI Finding Kind is usage and AI Vendor is not empty, as the Enforce approved AI vendors template does. Without them, the rule also matches every finding that names no vendor.

Licences across a model’s lineage

Whoever fine-tunes, quantizes, merges, distils or adapts a model can’t relicense the model it started from. A fine-tune published under MIT over a Llama 3.1 base is still bound by the Llama 3.1 licence. Earnie walks a model’s lineage up to five levels and compares each ancestor’s licence category with the model’s own, from least to most restrictive: Permissive, Copyleft, Use restricted, Non-commercial, Proprietary. Copyleft is the exception: its share-alike terms require a derivative to keep a copyleft licence, so a copyleft ancestor conflicts with every other category, the more restrictive ones too. Every parent of a merged model counts. AI Model Lineage License Status is one of:
  • conflict: an ancestor’s licence is in a more restrictive category than the model’s own, or is copyleft while the model’s own isn’t. Follow that ancestor’s terms, not the model’s. A licence in the same category isn’t a conflict, so MIT over Apache-2.0 isn’t flagged.
  • consistent: every ancestor’s licence is known and none is more restrictive.
  • unverified: an ancestor’s licence is unknown, or the knowledge base has no record of it, and no known ancestor conflicts. The model’s own licence may also be unknown.
  • not_derived: the knowledge base records no base model.
Earnie fetches the ancestors when it scans the model, so a model scanned before this comparison existed reads unverified until you scan it again.
An AI policy needs the AI provenance scanner to have run. If a scan skipped it, Earnie reports the policy as Not evaluated, never as a pass.

Starter Templates

Earnie has eight built-in AI templates. Add them from the template picker on a project’s Policies page, like any other template. See Starting from templates. The CRA — Annex I Part II(1) regulatory template set adds the unidentified-model and restricted-licence templates in one action. It works the same way as the cryptography regulatory template sets. See Setting policies for how templates, the rule builder, and template sets work in general.

In the SBOM

Earnie exports each identified model as a CycloneDX machine-learning-model component, with its purl, SHA-256 hash, licence, lineage, and model card. The lineage lists every model it derives from, up to five levels, as pedigree ancestors, each with its own licence where the knowledge base records one. Models that aren’t identified aren’t exported. SPDX can’t describe AI models, so they appear only in the CycloneDX document. To include models, choose AIBOM in the New export sheet, or turn on AI models under Customize contents. See Exporting SBOMs.

Reporting on AI Provenance

Two views summarise what the AI provenance scanner found:
  • For one project, the Dashboard’s AI provenance tab has five panels: AI usage, Models, AI vendors, Model licenses, and AI trend. See The AI provenance tab.
  • Across every project, the Exposure section on All projects has an AI usages to review panel with the open AI usages across the scope over the period. See Exposure.
If the scanner has never run, both views say Not scanned, never zero. If it ran and found nothing, they say Clean.

AI Findings on Pull Requests

Earnie reports AI provenance findings at Info severity. On a pull request, inline comments start at Medium severity by default, so Earnie doesn’t post inline comments for AI findings that no policy flagged. A finding that a policy flagged still gets a comment. See Inline comments on the changed lines.

What’s Next

You triage, review, and gate an AI finding the same way as an open-source or cryptography finding. See Triaging findings for what happens after Earnie finds one.