Glossary · Shadow agent

What is a shadow agent?

Shadow agents appear when a developer connects a coding agent to CI, an employee grants an AI tool access to a mailbox, or a team tries an experimental MCP server and never removes it. They are not malicious by definition. The problem is that nobody decided what they should reach.

Book a demoAll terms
Agents 5 found4 shadow
claude-codeDeveloper laptop · found via MCP configSanctioned
cursor-agentDeveloper laptop · no ownerShadow
ai-notetakerOAuth grant · mail, driveShadow
Experimental MCPRepo token in env blockShadow
ai-review stepCI workflow · uses DEPLOY_TOKENShadow
cursor-agent can reach customer dataRegistered by nobody · 3 stepsCritical
DEFINITION

A shadow agent is an AI agent running in an organisation with real access, but without being registered, reviewed or owned by anyone responsible for it.

SOURCES

Where shadow agents come from. Five common doors.

None of these needs an attacker. Each one gives an agent credentials that nobody reviewed.

01Coding agents on laptops

Cursor, Claude Code or Codex installed by a developer. They run with the developer’s shell, git credentials and cloud profiles.

~/.aws/credentials
02AI tools with OAuth grants

An employee clicks Allow and a notetaker or assistant gets mail, drive or CRM scopes. No ticket, no review, no expiry.

mail.read · drive
03MCP servers in config files

A server added to a local MCP config, usually with a long-lived token in its env block.

.cursor/mcp.json
04Agents in CI

A workflow step that calls an AI CLI with repository secrets, often added in a pull request nobody read closely.

secrets.DEPLOY_TOKEN
05Custom agents on old identities

A LangChain or notebook agent that reuses an existing API key, service account or cloud role.

svc-reporting key
SHADOW VS SANCTIONED

Same agent. Different accountability.

The software can be identical. What makes an agent sanctioned is everything around it.

Shadow agentSanctioned agent
InventoryNot registered anywhereListed with type, source and owner
OwnerNobody, or the person who installed itA named team that answers for it
CredentialPersonal token, shared key or the developer’s own sessionDedicated identity, scoped to the task
Access reviewNever reviewedReviewed when access changes
ReachWhatever the credential can reachKnown paths, risky ones closed
OffboardingSurvives when the installer leavesRemoved or reassigned with its owner
DETECTION

How to find shadow agents. Follow the credentials.

OAuth consents, last 30 days
ai-notetakerdana.reyes · gmail.readonly, driveNew
slide-generator3 users · drive.fileNew
meeting-summarizer14 users · calendar.readonlyKnown
crm-enrichertomas.okafor · Salesforce full accessNew
~/.cursor/mcp.json
{
  "mcpServers": {
    "crm": {
      "command": "npx",
      "args": ["-y", "crm-mcp-server"],
      "env": {
        "CRM_API_TOKEN": "sk_live_••••••••••"
      }
    }
  }
}
.github/workflows/review.yml
- name: AI review
  run: npx ai-review-cli --fix --all
  env:
    MODEL_API_KEY: ${{ secrets.MODEL_API_KEY }}
    GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
# deploy token: repo write + packages
Credential use by new clients
deploy-bot keyLast used 2h ago · user agent: node, AI SDKNew client
svc-reportingLast used 1d ago · from a notebook hostNew client
MODEL_API_KEY #3Created 9 days ago · no owner tagUntracked
THE RISK

Why a shadow agent is an attack path

A shadow agent holds real credentials but sits outside every review. Whoever controls it, through prompt injection, a malicious repository or a stolen token, inherits everything those credentials can reach. That chain is an attack path, and because nobody registered the agent, nobody is watching the first step.

This is why reach matters more than the count. Ten shadow agents with read access to a wiki are a hygiene issue. One with a path to production data is an incident waiting for a trigger.

Shadow
cursor-agent
Shadow agent on a developer laptop
Personal cloud profile
~/.aws/credentials, admin role
prod-admin role
Assumable from the profile
Critical
customer db
PII, reachable today
Critical
prod backups
Deletable

Found one. Now what?

Finding shadow agents is the first step. Assigning an owner is the second. Neither makes the agent sanctioned by itself: its access still needs a review.

Assign an ownerSomeone who can say what the agent is for and answer for its access.
Review its reachTrace what its credentials reach, not only which permissions it has.
Give it its own identityMove it to a dedicated, scoped credential, or remove it if nobody needs it.
FAQ

Questions, answered.

Short answers on shadow agents and how to handle them.

Is a shadow agent the same as shadow IT?

It is a special case. Shadow IT is any tool used without approval. A shadow agent also acts on its own: it reads data, calls APIs and runs commands with the credentials it was given, so the risk is what it can reach, not only that it exists.

Are shadow agents malicious?

Usually not. Most are installed by employees to get work done. They become a problem because their access was never reviewed, and anyone who controls the agent, for example through prompt injection or a stolen token, inherits that access.

How do I find shadow AI agents?

Look where agents leave traces: OAuth consent logs in Google Workspace and Microsoft Entra ID, MCP configuration files on developer machines, CI workflows that call AI tools with secrets, and cloud or model provider API keys used by new clients.

What should I do when I find one?

Assign an owner, review what the agent can reach, then either move it to a dedicated, scoped identity or remove it. Finding it and assigning an owner does not make it sanctioned by itself.

See what your agents can reach. Before someone else does.

Book a demo and we walk through the access paths in an environment like yours.