ai and machine learning · ai security

Your agent reads email and files tickets. So what does it do with an email written to trick it?

Sooner or later an assistant that reads customer emails gets one written to manipulate it. We test LLM applications and agents for prompt injection, over-broad tool permissions and data leakage, then change the design so a manipulated model can't do much damage.

platforms
ai-machine-learning / ai-security 7 platforms
01 · UNTRUSTED INPUTS 02 · GUARD LAYER 03 · AGENT ACTIONS 04 · SYSTEMS AND EVIDENCE User prompts: chat · uploads User prompts chat · uploads Retrieved content: documents · web · email Retrieved content documents · web ·email AI gateway: redaction · filters · limits AI gateway redaction · filters ·limits Model: Claude · GPT · Bedrock Model Claude · GPT · Bedrock Agent runtime: tool calls · MCP clients Agent runtime tool calls · MCPclients Human approval: payments · deletes · email Human approval payments · deletes ·email Identity provider: OAuth 2.1 scoped tokens Identity provider OAuth 2.1 scopedtokens Business APIs: CRM · ERP · ticketing Business APIs CRM · ERP · ticketing Security logs: SIEM · redacted traces Security logs SIEM · redacted traces
Anthropic ClaudeOpenAI APIAmazon BedrockMicrosoft Foundry
in short·15-second read

AI security is the work of protecting applications built on large language models from prompt injection, leaks of sensitive data, and agents taking actions they shouldn't.

We review AI applications against the OWASP Top 10 for LLM Applications and red-team prompts and tool use. We design least-privilege permissions for agents and MCP servers. We also add controls that keep confidential data out of prompts, logs and outputs.

you probably need this if
  • An agent uses one API key with admin rights to every system it touches.
  • Your assistant reads uploaded files and web pages. Nobody's tested what happens if one of them has instructions in it.
  • Full prompts and responses, customer data included, sit in a logging tool that lots of people can open.
terms on this page Prompt injectiondefinitionInstructions tucked into content an AI reads, like a document or a ticket comment, meant to make it do something its user never asked for.explained in a field note →
Ask an engineer facts checked 2026-10-20 · 5 sources
how it runs
  1. 01Inventory and threat model
  2. 02Test
  3. 03Fix the design
  4. 04Retest and hand over
you keep
  • AI application inventory with data, tools and identities
  • Threat model per application
  • Red-team findings mapped to OWASP LLM Top 10 entries
+ 3 more documents
who does it
AI security engineerLLM red-team testerAgent identity and permissions engineer Advanced in AI Security Management (AAISM)
the story · ai security

From the first call to a setup your own team can run.

Here's what usually prompts a call about your AI Security, what we do about it and in which order, and where you end up.

  1. chapter 01 · where it hurts

    Why teams reach out

    • An agent uses one API key with admin rights to every system it touches.
    • Your assistant reads uploaded files and web pages. Nobody's tested what happens if one of them has instructions in it.
    • Full prompts and responses, customer data included, sit in a logging tool that lots of people can open.
  2. chapter 02 · what we change

    How we solve it

    • Prompt injection testing
    • Tool and agent permission design
    • Data leakage controls
    • OWASP Top 10 for LLM Applications review
    • Output handling and downstream safety
    • AI supply chain and model inventory
  3. chapter 03 · how it runs

    Our approach

    • Inventory and threat model
    • Test
    • Fix the design
    • Retest and hand over
  4. chapter 04 · where you end up

    What changes

    • Someone can still write an email that confuses the classifier, but it won't get the agent to send mail or open other mailboxes.
    • We fixed it so the model only sees documents the asking user may read, and we added the leakage tests to release testing.
    • AI application inventory with data, tools and identities
    • Threat model per application
what we do

Where we spend the hours

6 areas of work, each one done by an engineer who has run it in production.

  1. We try direct and indirect injection through every input the model reads, whether chat, uploaded files, retrieved documents, web pages, email or tool results. The test is what an attacker can make the application do, and also what it can make the model say.

  2. We gave each agent and MCP server its own identity with the narrowest scopes that work, used user-delegated tokens where the action belonged to a person, and put human approval in front of anything irreversible such as payments, deletes or external email.

  3. Retrieval that enforces the asking user's document permissions, redaction of secrets and regulated data before prompts leave your boundary, and logging policies that don't copy sensitive content into trace stores.

  4. We go through the 2025 list from LLM01 Prompt Injection to LLM10 Unbounded Consumption. Findings point at the specific component, explain its risk and give a fix your team can actually build.

  5. Model output treated as untrusted input before it reaches a browser, shell, SQL query or API. Schema validation for tool arguments, and encoding for anything rendered back to users.

  6. We keep an inventory of models, providers, plugins, MCP servers and datasets, with owner, data classification and version for each. If something turns out to be vulnerable, or a model is retired, it's quick to find where it's used.

capability 01 / 06in production

Prompt injection testing

