ai and machine learning · ai security

Your agent reads email and files tickets. Sooner or later someone emails it a trap, and we test what it does.

An assistant that reads customer emails will sooner or later get one written to manipulate it. We test LLM applications and agents for prompt injection, tool permissions that are too broad, and data leakage. Then we change the design, so even 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
01 · UNTRUSTED INPUTS02 · GUARD LAYER03 · AGENT ACTIONS04 · SYSTEMS AND EVIDENCE User prompts: chat · uploads User prompts chat · uploads Retrieved content: documents · web · email Retrievedcontent 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 Agentruntime tool calls ·MCP clients Human approval: payments · deletes · email Humanapproval payments ·deletes · email Identity provider: OAuth 2.1 scoped tokens Identityprovider OAuth 2.1scoped tokens Business APIs: CRM · ERP · ticketing Business APIs CRM · ERP ·ticketing Security logs: SIEM · redacted traces Security logs SIEM · redactedtraces © Cohash · cohash.com
Anthropic ClaudeOpenAI APIAmazon BedrockMicrosoft Foundry
in short·15-second read

AI security means protecting applications built on large language models from prompt injection, leaks of sensitive data, and agents doing things they shouldn't.

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

you probably need this if
  • The agent signs in to every system it touches with the same admin-level API key.
  • 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 injectiondefinitionSomeone hides an instruction in a document or ticket comment an AI will read. If the agent follows it, it does something its user never asked for, with whatever access it holds.explained in a field note →
Ask an engineer facts checked 2026-10-20
how it runs
  1. 01Inventory and threat model
  2. 02Test
  3. 03Fix the design
  4. 04Retest and hand over
you keep
  • You get an inventory of the AI applications in scope, with the data, tools and identities each one uses. It's the map we test from.
  • Threat model per application
  • Red-team findings mapped to the OWASP LLM Top 10 entries they fall under. Each one names the component at fault and the fix we suggest.
+ 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

    • The agent signs in to every system it touches with the same admin-level API key.
    • 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.
    • You get an inventory of the AI applications in scope, with the data, tools and identities each one uses. It's the map we test from.
    • 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. That means chat and uploaded files, but also retrieved documents, web pages, email and tool results. We check what an attacker can get the application to do, as well as what they can get the model to say.

  2. Each agent and MCP server gets its own identity with the narrowest scopes that still work. Where the action belongs to a person, we use user-delegated tokens. Anything irreversible, such as payments, deletes or external email, waits behind a human approval.

  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, LLM01 Prompt Injection to LLM10 Unbounded Consumption. When we find something, we name the component, say why it's risky and write a fix your team can actually build.

  5. We treat model output as untrusted input before it gets anywhere near a browser, shell, SQL query or API. Tool arguments get checked against a schema, and anything rendered back to users is encoded first.

  6. We keep an inventory of models, providers, plugins, MCP servers and datasets. Each entry records its owner, data classification and version. So when something turns out to be vulnerable, or a model gets retired, you can look up where it's used without a hunt.

capability 01 / 06in production

Prompt injection testing

We try direct and indirect injection through every input the model reads. That means chat and uploaded files, but also retrieved documents, web pages, email and tool results. We check what an attacker can get the application to do, as well as what they can get the model to say.

capability 02 / 06in production

Tool and agent permission design

Each agent and MCP server gets its own identity with the narrowest scopes that still work. Where the action belongs to a person, we use user-delegated tokens. Anything irreversible, such as payments, deletes or external email, waits behind a human approval.

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, LLM01 Prompt Injection to LLM10 Unbounded Consumption. When we find something, we name the component, say why it's risky and write a fix your team can actually build.

capability 05 / 06in production

Output handling and downstream safety

We treat model output as untrusted input before it gets anywhere near a browser, shell, SQL query or API. Tool arguments get checked against a schema, and anything rendered back to users is encoded first.

capability 06 / 06in production

AI supply chain and model inventory

We keep an inventory of models, providers, plugins, MCP servers and datasets. Each entry records its owner, data classification and version. So when something turns out to be vulnerable, or a model gets retired, you can look up where it's used without a hunt.

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 over HR files, with permissions applied too late

composite · not a client story
  1. Beforethe situation

    An internal search assistant indexes HR policy and case files. It filters results for the user only after the model has read the top documents, so now and then a summary reflects 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

Which platforms enforce per-user permissions in RAG, and when you still build it yourself

You can get per-user filtering in RAG from Copilot, Azure AI Search, Bedrock or Google Agent Search. Where they stop, we build the filter and test it for leaks.

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

Anything a user types is untrusted, and so are retrieved documents and tool results. The gateway filters and redacts. The agent can only act through scoped identities, and risky actions wait for a person to approve them. Every step is logged, and those logs feed detection and testing.

Where AI security controls sit around an agent Anything a user types is untrusted, and so are retrieved documents and tool results. The gateway filters and redacts. The agent can only act through scoped identities, and risky actions wait for a person to approve them. Every step is logged, and those logs feed 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 © Cohash · cohash.com
01 · UNTRUSTED INPUTS02 · GUARD LAYER03 · AGENT ACTIONS04 · SYSTEMS AND EVIDENCE User prompts: chat · uploads User prompts chat · uploads Retrieved content: documents · web · email Retrievedcontent 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 Agentruntime tool calls ·MCP clients Human approval: payments · deletes · email Humanapproval payments ·deletes · email Identity provider: OAuth 2.1 scoped tokens Identityprovider OAuth 2.1scoped tokens Business APIs: CRM · ERP · ticketing Business APIs CRM · ERP ·ticketing Security logs: SIEM · redacted traces Security logs SIEM · redactedtraces input retrieved text tool request approved call read-only call audit events blocked attempts © Cohash · cohash.com
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

    Step one is a list. Every AI application goes on it, with its data sources, tools and identities. Then we draw what an attacker could reach through each input.

  2. step 02

    Test

    We red-team for injection, leakage and tool misuse, partly by hand and partly with automated tooling. Whatever we find gets mapped to the OWASP LLM Top 10 and to MITRE ATLAS techniques.

  3. step 03

    Fix the design

    Then we fix the design. Usually that means tighter permissions, approval steps, output validation and retrieval that enforces permissions. Every attack case we used 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.

  • tests01

    You get an inventory of the AI applications in scope, with the data, tools and identities each one uses. It's the map we test from.

    yours to keep
  • design02

    Threat model per application

    yours to keep
  • report03

    Red-team findings mapped to the OWASP LLM Top 10 entries they fall under. Each one names the component at fault and the fix we suggest.

    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
  • Advanced in AI Security Management (AAISM)ISACA
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?

No, current models can't fully prevent it. Filters and system prompt instructions reduce it, and a determined attacker can often still get through. What works reliably is limiting what a manipulated model can do. Give it narrow permissions and approval steps, and treat its output as untrusted.

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

There are ten entries in the 2025 version. In order, they're Prompt Injection, Sensitive Information Disclosure, Supply Chain, Data and Model Poisoning, Improper Output Handling, Excessive Agency, 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 built on OAuth 2.1, which the current MCP authorization specification requires authorization servers to implement. In practice you want a real identity provider, scoped tokens for each client, and no shared static API keys. We go through each tool and check which scopes it 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.

fact-checked Checked against vendor and official documentation last checked 2026-10-20 content fingerprint c8fd04e2
  1. 01Book a 30-minute working sessionsenior engineer
  2. 02Talk to an engineer about your setupreply within 24 hours
  3. 03See how similar projects wentcase studies
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