The claims pre-assessment agent at Swartberg Health Administrators, a fictional South African medical scheme administrator, passed its penetration test in October. The web front end was hardened, the API required authentication and the testers found nothing above medium severity. Two weeks later, an architect preparing the production change asked four questions nobody could answer. Which repository did the open-weight classification model come from, and has anyone checked that the file is the one its publisher released? Which version of the MCP server package does the agent load at start-up? What can the agent's container reach on the internet? And what happens when a scanned referral letter contains text written to look like an instruction?
The penetration test covered the application. The questions covered the supply chain and the runtime around it. Production AI security has to cover both, because an AI service is assembled from more moving parts than an ordinary application: data, models, prompts, retrieval indexes, tool servers, packages, containers and the runtime that holds them together.
This part does not repeat CloudNala's leak map. Where enterprise AI leaks data traces twelve surfaces where data escapes and names an owner for each. The AI Software Supply Chain covers dependency incidents, AI bills of materials and containment in depth. This part puts the controls in lifecycle order, so an engineering team can see what to apply at each stage and what evidence to keep.
Model output and retrieved content are untrusted input
Start with the guardrail that changes the most designs. In ordinary applications, data from your own database is usually trusted. In AI applications, two things that look internal are not.
Retrieved content. A referral letter, an email or a web page in the index can contain text that reads like an instruction. OWASP's LLM01:2025 Prompt Injection covers both direct injection by a user and indirect injection through content the model processes. The content came through your pipeline, but someone outside your organisation may have written it.
Model output. OWASP's LLM05:2025 Improper Output Handling advises teams to "treat the model as any other user, adopting a zero-trust approach", and to validate and encode model output before it reaches other systems. Output that becomes a database query, a rendered link, a file path or a tool argument must be checked for its destination, the same as a form field.
Tool descriptions. The MCP specification (version 2026-07-28, checked on 18 November 2026) says descriptions of tool behaviour should be treated as untrusted unless they come from a trusted server.
At Swartberg, this rule means the agent may read the referral letter, summarise it and propose a pre-assessment, but the claims application validates every field the agent proposes, and nothing in the letter can change which tools the agent may call.
Six control domains across one lifecycle
The six domains follow the order in which an AI service is assembled and run. Each domain has its own threats and its own evidence.
| Domain | Lifecycle stage | Threats to plan for | Primary controls | Evidence to keep |
|---|---|---|---|---|
| Data | Source and prepare | Poisoned or unlicensed training, tuning or retrieval data | Approved sources, lineage, classification, permissions carried into the index | Source register, rights record, ingestion log |
| Model | Select and tune | Tampered weights, unknown origin, unsafe file formats, malicious adapters | Download from approved registries, verify signature and digest, pin versions, evaluate before use | Model record with hash, source, licence and evaluation result |
| Supply chain | Build | Compromised packages, build steps or base images | Pinned dependencies, scanning, isolated builds, signed provenance | Software bill of materials (SBOM), AI bill of materials, provenance attestation |
| LLM application | Release | Prompt injection, system prompt leakage, improper output handling | Untrusted-input handling, output validation, no secrets in prompts | Injection test results, output validation tests |
| Agent and tools | Act | Excessive agency, tool misuse, privilege abuse | Least privilege, sandboxing, approval for consequential actions | Tool contracts, permission tests, approval log |
| Runtime | Operate | Data exfiltration, secret theft, cost runaway | Egress allow-list, short-lived secrets, budgets, kill switch | Egress logs, budget alerts, kill-switch test record |
The threat names map to public lists. The OWASP Top 10 for LLM Applications 2025 includes supply chain (LLM03), data and model poisoning (LLM04), system prompt leakage (LLM07) and vector and embedding weaknesses (LLM08). For agents, OWASP's GenAI Security Project published the Top 10 for Agentic Applications for 2026 on 9 December 2025, covering risks such as agent goal hijack, tool misuse, identity and privilege abuse, and memory and context poisoning. Use the lists to check coverage, not as the design.
Signed, pinned and recorded: supply-chain controls that produce evidence
A supply-chain control is only useful if a reviewer can check it after the fact. Four controls produce that kind of evidence.
Provenance for what you build. SLSA (Supply-chain Levels for Software Artifacts), at version 1.2 when we checked on 18 November 2026, defines a Build track with levels of increasing assurance that an artefact was not tampered with and can be traced to its source, and a Source track for source control. Build tools increasingly produce the evidence by default. Docker's documentation on build attestations describes provenance and SBOM attestations attached to images, with minimal provenance added by default.
Signatures for what you run. Sigstore lets teams sign container images, binaries and SBOMs with short-lived certificates tied to an identity, and records each signing event in a public transparency log. The deployment pipeline then admits only images whose signature and signer it can verify, referenced by digest rather than by a tag that can move.
Integrity for models. OWASP's LLM03:2025 Supply Chain notes that published models come with no strong provenance assurances and recommends integrity checks with signing and file hashes. The open-source model-transparency project signs a list of model file digests and verifies them before use. Swartberg's rule is simple: no model file is loaded unless its digest matches the model record.
Inventories for what you depend on. An SBOM lists packages. An AI service also depends on models, datasets, prompts, tool servers and external model endpoints. CycloneDX's machine learning bill of materials can describe models and datasets alongside software. CloudNala's an AI bill of materials must include more than packages explains what to record and why. Run dependency scanning against the inventory on every build and on a schedule, because new vulnerabilities are published against components you already run.
MCP servers and agent skills belong in the same inventory. They are executable code with access to your systems, as agent skills and MCP servers are executable dependencies sets out. Swartberg pins its MCP server package by version and digest, and an upgrade goes through the same change process as any other production dependency.
Contain the runtime before something gets through
You cannot guarantee that a compromised package or an injected instruction never reaches production. You can decide in advance how little it could do. CloudNala's containment is an architecture feature covers this for the gateway. For an agent service, five controls do most of the work.
- Least privilege per component. The agent's workload identity can call three application APIs and nothing else. Each tool runs with the narrowest scope that does its job, and user-level permissions are checked by the application, not assumed.
- Sandboxing for generated code and documents. Where an agent runs code or parses untrusted files, do it in an isolated, short-lived environment with no credentials and no network by default.
- Egress allow-lists. List the destinations each component may reach: the gateway, named application APIs, the vector store. Block the rest. In Kubernetes, the NetworkPolicy documentation is explicit that pods are not isolated for egress by default and that a policy has no effect without a network plugin that enforces it. Test the block, do not assume it.
- Secrets outside the prompt. Credentials live in a secrets manager, are short-lived where the platform allows, and are injected into the tool runtime, never into model context.
- Approval for consequence. Actions with financial, clinical or member-visible effect wait for a person. Part 2 shows where the pause sits in the loop.
Which framework to use for what
| Framework | Use it for | It does not give you |
|---|---|---|
| NIST AI Risk Management Framework (1.0, January 2023) and its Generative AI Profile, NIST AI 600-1 (July 2024) | Organisation-wide risk governance: govern, map, measure, manage | Engineering controls or test cases |
| NIST SP 800-218A (July 2024) | Secure development practices for generative AI, extending the Secure Software Development Framework (SSDF) | A ranking of threats |
| OWASP Top 10 lists for LLM and agentic applications | Coverage checks and shared names for threats | An architecture or a control owner |
| SLSA and Sigstore | Build provenance, signing and verification | Coverage of data, prompts or runtime behaviour |
NIST's page notes that AI RMF 1.0 is being revised. Check the current version before you map controls to it formally.
The South African version
This is general information, not legal advice. Section 19 of POPIA requires a responsible party to identify all reasonably foreseeable internal and external risks to personal information, maintain safeguards against them, verify that the safeguards work and update them for new risks. A lifecycle threat-to-control map with evidence is a practical way to show that work for an AI service. For Swartberg the stakes are higher than usual, because health information is special personal information under section 26. Where enterprise AI leaks data covers breach notification under section 22.
The practical constraint is people. Few South African organisations have a dedicated AI security team. Swartberg's security function is four people. They prioritised the controls that produce evidence automatically, such as signed images, pinned dependencies, scheduled scanning and egress logs, and kept manual review for model admission and tool permissions, where judgement matters.
Supply-chain security checklist
- Treat retrieved content, model output and tool descriptions as untrusted input; validate before any system acts.
- Keep a source register for training, tuning and retrieval data, with rights and lineage.
- Admit models only from approved registries, with a verified digest and an evaluation result.
- Pin dependencies, MCP servers and base images by digest; scan on every build and on a schedule.
- Produce provenance and an SBOM for every image; sign images and verify signatures at deployment.
- Keep an AI bill of materials that includes models, prompts, tool servers and external endpoints.
- Give each component its own least-privilege identity; sandbox generated code and untrusted files.
- Enforce and test egress allow-lists.
- Keep secrets out of prompts; use short-lived credentials in the tool runtime.
- Require approval for consequential actions, and test the kill switch.
Scorecard contribution
This part adds evidence to four rows of the Production Readiness Scorecard. States are Swartberg's, illustrative.
| Domain | Evidence from this part | Swartberg state |
|---|---|---|
| Security | Lifecycle threat model, signed images, provenance, egress allow-list, secrets handling | tested |
| Data | Source register with rights and lineage for retrieval and tuning data | hypothesis |
| Model | Model record with digest, source, licence and evaluation; verified at load | tested |
| Agent/tools | Least-privilege tool identities, sandbox for document parsing, approval log | hypothesis |
Previous: Part 5, AI gateways, model routing and integration. Next: Part 7, Deploy and scale AI without confusing the layers. All parts are on the series page.
How CloudNala can help
CloudNala builds lifecycle threat-to-control maps for AI services before they reach production. We trace your data sources, models, packages, tool servers and runtime, map each to the six domains, check which controls exist and which leave evidence, and set up the pipeline steps that produce provenance, signatures and inventories automatically. You leave with a control map your security team can test, a prioritised gap list sized for the people you have, and evidence that holds up in a POPIA security review.
Work with CloudNala
CloudNala helps organisations move from technology ambition to practical execution across cloud, AI, data, platform engineering and digital services.
Whether you are exploring AI, modernising your cloud environment, building a public-sector digital service, or turning an idea into a working MVP, we can help you shape the roadmap and deliver the next step.
Book an AI Supply-Chain Security Review or write to us at consult@cloudnala.co.za