We try direct and indirect injection through every input the model reads, whether chat, uploaded files, retrieved documents, web pages, email or tool results. The test is what an attacker can make the application do, and also what it can make the model say.

capability 02 / 06in production

Tool and agent permission design

We gave each agent and MCP server its own identity with the narrowest scopes that work, used user-delegated tokens where the action belonged to a person, and put human approval in front of anything irreversible such as payments, deletes or external email.

capability 03 / 06in production

Data leakage controls

Retrieval that enforces the asking user's document permissions, redaction of secrets and regulated data before prompts leave your boundary, and logging policies that don't copy sensitive content into trace stores.

capability 04 / 06in production

OWASP Top 10 for LLM Applications review

We go through the 2025 list from LLM01 Prompt Injection to LLM10 Unbounded Consumption. Findings point at the specific component, explain its risk and give a fix your team can actually build.

capability 05 / 06in production

Output handling and downstream safety

Model output treated as untrusted input before it reaches a browser, shell, SQL query or API. Schema validation for tool arguments, and encoding for anything rendered back to users.

capability 06 / 06in production

AI supply chain and model inventory

We keep an inventory of models, providers, plugins, MCP servers and datasets, with owner, data classification and version for each. If something turns out to be vulnerable, or a model is retired, it's quick to find where it's used.

typical situations

Situations we walk into

We pieced these together from AI Security situations that come up a lot. They're patterns. You won't find a specific client in them.

case file 01

An email triage agent that can also send email

composite · not a client story
  1. Beforethe situation

    There's a shared-mailbox agent that classifies inbound customer emails, drafts replies and is allowed to send them. Its mail connector has full mailbox permissions. Nobody has tested an email that tells it to forward the inbox.

  2. What we dothe work

    Write indirect injection tests in real email formats and run them against the agent. Split read and send into separate tools, require a person to approve any outbound message to a new address, and reduce the connector to the one shared mailbox.

  3. Afterwhere you end up

    Someone can still write an email that confuses the classifier, but it won't get the agent to send mail or open other mailboxes. Those injection cases now live in the regression suite.

case file 02

RAG search over HR files with permissions applied after retrieval

composite · not a client story
  1. Beforethe situation

    HR policy and case files are indexed by an internal search assistant. Filtering for the user happens after the model has already read the top documents. Sometimes the summaries reflect content that user can't open.

  2. What we dothe work

    Move permission filtering into the retrieval query using the user's group claims, re-index with document-level access metadata, and test with accounts from different departments for leakage through summaries.

  3. Afterwhere you end up

    We fixed it so the model only sees documents the asking user may read, and we added the leakage tests to release testing.

case studies

AI Security case studies

All case studies
AI rollout AI and agents

Microsoft 365 Copilot or Gemini Enterprise rollout with real adoption

Rolling out Microsoft 365 Copilot or Gemini Enterprise with oversharing fixed first, use cases tied to real tasks and adoption measured past login counts.

read the case study
AI rollout AI and agents

Enterprise search and RAG that respects document permissions

Enterprise search and RAG that only return what each user may open. We capture source ACLs at ingestion, filter at query time and leak-test.

read the case study
implementation Industry platforms

Epic integrations, FHIR APIs and TEFCA connectivity

Building and governing the HL7 and FHIR integrations, SMART on FHIR apps and TEFCA exchange around Epic, with an interface catalog and scope reviews.

read the case study
AI rollout AI and agents

MCP servers for SAP, Salesforce, ServiceNow and internal APIs

We connect AI agents to SAP, Salesforce, ServiceNow and internal APIs through MCP servers, with OAuth, scoped tools, approval for writes and audit.

read the case study
AI rollout AI and agents

Identity, scopes and audit for AI agents and MCP servers

Giving AI agents their own identities, putting remote MCP servers behind OAuth with per-tool scopes, and logging which agent did what for whom.

read the case study
AI rollout AI and agents

AI pilot to production with forward deployed engineers

Taking an AI pilot into production with forward deployed engineers who work with the business team, build evals, connect real systems and hand over cleanly.

read the case study
architecture

Where AI security controls sit around an agent

The model gets untrusted content from user input, retrieved documents and tool results. Controls at the gateway filter and redact. The agent acts only through scoped identities and needs approval for risky actions. Each step goes into the logs used for detection and testing.

Where AI security controls sit around an agent The model gets untrusted content from user input, retrieved documents and tool results. Controls at the gateway filter and redact. The agent acts only through scoped identities and needs approval for risky actions. Each step goes into the logs used for detection and testing. 01 · UNTRUSTED INPUTS 02 · GUARD LAYER 03 · AGENT ACTIONS 04 · SYSTEMS AND EVIDENCE input retrieved text filtered prompt tool request scoped token risky action approved call read-only call audit events blocked attempts User prompts chat · uploads Retrieved content documents · web · email AI gateway redaction · filters ·limits Model Claude · GPT ·Bedrock Agent runtime tool calls · MCP clients Human approval payments · deletes · email Identity provider OAuth 2.1 scopedtokens Business APIs CRM · ERP · ticketing Security logs SIEM · redacted traces
Read the diagram as text
  1. User prompts → AI gateway: input
  2. Retrieved content → AI gateway: retrieved text
  3. AI gateway → Model: filtered prompt
  4. Model → Agent runtime: tool request
  5. Identity provider → Agent runtime: scoped token
  6. Agent runtime → Human approval: risky action
  7. Human approval → Business APIs: approved call
  8. Agent runtime → Business APIs: read-only call
  9. Agent runtime → Security logs: audit events
  10. AI gateway → Security logs: blocked attempts
