Coriqo
← All posts

Shadow AI Detection: How MSPs Find and Stop It

An MSP that manages forty small businesses cannot read forty sets of chat logs, and should not want to. The goal of shadow AI control is narrower and more useful: find out that it is happening, stop the worst of it at the moment of the paste, and keep a record that proves what you did.

This post is the practical playbook. It uses byoai-runtime, the open-source package behind Coriqo's Shield, because its features map neatly onto the three jobs: find, fence and prove. Where something is not built yet, we say so.

If you want the commercial side, read Shadow AI for MSPs: what to offer clients. If you are new to the term, start with what shadow AI is. For the written rules that sit beside the tooling, see our shadow AI policy guide.

Why the usual tools miss it

There are three places you can look for shadow AI, and each sees something different.

Vantage point What it sees well What it misses
Network and DNS Which AI domains a device contacts, and how often What was sent. Encrypted traffic is opaque, and personal phones are off the network
SaaS and OAuth logs Which AI apps people connected to company accounts Anything pasted into a web chat with no connection to company accounts
The browser on the device The moment of the paste, before text leaves Devices where nothing is installed

A domain block list tells you a device visited a chatbot. It cannot tell you whether the visit contained a quarterly forecast or a joke. For data protection, the browser is the one place where the content is still readable and the decision can still be made. That is where Shield works.

Find: the browser extension and local proxy

Shield has two parts that run on the user's own machine.

A browser extension (Chrome, manifest V3) watches chat sends on claude.ai, chatgpt.com, gemini.google.com and the Microsoft Copilot sites. On Claude and ChatGPT it checks the message in the page before it leaves the browser. On Gemini and Copilot it checks the message box before you send, on a best-effort basis that is not yet confirmed on every page.

A local capture proxy covers desktop and API traffic to GitHub Copilot, Mistral, DeepSeek, Groq, OpenRouter, Together and the Gemini API, plus the Claude desktop app, for devices where an administrator has installed its certificate.

Both talk only to a local service on 127.0.0.1, and the extension refuses to send anything to a different program listening on the same port. The extension asks the user to agree before it records anything. The welcome page says exactly what is noted.

What it looks for

The rules are plain pattern checks, grouped into three tiers.

  • Secrets: Anthropic, OpenAI, AWS, GitHub, Slack, Google and Stripe keys, private key blocks, JWTs, database connection strings that include a password, bearer tokens, and text such as password: hunter42.
  • Personal data: email addresses, card numbers that pass a Luhn check, phone numbers, SSN-like numbers, IBANs and crypto wallet addresses.
  • Flags: signals only, such as the word "password" or an executable file name. These are recorded and never rewritten, because removing "password" from "how do I reset my password" would break the question and protect nothing.

By default a detected secret stops the send, personal details become numbered placeholders such as [EMAIL_1] so the prompt still works, and flags are only recorded. An administrator can switch to record only, where the message goes out unchanged, or to warn, where the user sees a small bar with the choices Send redacted, Send anyway and Cancel. If nobody answers in 60 seconds, the send is cancelled, and the original is never sent on a timeout.

Fence: a four-week rollout that does not start a revolt

Blocking on day one makes people angry and teaches them to avoid the tool. Use the same sequence on every client.

Week Mode What you do
1 Record only Install on a pilot group. Nothing is changed. Learn which apps and which rule types actually show up
2 Record only Review the first findings with the client's owner. Adjust which apps are in scope
3 Redact and warn Personal data becomes placeholders. Secrets raise the warning bar
4 Enforce for secrets Leaked keys and credentials are blocked. Roll out to the rest of the staff

That sequence supports one of the findings in our 10,000-run simulation: reach across devices mattered about twice as much as detection quality. Spend your effort on getting it onto every managed laptop, then tune the rules.

Attachments

When someone attaches a file to an AI chat, Shield seals the file's SHA-256 fingerprint, its size and type, which rules matched and the version of the rules that ran. It keeps neither the file nor its name. Later, anyone holding a copy can run byoai shield check-file to learn whether the copy is the same file, whether the same rules give the same result and whether the seal still verifies.

Rolling it out to many machines

