- Purpose: Trusted artifact manifest and read-only model store
- Port: 8470
- Language: Go
- Systemd unit: secure-ai-registry.service
The Registry is the single source of truth for which models are available for inference. Only models that have passed the full quarantine pipeline can be promoted into the registry. Once promoted, models are served read-only to the inference worker.
List all registered artifacts.
Response: 200 OK
[
{
"name": "mistral-7b-instruct-v0.3.Q4_K_M",
"path": "/var/lib/secure-ai/registry/mistral-7b-instruct-v0.3.Q4_K_M.gguf",
"sha256": "abc123...",
"format": "gguf",
"source": "huggingface",
"status": "promoted",
"promoted_at": "2026-03-06T12:00:00Z",
"gguf_guard_fingerprint": "def456...",
"gguf_guard_manifest": { ... }
}
]Get a single artifact by name.
Response: 200 OK with artifact JSON, or 404 Not Found.
Return the resolved filesystem path for a registered model.
Promote a quarantined artifact to the registry. Called by the quarantine pipeline after all stages pass.
Request body:
{
"name": "mistral-7b-instruct-v0.3.Q4_K_M",
"filename": "mistral-7b-instruct-v0.3.Q4_K_M.gguf",
"sha256": "abc123...",
"size_bytes": 4567890123,
"source": "huggingface",
"scanner_versions": {
"modelscan": "0.8.8"
}
}Auth: service bearer token. Response: 201 Created on success, 400 Bad Request if validation fails.
Remove an artifact from the registry.
Auth: service bearer token. Response: 200 OK on success, 404 Not Found if not registered.
Recompute one model's SHA-256 hash and compare it with the manifest.
Verify SHA-256 integrity for all registered artifacts.
Verify the gguf-guard per-tensor manifest for one GGUF artifact.
Response: 200 OK with verification results.
The Artifact struct represents a registered model:
| Field | Type | Description |
|---|---|---|
name |
string | Human-readable model name |
path |
string | Absolute filesystem path to the model file |
sha256 |
string | SHA-256 hash of the model file at promotion time |
format |
string | File format (gguf, safetensors, etc.) |
source |
string | Origin (huggingface, local, etc.) |
status |
string | Current status (promoted, quarantined) |
promoted_at |
timestamp | When the model was promoted |
gguf_guard_fingerprint |
string | Structural fingerprint from gguf-guard (GGUF only) |
gguf_guard_manifest |
object | Per-tensor manifest from gguf-guard (GGUF only) |
The registry persists its state to a JSON manifest file:
/var/lib/secure-ai/registry/manifest.json
This file is read on startup and written on every promote/delete operation. It is the authoritative record of all trusted models.
A systemd timer runs every 15 minutes to verify the SHA-256 hash of every registered model file against the value stored in the manifest. If a mismatch is detected:
- The affected model is moved to quarantine status.
- An alert is logged to the audit log.
- The model becomes unavailable for inference until re-verified.
This detects both accidental corruption and tampering.
The registry service runs with hardened systemd settings:
ProtectSystem=strict-- read-only root filesystemProtectHome=yes-- no access to home directoriesPrivateTmp=yes-- isolated /tmpNoNewPrivileges=yes-- cannot gain new privilegesReadWritePaths=/var/lib/secure-ai/registry-- only writable path