how it runs

A typical engagement

We don't start a step until the last one has produced something you can check.

  1. step 01

    Inventory and threat model

    We list every AI application, its data sources, tools and identities, then draw what an attacker could reach through each input.

  2. step 02

    Test

    We red-team injection, leakage and tool misuse by hand and with automation, and map what we find to the OWASP LLM Top 10 and MITRE ATLAS techniques.

  3. step 03

    Fix the design

    Fixes come next. Tighter permissions, approval steps, output validation and enforced retrieval permissions. Every attack case goes into the regression suite.

  4. step 04

    Retest and hand over

    Rerun the attacks after fixes, write up residual risk for the application owner, and leave the test suite running in CI.

you keep

What you're left with

We write these for your AI Security setup, and they're working documents. Your team should be able to keep things running from them long after we've gone.

  • inventory01

    AI application inventory with data, tools and identities

    yours to keep
  • design02

    Threat model per application

    yours to keep
  • report03

    Red-team findings mapped to OWASP LLM Top 10 entries

    yours to keep
  • design04

    Permission design for agents and MCP servers

    yours to keep
  • tests05

    Prompt injection and leakage test suite for CI

    yours to keep
  • document06

    Residual risk summary for application owners

    yours to keep
talent and delivery · ai security

Certified engineers, wherever you need them.

Some clients want a project team, some want a couple of engineers on theirs. Either works. Onsite, nearshore or offshore, with handovers across time zones that keep things moving.

Onsite

Engineers at your sites in the US

Nearshore

Overlapping hours with US teams

Offshore

Overnight progress on your backlog

All time zones

Coverage handed over across time zones

24-hour coverage · US Central time
OnsiteUS business hours
Nearshoreoverlapping US hours
Offshoreovernight progress
Combinedhandover, not hand-off
certifications our engineers hold
roles we staff
  • AI security engineer
  • LLM red-team tester
  • Agent identity and permissions engineer
  • Application security engineer for AI apps
  • AI security architect
01Can prompt injection be fully prevented?

Not with current models. Filters and system prompt instructions reduce it, but a determined attacker can often get through. What works reliably is limiting what a manipulated model can do, with narrow permissions, approval steps and treating its output as untrusted.

02What's on the OWASP Top 10 for LLM Applications?

In 2025 the list runs from Prompt Injection and Sensitive Information Disclosure through Supply Chain, Data and Model Poisoning, Improper Output Handling and Excessive Agency, to System Prompt Leakage, Vector and Embedding Weaknesses, Misinformation and Unbounded Consumption. There's now a separate OWASP Top 10 for Agentic Applications for 2026 as well.

03How should an MCP server authenticate?

It's based on OAuth 2.1. The current MCP authorization specification requires authorization servers to implement it. Practically, that's a real identity provider, scoped tokens for each client and no shared static API keys. We check the scopes each tool really needs.

04How long does an AI security assessment take?

It depends on how many applications, tools and data sources are in scope. One assistant with a few tools is a short engagement. An agent platform that many teams use needs an inventory first, and we size that before quoting the testing.

05Do you also handle AI governance and policy?

Yes. Policy, risk classification and regulation sit with our AI governance practice. What's on this page is the technical testing and design work.

06Is this different from a normal penetration test?

It overlaps. The web app, APIs and cloud configuration still need standard testing. What's new is attacks that go through the model, like instructions hidden in a document that make an agent call a tool. Traditional scanners don't try those.

sources 5 sources linked last checked 2026-10-20 content fingerprint 97a10897
  1. 01OWASP: Top 10 for LLM Applications 2025genai.owasp.org ↗
  2. 02OWASP: Top 10 for Agentic Applications for 2026 (9 Dec 2025)genai.owasp.org ↗
  3. 03MITRE ATLAS data repository (adversary tactics and techniques against AI systems)github.com ↗
  4. 04Model Context Protocol: Authorization specification, revision 2026-07-28 (OAuth 2.1)modelcontextprotocol.io ↗
  5. 05ISACA: AAISM credentialisaca.org ↗
Reviewed by the Cohash team Product names are trademarks of their owners. how we handle facts and data →
next step

Tell us what you're running. We'll tell you what we'd do first.

A 30-minute working session with a senior engineer. No slides.

useful to bring
  • The platform and the version you're on
  • Where you need to get to, and by when
  • What's custom: rules, plugins, integrations
  • Any audit finding or deadline driving it