For an MSP, the sequence is: create each client and mint an enrolment token for each computer from the server console, then push one script from your device-management tool (Jamf, Intune, Kandji or a startup script) that installs and enrols. Tokens are single-use and expire within 24 hours.

Here is what is true today, because an honest picture matters more than a tidy one:

  • Enrolment from a managed registry key, macOS managed preference or root-owned file is built.
  • The extension reads its port from managed storage, and a force-install policy works with any extension ID, but the Chrome Web Store listing is not published yet, so there is no store ID to put in the policy.
  • Installing Shield on many computers is still pip install per machine and needs Python. A signed .pkg and .msi are the missing pieces.
  • Because each token is single-use, you need one token per computer, issued in bulk from the server side.

So the zero-touch deployment is a work in progress. Today's demo is a policy-installed extension plus a scripted install and enrolment per machine. Plan a pilot, not a thousand-seat push.

Fence the agents: the mandate

Layer four of shadow AI, the agent with credentials, needs a different control. A chat redaction rule cannot stop an assistant from calling a tool it should not.

coriqo-mcp sits between an MCP host (Claude Desktop, an agent framework or your own client) and an MCP server. Each tool call is checked against a mandate file before the server sees it, and each decision is written to a device-signed ledger. The mandate is a short file:

spec: coriqo.mandate/v1
agent:
  name: payments-assistant
mode: shadow            # or enforce
tools:
  allowed: [search, get_balance]
  prohibited: [delete_account]
on_violation: deny

In shadow mode, a call outside the mandate goes through and is recorded as flagged. In enforce mode, it is refused with a message that names neither the tool nor the rule, so the model has nothing to work around. (The word "shadow" here means the same thing as in your rollout: watch first, enforce later.)

A version 1.4 mandate can also pin the hash of each approved tool's definition. If a vendor quietly changes what a tool does, the changed tool is flagged, and under enforce it is hidden and refused. That is the shadow AI case where an approved connector turns into something else after approval.

Prove: a record that holds facts, not messages

Every event, from a redaction to a blocked tool call, goes into a hash-chained, device-signed ledger. What lands in the ledger is that a message was sent, how many characters it had, which rules matched and what was replaced. It does not hold the message text, because a record of everyone's prompts would be a new liability.

Two properties make this useful in an engagement:

  • Anyone can check it. The seal format is open, and coriqo-verify returns 0 when a record verifies, 1 when it fails and 2 when the input is unreadable. A client's auditor, insurer or customer can run it without an account on your system. We explain why that matters in Publishing a log is not trust.
  • Silence is visible. The server side tracks which enrolled devices have never reported, and which have gone quiet. The console answers the question a single log file cannot: which of my devices have reported, and what is missing. That console is in development, and it reports every device as unverified until a verify walk exists on the server side, because the absence of a failed check is not a pass.

What this does not do

We would rather you hear it from us than find it out at a client meeting.

  • It does not read meaning. Shield matches patterns. A pasted contract, client list or strategy memo has no pattern, so it is not caught. The written policy has to cover that class, and so does staff training.
  • It only covers what it is installed on. Personal phones, unmanaged laptops and apps outside the supported list are not seen.
  • It is a record, not a control, for what the AI does after the message leaves. Tools that an AI runs on its own servers, such as web search, are recorded, but turning them off is a setting of the client's ChatGPT or Claude workspace.
  • It is early. byoai-runtime is a 0.1.x beta. The seal format, the ledger wire format, the verifier commands and the mandate file format are the stable contract. Shield, the server, the MCP interposer and the console are provisional and may change in a minor release.

Questions about shadow AI detection

How do you detect shadow AI without reading employees' messages? Check the message on the device, keep only facts about it (a send happened, which rule matched, what was replaced) and seal those. The text never leaves the page.

Can an MSP run this for many clients? The design is per client, with one enrolment token per computer and a server console that groups devices by client. Mass deployment tooling is not finished, as described above.

Does this work with Copilot and Gemini? The extension checks the message box before sending on both, on a best-effort basis. Their network traffic is form-encoded or uses a websocket, so the proxy cannot safely rewrite it.

Is it free? byoai-runtime is open source under the Apache 2.0 license. Read the Shield documentation for installation, and Coriqo for MSPs and vCISOs for how it fits a managed engagement.

Start a pilot in your next client assessment.