๐Ÿ›ก๏ธ AIcap Scan your repo free
2026-07-06 ยท AIcap Guides

Scanning container images for hidden model weights

There is a reliable gap in every repository-level AI inventory: the model that isn't in the repository. It was curl-ed in a Dockerfile RUN step, COPY-ed from a build context that never got committed, or baked into a base image by another team a year ago. The repo scan says "scikit-learn, nothing exciting"; the image serving production traffic contains a 7-GB fine-tuned checkpoint nobody inventoried.

If your Annex IV documentation or security review is built purely from source scanning, this gap is where it is wrong.

Why weights end up in layers

Each is a component with provenance, licence, and tampering questions attached, sitting outside the inventory.

Daemonless layer scanning: how it works

You do not need a Docker daemon to inspect an image. An OCI image is a manifest plus a stack of tar-archive layers; a scanner can pull those via the registry API (or read a docker save tarball) and walk every file entry directly. The AIcap implementation:

Using it in CI

Both remote references and local tarballs work, both flags repeatable:

# Scan the repo AND the image it produces
./aicap --cli . --image ghcr.io/your-org/inference:latest

# Or scan the image built earlier in this pipeline, pre-push
docker save your-app:candidate -o candidate.tar
./aicap --cli . --image-tar candidate.tar

Findings merge into the same AI-BOM as the source scan, the compliance posture is re-evaluated with them included, and the Annex IV draft gains a "Container Images Inspected" section listing each image, its digest, layer count, and finding count. Registry auth uses your ambient credentials (the default keychain), so private registries work in CI without extra wiring.

What this closes, concretely

The rule of thumb

Scan what you *ship*, not just what you *write*. Source scanning covers intent; layer scanning covers reality. They take one flag to run together, and the delta between them is precisely the part of your AI supply chain nobody was accountable for.

AIcap generates your AI-BOM, risk register, and Annex IV draft from a single CI run โ€” free CLI, EU-hosted ledger.

Get started free โ†’