AI security checklist: how I protect customer data in AI agents and apps

By Muhammad Sohaib Khan, Certified Senior AI & Software Architect7 min read

The short answer

Secure AI development means a threat model before code, customer data kept in your own cloud region and never used for training, prompt-injection and output controls from the OWASP LLM Top 10, least-privilege allow-listed tools, audit logs with human approval for sensitive actions, and documentation that supports GDPR, PIPEDA, CCPA and Australian Privacy Act obligations.

Why security is the first question, not the last

In every market I work with outside Pakistan, the first serious conversation is about data. A clinic in Manchester wants to know where patient notes go. A Toronto fintech asks whether the model trains on their transactions. A Sydney trades business asks who can see customer phone numbers. They are right to ask, and an AI vendor who cannot answer in plain language should not be building their system.

This article is the answer I give. It is also the checklist I build against, so if you are evaluating anyone, including me, use it.

The checklist

ControlWhat it means in practiceWhy it matters
Threat model before codeA data-flow diagram showing every place personal data moves, and the attacks considered at each stepMost breaches are design flaws, not clever hacks
Data residencyDatabases, vector stores and logs live in your cloud region: US, Canada, UK, EU or AustraliaResidency is a legal question in most of these markets, not a preference
No training on your dataModel APIs used under terms that exclude training; enterprise or zero-retention endpoints where offeredYour contracts and customer records must not improve someone else's model
EncryptionTLS in transit, encryption at rest, secrets in a managed vault, never in code or the browserTable stakes, and the first thing an audit checks
Prompt-injection defenceUntrusted content (emails, documents, web pages) is separated from instructions, and model output never runs as code or commandsThe top risk in the OWASP LLM list; it turns a helpful agent into an attacker's tool
Least-privilege toolsEach agent gets an allow-list of actions with the minimum scope: read this calendar, not every calendarAn agent cannot leak or delete what it cannot reach
Human approval for sensitive actionsPayments, deletions, sending to new recipients and anything irreversible wait for a personExcessive agency is how small errors become expensive ones
Output validationStructured output checked against a schema; grounding checks drop unsupported claimsStops the model inventing a refund policy or a medical dose
Audit logsEvery input, retrieved document, tool call and output is logged with who and whenYou can answer a regulator, a customer or your own board
Rate limits and abuse controlsPer-user and per-IP limits, bot detection, cost capsModel denial of service is a real bill, not a theory
Supply chainPinned dependencies, reviewed MCP servers and plugins, no unvetted model downloadsA compromised library runs with your permissions
Handover documentationArchitecture, data map, processing records and runbooks in your repositoryYour compliance team can evidence GDPR, PIPEDA, CCPA or Privacy Act obligations without me
A padlock resting on a keyboard lit in red and green

What the regulations actually ask for

  • GDPR and UK GDPR (EU and UK): lawful basis, data minimisation, records of processing, data subject rights, and transfers only with safeguards. Residency in EU or UK regions removes most transfer questions.
  • PIPEDA (Canada): meaningful consent, limiting collection and use, safeguards proportional to sensitivity, and openness about practices. Provincial laws such as Quebec's Law 25 add stricter rules.
  • CCPA and CPRA (California) and the growing set of US state laws: notice, opt-out of sale or sharing, and reasonable security. Sector rules such as HIPAA apply on top for health data.
  • Australian Privacy Act and the Australian Privacy Principles: collection only when necessary, security of personal information, and notifiable data breaches.
  • None of these certify a vendor. They place obligations on your organisation. The engineer's job is to build and document the system so that meeting them is straightforward.

What I will not do

  • Paste your customer data into a consumer chatbot to 'test something quickly'.
  • Give an agent a master API key because scoping one takes an afternoon.
  • Claim a certification I do not hold. SOC 2 and ISO 27001 are programmes your organisation runs; I build so that you can pass them.
  • Ship an AI feature that cannot show which document its answer came from.

A build that shows the pattern

The AI Compliance Monitoring Hub in my portfolio is a regulatory intelligence workspace with auto-generated audit trails, AI policy checks and proactive risk alerts. The design is the checklist above in software form: every AI judgement is logged with its evidence, policy checks run before an action completes, and a person is alerted rather than bypassed when risk rises. The same pattern underlies the fraud detection and document intelligence systems I have shipped.

How to use this before you hire

  • Send the table to any vendor you are considering and ask them to mark each row done, planned or not applicable, with one sentence of evidence.
  • Ask where your data will physically live and who at the vendor can read it. Expect a specific answer.
  • Ask what happens when the model is wrong, and what happens when someone tries to trick it. Both will happen.
  • Start with a discovery call and a threat model. It is the cheapest security work you will ever buy, and it decides everything after it.

Related reading

Sources

  1. OWASP Top 10 for Large Language Model Applications
  2. NIST AI Risk Management Framework
  3. UK ICO guidance on AI and data protection
  4. Office of the Privacy Commissioner of Canada: PIPEDA
  5. OAIC: Australian Privacy Principles

Related service

Secure AI Development & Data Protection

Security is the first question a buyer in New York, London, Toronto, Berlin or Sydney asks, and it should be. Sohaib designs AI agents, chatbots, SaaS platforms and integrations with data protection built in: your data stays in your cloud region, is never used to train a model, and every action an agent can take is allow-listed, logged and reversible.