Consider this scenario: you’re testing out a new AI-powered customer support assistant that can read through documents that you upload and draft responses that you can review and send to your customer. Cool! It worked! Great demo! But…
can it access other customer’s documents? Uh oh, now we’re getting to the interesting bits.
If you’ve ever wondered what sort of things a small AI application security review would actually look at, here are a couple things you could explore (using a staging environment populated with made up customers and documents so that you’re not poking around real customer data or sending them emails!)
Establish scope
This is just a general security review best practice but make sure you have explicit agreement on what’s in-scope before you get started. What version of the application, in what environment, with what user accounts, is it ok for you to perform what actions?
Think about what you’re trying to protect
In our customer support assistant example, you might consider protected assets to be: customer’s uploaded documents, credentials, AI inference costs… The generated support response draft itself might also be a protected asset, as you don’t want to accidentally draft a support response packed full of another customer’s confidential information, even if the response is otherwise reasonable and helpful!
Map out the happy path
Document the expected flow of information and control in the application. In our example, the happy path might be something like:
Customer uploads a document
Application fetches relevant information
AI model reads relevant information
AI model generates a draft support response
AI model requests that application perform an action (if your assistant has “tools” it can invoke)
Application performs action
Highlight trust boundaries
As you’re mapping out the happy path, note where information crosses trust boundaries. In our example, when a document is uploaded, it’s now evidence that can be referenced by the AI model when performing its task, but it shouldn’t grant the uploader any special permissions or privileges in the application. Similarly, a request from an AI model for the application to invoke a “tool” isn’t consent or permission for the application to invoke that tool. These are just a couple examples of trust boundaries, there can be many others depending on the application under test.
Carefully try some unexciting things
Attempt to fetch another customer’s document.
With this customer support assistant example, let’s say you have two accounts, each with a different (made up!) uploaded document. While authenticated as customer A, attempt to fetch customer B’s document through some application feature (staying within scope of course!). Did the application successfully fetch the document because you provided a valid document identifier? Or did the application reject your request? It’s not enough to just authenticate as customer A, the application still needs to authorize customer A to access the resource in question. Ensure the UI isn’t simply hiding the feature from customer A. And of course, make sure customer A can still fetch their own document!
Embed an instruction in an uploaded document
AI models can be directed to perform tasks through prompts. Typically the application developer provides the prompt but other sources of untrusted input can be incorporated too. What if an uploaded document included an innocuous-sounding instruction to disregard the customer support response drafting task and instead repeat some nonsense canary string? Did the canary string show up in the generated support response?
Keep in mind this is just one data point about indirect prompt injection, it doesn’t prove the AI model could be coaxed into performing some nefarious tool invocation, just that its generated response changed.
Review AI model permissions
In our customer support assistant example, probably the AI model shouldn’t have permissions to send emails! Review the AI model’s integrations configuration and the application’s backend source code to validate. Don’t just take the AI model’s word for it that it won’t send any emails! Perhaps in your application, it’s intended functionality for the AI model to request that emails be sent. In this case, make sure the application implements (and you test!) some human-in-the-loop approval process (to a mocked-out email service during testing of course!). Don’t just take the AI model’s word for it that a human approved sending an email!
Review request and spend limits
What prevents the AI model from getting stuck in a loop endlessly requesting tool invocations from your application? Review request and spend limits implemented by the application. Test them out! Pick some modest limits so you’re not generating an outrageous AI inference bill just to validate that limits work as intended.
Security Through Obscurity Is Running Out of Time
What happens to all the software that was never particularly secure, but survived because nobody cared enough to look at it?
Report what you find
Armed with all this testing knowledge, how would you report that customer A was able to fetch customer B’s document? Clearly describe the security control that was intended, fetching a document should first be authorized against the authenticated customer, and the security control that was missing, the application wasn’t performing any authorization check when fetching documents.
Include supporting evidence, screenshots or redacted fetch requests and responses. Describe a potential security impact, other customers’ documents may contain sensitive information! Suggest a remediation, perform an authorization check in the backend before returning document contents. Retest to validate the authorization check now prevents customer A from fetching customer B’s document but still allows customer A to fetch their own document.
Note the application version you tested and the date so others can repeat your tests in the future.
Describe AI model permission changes
If you noticed that the AI model had more permissions than it needed, such as permission to send emails when it’s only meant to draft support responses, suggest reducing the AI model’s permissions. Reducing permissions is generally easier to reason about than increasing diligence!
Be clear about what you did and didn’t test
Remember to be clear about what you did and didn’t test in your application security review. You didn’t review all of the application’s deployment configuration, review all of its dependencies, or test all of its functionality.
In this fictional walkthrough, reviewing some source code and performing some dynamic security testing would not validate all potential security issues or certify the app as secure. Just because you weren’t able to successfully indirectly prompt inject the AI model doesn’t mean you exhausted all possibilities. Just because you identified one missing authorization check doesn’t mean you identified all of them.
But you learned about an important security control boundary, gathered evidence about how it performed, and identified areas for improvement! Hopefully now you feel empowered to perform your own AI application demo security assessments too!











As always, feel free to AMA!
For a customer support assistant reading uploaded documents, I'd add one case to the permissions review: an agent that can grant access is also an agent someone can try to talk into granting access. So the rules have to live outside the conversation, as permissions the model can't argue its way around.