TKOResearch
Menu
Back to insights
AI Agent SecuritySecurity DiligenceBuild guide

How to Build AI Agents That Pass Enterprise Security Review

How engineering and product teams can prepare AI agents for enterprise security review, production launch, customer diligence, and governance scrutiny.

By Kevin O'Connor

Published Last reviewed 10 min read

A security reviewer needs to follow a customer request from authentication to the data returned and any action taken. If the engineering team can only show the chat transcript, much of that path is missing.

I would build the review packet while building the agent: the data-flow diagram beside the retrieval code, the permission matrix beside the tool registry, and the failure tests beside the release checks. Reconstructing all three during procurement is avoidable work.

This guide covers preparation. Passing a buyer's review depends on that buyer's requirements, the proposed use, and the tested implementation; no checklist guarantees acceptance.

Enterprise AI Security Review Is About Trust Boundaries

An enterprise security reviewer is not evaluating your demo. They are evaluating risk.

They care about:

  • Data exposure.
  • Tenant isolation.
  • Identity and authorization.
  • Prompt injection.
  • RAG leakage.
  • Tool abuse.
  • Excessive autonomy.
  • Logging and auditability.
  • Response planning.
  • Vendor governance.
  • Secure development practices.
  • Legal, privacy, and procurement risk.

NIST's Generative AI Profile is intended to help organizations identify unique generative AI risks and align risk-management actions with their goals and priorities.

Treat deployment and operations as part of the application boundary: include the people and services that can change credentials, inspect logs, disable tools or restore queued work.

1. Build An Architecture Diagram Reviewers Can Understand

An unclear architecture makes even a narrow review difficult. Show the actual runtime and configuration, including paths that bypass the main orchestrator.

You need a diagram showing:

User / tenant
  -> application frontend
  -> backend orchestrator
  -> model provider / model gateway
  -> RAG / knowledge layer
  -> tools / MCP servers / APIs
  -> SaaS systems / databases / workflow engines
  -> logging / monitoring / audit store

For each component, define:

FieldExample
OwnerProduct engineering, platform, security, vendor.
Data handledPrompt, retrieved document, customer record, token.
Trust levelTrusted internal, customer-controlled, public, untrusted.
AuthenticationUser OAuth, service account, API key, workload identity.
AuthorizationTenant ACL, RBAC, ABAC, policy engine.
LoggingPrompt trace, retrieval trace, tool-call trace, output trace.

A reviewer should not have to infer where the model sits, where data goes, or what tools are reachable.

2. Treat Prompts As Untrusted Input

Explain prompt injection through the inputs and permissions in your own workflow.

Your review packet should explain how you handle:

Prompt SourceRisk
User inputDirect prompt injection.
Retrieved documentsIndirect prompt injection.
Tool outputTool-response injection.
WebpagesHidden or adversarial content.
Emails/ticketsAttacker-controlled instructions.
MemoryPersistent manipulation.

The right answer is not that the system prompt tells the model to ignore malicious instructions.

A better answer is that user-provided and retrieved content is classified as untrusted, instruction hierarchy is preserved, authorization is enforced server-side, tool parameters are validated outside the model, and known prompt-injection scenarios are regression-tested.

3. Enforce Authorization Before Context Enters The Model

Enterprise buyers care deeply about whether one customer can see another customer's data.

For RAG and document workflows, you need to show that authorization happens before the model sees content.

Bad answer:

The model is instructed not to reveal unauthorized data.

Good answer:

Retrieval is constrained server-side by tenant, user, role, source, classification, and document-level ACLs before any content enters the model context.

Show:

ArtifactWhy It Helps
RAG data-flow diagramShows where authorization happens.
Retrieval policy summaryExplains tenant/role/document filtering.
Negative test casesShows cross-tenant queries fail.
Source attributionShows answers map to authorized sources.
Logging fieldsShows retrieval can be reconstructed.

4. Classify Tools By Business Impact

If your agent can use tools, enterprise reviewers will ask what those tools can do.

Tool inventory is mandatory.

ToolAction TypeData TouchedRiskControl
search_docsReadInternal docsMediumTenant/role filtering.
create_ticketWriteSupport workflowMediumUser attribution.
send_emailExternal sendEmail contentHighDraft-first approval.
update_customerWriteCustomer recordHighUser-scoped auth + confirmation.
run_queryQueryDatabaseHighRead-only, parameterized, logged.
deploy_changeDeployProductionCriticalDisabled or manual approval.

Enterprise-safe design usually means read tools are separated from write tools, destructive tools are disabled by default, high-impact actions require approval, broad service credentials are avoided, parameters are validated before execution, and tool-call traces are preserved.

5. Do Not Let The Model Authorize Itself

The model can request an action. The backend should authorize it.

DecisionShould The Model Decide?Better Control
Is the user allowed to see this document?NoServer-side ACL check.
Can this tool be called?NoPolicy engine / allowlist.
Is this action destructive?NoAction classification.
Should this email be sent externally?NoDraft-first + human approval.
Can this query run?NoParameterized query + DB permissions.
Can this file be deleted?NoExplicit approval or deny.

