
Most "AI security" you can buy is theater. A vendor wraps a managed LLM in a friendly UI, slaps a "SOC 2 compliant" badge on the marketing page, and tells you the model is safe because they signed a Business Associate Agreement. The auditor shows up six months later and asks where the threat model is, who reviewed the prompt-injection mitigations, and how you log every PHI exposure to the model. The vendor has none of those answers, and the answers are now your problem.
Real AI security is not a wrapper. It is a software development lifecycle with security controls baked into every phase — data ingestion, model selection, prompt design, output validation, inference logging, and red-team testing. It is the same SDLC discipline you would apply to any other regulated software, with additional controls specific to language models and agent systems. NIST AI RMF and the OWASP LLM Top 10 are the foundational references; the implementation is custom to your environment.
At Autom8ion Lab, we build the secure AI development lifecycle inside HIPAA, CMMC, and SOC 2 environments. The pattern is the same one we ship across our cybersecurity engineering and custom LLM systems work. It is the operational answer to the question every CISO is now being asked: "are we shipping AI safely or are we one prompt-injection away from a breach disclosure?"
If your AI security story starts with "the vendor handles it," your AI security story is wrong. The vendor handles the model. You handle every other layer between the model and the user — and that is where the breaches happen.
Why "AI security" wrappers fail audits
The wrapper pattern looks like security and is not. A managed LLM behind a chat UI with a BAA on the API gives you exactly one control: the model provider promises not to train on your data. That is one control out of dozens an auditor will ask about.
The questions that fail wrapper-only deployments at audit time:
- Where is the threat model for your AI workflow? What attack surfaces did you identify and which mitigations did you build for which?
- How is sensitive data classified before it reaches the model? Which fields are masked, redacted, tokenized, or kept entirely out of the inference path?
- What prompt-injection mitigations are in place? Have they been red-team tested? When?
- How is model output validated before it acts on a system of record? What happens when the validator catches a violation?
- Where is the inference log? Per-call, per-user, with the prompt and output retained for the regulated retention window? Searchable on demand for an OCR review or a SOC 2 Type II evidence pull?
- Who has reviewed the model deployment, prompt design, and integration code? When was the last security review? Where is the documentation?
None of these are answered by the vendor's SOC 2 report. They are answered by your SDLC. If you do not have one for your AI workloads, you are running an unaudited system in a regulated environment.
The seven-phase secure AI SDLC
Our secure AI SDLC is structured around seven phases. Each phase has explicit deliverables that map to NIST AI RMF functions (Govern, Map, Measure, Manage) and specific OWASP LLM Top 10 (2024 release) mitigations. The phases run sequentially for new builds and continuously for production systems.
-
Phase 1 — Threat modeling
Before a single line of code, we map the data flows, the trust boundaries, and the attack surfaces. We use STRIDE adapted for LLM workloads: prompt injection, training-data poisoning, sensitive-information disclosure, model denial of service, supply chain (model provider compromise), insecure output handling, and excessive agency. The output is a threat model document that the security team reviews and signs.
-
Phase 2 — Data classification and ingestion controls
Every input to the model is classified — public, internal, confidential, regulated (PHI, PCI, CUI). The ingestion layer enforces masking, redaction, or hard exclusion based on classification. PHI never reaches a model unless the model is BAA-covered and the workflow has explicit authorization. Audit logs capture every classification decision.
-
Phase 3 — Model selection and isolation
Model selection is a security decision, not just a quality decision. Regulated workloads route to private deployments inside the customer VPC or to BAA-backed managed APIs with zero-retention terms. Lower-classification workloads can route to managed APIs without VPC isolation. The routing is enforced in code, not in a runbook.
-
Phase 4 — Prompt design and injection mitigation
Prompts are reviewed like code. Indirect prompt-injection attack vectors (untrusted content reaching the model) are identified and mitigated through input scrubbing, output validation, and tool-use scoping. Where the model has tool access, the tools are scoped to the minimum necessary, and the agent operates under explicit allow-lists, not deny-lists.
-
Phase 5 — Output validation and policy enforcement
Every model output that touches a system of record passes through a validator. Schema validation catches structural failures. Policy validation catches content failures (PII leakage, unauthorized actions, out-of-scope responses). Validators are independent of the model and run on every call.
-
Phase 6 — Audit logging and evidence
Every inference is logged: timestamp, user, classification, prompt, output, model version, validator results, downstream actions. Logs are immutable, retained for the regulated window (7 years for HIPAA, 6 for SOC 2 evidence), and queryable on demand. This is the evidence that survives the audit.
-
Phase 7 — Red-team testing and continuous review
Before go-live and on a recurring cadence, the system is red-team tested against the OWASP LLM Top 10 and the threat model. Findings flow into a remediation queue. The threat model is reviewed at every major change. Security is not a phase; it is a continuous obligation.
Skipping phase 1 (threat modeling) is the most common mistake we see. Teams that skip it discover the threats during incident response instead of during design. That trade is much, much more expensive.
NIST AI RMF and the OWASP LLM Top 10 in plain English
The two foundational frameworks for AI security in 2026 are NIST AI RMF (Risk Management Framework, AI 100-1) and the OWASP LLM Top 10 (2024 release). Auditors expect to see them named in your documentation. Implementers need to translate them from frameworks into controls.
NIST AI RMF organizes around four functions:
- Govern — your organization has explicit policies, accountabilities, and review cadences for AI systems
- Map — every AI system in scope is inventoried, classified by risk, and tied to a threat model
- Measure — you have telemetry on model performance, drift, error rates, and security events
- Manage — you have processes for prioritizing, mitigating, and tracking risks identified through the other three functions
The OWASP LLM Top 10 (2024) catalogs the most common LLM application vulnerabilities. The list anchors the threat model from phase 1. We build mitigations against each item explicitly:
The full list (LLM01 through LLM10) is referenced in the OWASP project documentation. The auditor will not ask you to recite them — they will ask which ones you have controls for and where the evidence is. That is a much harder question to answer if the controls are implicit.
Inference logging: the control that decides every audit
If we had to pick one control that separates audit-survivable AI from audit-failing AI, it would be inference logging. The logging requirement sounds boring. The implementation is where most teams get it wrong.
Adequate inference logging captures every model call with enough fidelity to answer an auditor's questions in seconds, not weeks. Specifically:
- Per-call — every inference is a row in the log, not aggregated
- User-attributable — the authenticated user (or system service account) is recorded for every call
- Prompt and output — the full prompt sent to the model and the full output returned, with PII redacted at log-write time per the data-classification policy
- Model and version — exactly which model and version handled the call; vendors update silently
- Validator results — the schema and policy validator outcomes, including any failures and the remediation path
- Downstream actions — what the system did with the model output (write to record, alert human, drop)
- Immutable retention — append-only, with retention matched to the regulated window for the data classification
This is the same logging discipline we apply to our broader API integration work. The difference for AI workloads is the volume — a moderately busy AI system can produce millions of inference logs a month, and the log infrastructure has to handle that without becoming a cost center that gets quietly downgraded to "30-day retention" by ops.
How the secure SDLC compares to the alternatives
Most teams considering this work are choosing between three postures: a real secure SDLC, an ad-hoc deploy with security as an afterthought, or trusting a vendor's "AI-safety" wrapper.
| Posture | Secure AI SDLC | Ad-hoc deploy | Vendor "AI-safety" wrapper |
|---|---|---|---|
| Threat model | Documented per workflow, reviewed at every change | None or implicit | Vendor's — you cannot inspect or modify it |
| Inference logging | Per-call, user-attributable, immutable, regulated retention | Whatever the framework defaults give you | Vendor logs, often 30-day retention, not exportable |
| Audit defensibility | Survives SOC 2 Type II, HIPAA, CMMC reviews | Fails on first deep question | Survives marketing review, fails on deep technical review |
| Cost | 4-8 week build for first system, lower marginal cost after | Cheap until the breach | Subscription cost; security debt grows under the surface |
| Best for | Regulated workloads, sensitive data, audit scope | Internal-only, non-sensitive prototypes | Low-risk customer-facing chat with marketing-grade compliance |
The wrapper has a real fit — low-risk consumer-facing chat where the security failures are reputational rather than regulatory. The wrapper is not a fit for HIPAA, CMMC, or SOC 2 Type II scope. Buying a wrapper for a regulated workload is buying a future enforcement action.
The 4-8 week build for your first secure AI system
The secure SDLC is not a six-month consulting engagement. The first regulated AI workload takes 4-8 weeks depending on data sensitivity and integration depth. Subsequent workloads on the same architecture are much faster because the foundational controls are reusable.
-
Weeks 1-2 — Govern and Map
Policy document, AI inventory, threat model, data-classification scheme. The paperwork that auditors actually read. Done first because it gates every other phase.
-
Weeks 3-5 — Build with controls baked in
Ingestion layer with classification enforcement, model routing with private deployments, prompt design with injection mitigations, validator with policy enforcement, inference logging with immutable retention.
-
Weeks 6-7 — Red-team and remediate
Internal red-team against OWASP LLM Top 10. External red-team if compliance scope requires it. Findings remediated and re-tested.
-
Week 8 — Documentation and handoff
Evidence package, runbooks, on-call playbooks, ongoing review cadence. The system is auditable on day one of production, not retrofitted six months later.
The auditor does not care how good your model is. They care whether you can prove the model did what you say it did.
Where this connects to the rest of the security program
The secure AI SDLC is one component of the broader security program. It connects to the audit-readiness work covered in our companion piece on Cybersecurity Audit Readiness for AI-Driven Workflows, and to the broader liability framework in Plug-and-Play AI Liability. The same controls support HIPAA, SOC 2, and CMMC scope; the differences are in evidence packaging, not in the underlying engineering.
If you are running AI in a regulated environment without an SDLC, the question is not whether you will fail an audit. The question is when, and how expensive the remediation will be. Building the SDLC before the audit is much cheaper than building it during one.
An AI system without a documented SDLC is an unaudited system. If it is processing regulated data, it is a future finding. The build to fix that is measured in weeks, not quarters.
Stop hoping the vendor handles it
The vendor handles the model. You handle the workflow. The breach happens at the workflow boundary — the prompt that exfiltrated the PHI, the output that triggered the wrong tool, the log that did not exist when the OCR investigator asked for it. The vendor is not going to write your evidence package, and the auditor is not going to accept "the vendor said so" as a control.
We build the SDLC that closes the gap. We have shipped this pattern inside HIPAA-covered healthcare environments, CMMC-scoped federal contractor environments, and SOC 2 Type II SaaS environments. The patterns transfer; the evidence packaging is domain-specific.
Ready to put a real SDLC behind your AI workloads? Schedule a consultation with our security engineering team. We will scope the threat model and the build for your first regulated workload. Or browse our broader cybersecurity engineering work to see how the AI SDLC fits into the larger program.
Keep reading
Cybersecurity Audit Readiness for AI-Driven Workflows
AI workflows are the new audit weak point. Generic chatbots can't answer what auditors actually ask: who accessed this PHI, who triggered this action, where's the evidence. Here is the audit-readiness architecture we engineer for SOC 2, HIPAA, and CMMC.
11 min readNIST 800-171 Compliance for Defense Contractors: The 7 Controls Everyone Fails First
You can have policies, security software, and a completed compliance spreadsheet and still fail a NIST 800-171 assessment. The reason is simple. Assessors do not grade your intentions. They grade whether your controls work across the systems that process.
8 min readWorkflow Automation for Compliance Teams: Turning Audit Season From a Fire Drill Into a Dashboard
Audit season exposes every broken process in your compliance program. Your team searches across inboxes, ticketing systems, cloud consoles, spreadsheets, shared drives, and security tools. Someone asks for access review evidence. Nobody knows who owns it. A.
7 min readReady to Transform Your Business with AI Automation?
Let's discuss how custom automation solutions can deliver measurable results for your specific business needs.
Schedule a Consultation