Show the enforcing code and a denied request for each boundary. A policy description is much easier to assess when it points to an implementation and a current test.

6. Design For Auditability

Enterprise security review is partly about what happens when something goes wrong.

You need to show that the system records enough artifacts to support response, customer review, abuse review, legal/compliance review, internal debugging, and security regression testing.

Minimum agent trace fields:

FieldPurpose
User IDWho initiated the workflow.
Tenant IDWhich boundary applied.
Session IDCorrelates interaction.
Prompt reference, digest and retention policyA digest verifies retained content; an authorized content store is needed for reconstruction.
Retrieved source IDsShows what entered context.
Tool nameShows which action was requested.
Tool parametersShows what the model proposed.
Authorization resultShows policy decision.
Approval eventShows human confirmation.
External action resultShows downstream impact.
Model/provider metadataSupports debugging and reproducibility.
Trace IDConnects all events.

7. Create A Real AI Response Plan

Enterprise reviewers may ask what happens if the agent leaks data, sends the wrong message, modifies a record, or is manipulated into unsafe behavior.

Have a plan.

Event TypeResponse Requirement
Prompt injection successPreserve trace, disable affected workflow, patch controls, regression test.
RAG leakageIdentify source documents, affected users, exposed output, access-control failure.
Tool misuseRevoke token, disable tool, review approval/policy logic.
Memory poisoningQuarantine memory, inspect scope, delete poisoned state.
Cost/loop eventRate-limit, kill workflow, inspect retry/autonomy logic.
External communication errorIdentify recipients, preserve content, initiate customer/legal process.

You do not need a 50-page AI response plan. You need a credible, tested one.

8. Prepare A Security-Review Packet Before It Is Requested

A strong enterprise AI security packet should include:

ArtifactPurpose
AI system overviewExplains what the agent does and does not do.
Architecture diagramShows components, trust boundaries, and data flows.
Data inventoryLists data classes handled by the system.
RAG authorization summaryShows retrieval controls and tenant isolation.
Tool inventory matrixShows agent capabilities and action controls.
Prompt-injection control summaryExplains boundaries and tests.
Logging/audit summaryShows artifact trail and retention.
Response summaryExplains containment and escalation.
Secure SDLC summaryShows how AI-related changes are reviewed.
Known limitationsBuilds trust by being explicit.

NIST SP 800-218A extends secure software development practices for generative AI and dual-use foundation models across the lifecycle and is intended for AI model producers, AI system producers, and acquirers.

9. Have A Clear Answer For Customer Data Use

This question will come up.

Your answer should clearly cover:

TopicWhat To Explain
Model providerWhich provider or model class is used.
Data retentionWhether prompts/outputs are retained.
Training useWhether customer data trains models.
Fine-tuningWhether any customer-specific tuning occurs.
LogsWhat is logged and for how long.
RedactionHow sensitive data is filtered or protected.
SubprocessorsWhich vendors touch customer data.
Contract controlsDPA, security terms, enterprise settings.

Do not hand-wave. Procurement and legal teams will not accept a provider name as a complete answer.

10. Show That You Can Say No To The Agent

A trustworthy agent system has hard stops.

Hard StopWhy It Matters
Tool disable switchRapid containment.
Per-tenant feature flagsLimit rollout and exposure.
High-risk action denialPrevent destructive autonomy.
Rate limitsPrevent cost and loop failures.
Retrieval deny rulesPrevent sensitive source exposure.
Human approval gatesPrevent external or irreversible action.
Memory reset/quarantineContain persistence failures.
Provider failover policyPrevent uncontrolled degradation.

Test these stops under the normal operator role. Record what remains in flight, which queues need draining, and who takes over work after disablement.

Enterprise AI Agent Readiness Checklist

These are proposed criteria to adapt with the buyer, not completed checks for your product. Attach a dated artifact and owner to each row.

Area to verifyProposed acceptance criterion
Architecture diagram exists and is currentNo open gap.
Data flows are documentedNo open gap.
Tenant isolation is enforced server-sideNo open gap.
RAG retrieval is authorization-awareNo open gap.
Prompt injection has negative testsNo open gap.
Tool inventory is completeNo open gap.
Destructive actions are gatedNo open gap.
Credentials are scoped and attributableNo open gap.
Logs preserve prompt/retrieval/tool/approval eventsNo open gap.
AI response plan existsNo open gap.
Customer data training/retention answer is clearNo open gap.
Known limitations are documentedNo open gap.
Go/No-Go launch decision is documentedNo open gap.

Keep the packet tied to the release

Record the commit, deployed configuration, model identifier, tool schemas, retrieval policy version, and test date. List unresolved gaps in the same packet as passing results. Reviewers should not have to discover that a claimed control exists only in a planned release.

The next useful step is a walkthrough with someone who did not build the agent. Have them trace one permitted action and one denied action from the user to the downstream result. Where they lose the thread, improve the implementation or its supporting artifacts.

Sources