Coding Agent Security

Securing the use of AI coding agents in your engineering organization

duration
2 Sessions + Report
Kind
Assessment
where
Inhouse or Remote
language
German or English

Assessment info at a glance: Download the one-pager (PDF).
For a one-page checklist you can pin next to the IDE policy, see the Coding Agent Security Cheat Sheet (PDF).

Securing how your engineers use AI coding agents

Most engineering organizations are already shipping code written with the help of AI coding agents. GitHub Copilot, Cursor, Claude Code, Kiro, Codex, OpenCode, Windsurf, Devin, Aider, and a long tail of MCP-based extensions are in production use today, often before any formal security or legal review has happened. The result is a familiar pattern: developers love it, productivity numbers move, and the security team has no defensible answer to the question “how is this governed?”

This assessment gives you that answer in two sessions. We work through a structured interview of about 100 questions covering ten domains: adoption, the AI platform behind the agents, governance, identity and secrets, MCP and tool connectivity, code and data exposure, generation safety, supply chain, execution sandboxing, and monitoring. From the answers you get a prioritized risk overview, the attack scenarios your gaps combine into, and a two-wave remediation roadmap covering the next nine months.

The structure is simple: a first session to gather where you actually stand, and a second to walk through the results and the roadmap.

Before the assessment we have a short scoping call. It pins down which agents and teams are in scope, what topics deserve the most depth, and who should be in the room for each session.

If your concern is the AI agents you build for customers (chatbots, autonomous orchestrations, multi-agent systems), see Agentic AI Security instead. That engagement covers attacks against your AI product. This one covers attacks against your software supply chain through the AI tools your engineers use to build everything else.

Why existing controls miss this

Coding agents do not look like a new threat surface from the outside. The developer still opens an IDE, writes code, opens a PR. Your SAST runs, your dependency scanner runs, code review happens. On paper, nothing changed.

What changed is who is writing the code, what code is leaving your network, and what privileges the writing process holds.

The agent runs as the developer. A coding agent with shell, file write, and network tools inherits the developer’s effective privileges. On a workstation with daily local admin or stored cloud credentials, a prompt-injected agent is a credentialed insider. Sandboxing of agent execution and tightly scoped tool permissions matter more in an agent-assisted workflow than they used to. Most of the policy controls agent vendors offer, such as permission rules, sandbox modes, and MCP allowlists, are enforced by the client on that same workstation. Local admin rights quietly undo them.

The vendor sees more than you think. Inline completions send small windows. Chat with project context sends open files. Cursor Background Agents and similar cloud workers clone whole repositories into vendor infrastructure. Most organizations have not assessed which of these paths their teams actually use, which vendors hold the resulting code, and what the contractual data-handling commitments are.

MCP is the fastest-growing integration surface in your dev stack and the least mature on the security side. MCP servers receive credentials, hold privileged tool access, and ship as packages from npm, PyPI, GitHub, or vendor sites. They get pulled in with the same casual ceremony as any other dev dependency, then handed shell, database, and cloud SDK access. Tool descriptions become part of the agent’s context, which makes a malicious description a persistent prompt injection.

The AI platform is becoming the control plane, and a new crown jewel. Many organizations now route model access through an AI gateway, a cloud model service such as Amazon Bedrock or Azure OpenAI, or self-hosted models. That layer holds every provider key and often logs every prompt, source code included. When malicious LiteLLM releases appeared on PyPI in March 2026, every gateway that installed them was, by design, a system full of provider keys. The layer is also easy to overestimate: a gateway sees model traffic, not the shell commands an agent runs locally, and SaaS agents such as Copilot or Kiro usually bypass it entirely. Where inference actually runs depends on routing configuration, not on the region in the contract.

Shadow adoption is the norm, not the exception. Personal vendor accounts bypass SSO, DPAs, and audit. Engineers paste production stack traces into chat boxes. Slopsquatted dependencies suggested by overconfident agents land in lockfiles. None of this shows up in a standard application security review.

This assessment is built specifically for that gap. It is not a pentest, not a code review, and not a training. It is a structured interview and a defensible report that lets you say, with evidence, where you are and what you intend to do about it.

Assessment coverage: ten domains

The assessment and report are organized into the same ten domains. Each gets its own severity verdict in the final report, with findings mapped to recognized standards.

We talk through which agents are in active use across your engineering org — sanctioned, tolerated, or known shadow usage — and how that distributes across teams, geographies, and seniority. We go through deployment modes (IDE plugin, CLI, web, code-review bot, autonomous CI/CD agent) and, separately, runtime locations (local IDE process, local CLI, corporate-hosted runner, vendor cloud background agent, browser-based cloud workspace). The runtime location distinction is doing most of the work here: a local plugin keeps code on the dev machine; a vendor cloud background agent clones the repo into vendor infrastructure. That single difference reshapes the downstream risk picture.

We also cover adoption scale, shadow visibility (do you actually know who is using what), corporate-versus-personal account split, repository scope rules, and the environments where agents run (laptop, devcontainer, Codespaces/Gitpod/Coder, CI/CD, production debugging, customer environments).

We map the path from the developer’s client to the model: the agent vendor’s backend, direct provider APIs, Amazon Bedrock, Azure OpenAI or Microsoft Foundry, Google Vertex AI, centrally self-hosted open-weight models, or local models on developer laptops. For each path we look at where inference is actually processed. Inference profiles and data zones decide that, and “our account is in Frankfurt” often answers a different question.

If you run an AI gateway, whether self-operated open source such as LiteLLM, a commercial product on-prem or as SaaS, or the gateway function of your cloud platform, we go through what it enforces (model allowlists, attributed logging, redaction, budgets, region-restricted routing), how the gateway itself is hardened, and whether developers and agents can go around it. Model routing and fallback get their own item, because an automatic fallback is an easy way for regulated code to reach a model or region nobody approved. Central guardrails and content filters, and the controls around self-hosted and local models (provenance, safe model formats, authenticated inference endpoints), complete the domain.

The build-versus-buy question for the platform usually follows right after: open source or commercial, SaaS or your own infrastructure. The report answers it as a direction that fits your constraints, such as data residency, obligations toward ICT third-party providers, and the operating capacity of your platform team, rather than as a product ranking.

We discuss whether you have a formal AI coding policy, whether new agents and MCP servers go through a real approval gate or are self-service, how risk is classified, and what vendor due diligence has happened on the agent vendors holding your source code. Training and awareness coverage is part of this domain too: secret handling in prompts, prompt injection in pasted content, IP and license risk, social engineering of agents through poisoned documents, slopsquatting awareness, and destructive-action awareness all belong here.

Many engagements find this domain at “ad hoc” while pipeline-side controls are already mature. That asymmetry tends to show up later, when someone asks for evidence.

We discuss the predominant identity model (corporate SSO versus personal vendor accounts versus shared service accounts), SSO and SCIM enforcement across agent vendors, and secret-redaction controls on agent traffic. We capture where dev-side secrets actually live (centralized secret manager, OS keychain, .env files, IDE config, shell history, source) because a coding agent with file or shell tools can read whatever the developer can read.

Token scope and lifetime get specific attention. Many environments default to full repo write with mixed or indefinite lifetimes. That is a one-line finding with a measurable remediation. We also cover chat-history leakage risk, MCP server credential provisioning, and session isolation across users, repos, and projects. The agents’ own session tokens get a look too: some agents keep refresh tokens in plain files that any process running as the developer can read and reuse.

We take stock of the MCP servers in active use (GitHub, Slack, Atlassian, internal forks, and so on), go through source vetting before adoption, hosting models (local on dev machine, devcontainer, central internal service, vendor SaaS), and network egress posture. Tool description audits and rug-pull detection are part of this domain: a benign MCP server today can become malicious tomorrow through an upstream change.

Two newer layers get their own items. An internal MCP registry only becomes a control when clients enforce it, and that enforcement usually lives in the client itself and covers local servers only when package and version are pinned. MCP gateways broker credentials and authorize individual tools for remote servers, while local stdio servers never pass them. We check what each layer actually covers in your setup.

The capability surface is the other half. We go through which tool categories your agents can invoke (shell execution, file write inside or outside the workspace, network requests, browser automation, database access, cloud SDK and IaC tools, email or messaging send, code execution sandboxes) and the tool approval defaults. The difference between “every action requires confirmation” and “full auto mode” reshapes your blast radius more than any other single setting.

Third-party marketplaces (Cursor extensions, IDE plugin stores, MCP directories) get their own item because they are a discovery layer with limited safety guarantees. The same goes for agent skills, the packaged instruction sets agents load on demand.

For the threat lens this domain draws on, see my blog post on securing MCP with a defense-first architecture.

Different products send different amounts of code. Inline completions send small windows. Chat with project context can send entire open files. Background agents clone the repo into vendor infrastructure. We discuss which of these paths your teams actually use and whether sensitive repositories (PCI, PHI, customer crypto material, critical business logic) get special handling or are treated like everything else.

We walk through what is documented around vendor data handling (training opt-out, zero-retention modes, region pinning, DPA, BYOK), prompt telemetry scope, the availability of self-hosted options for sensitive workloads, agent long-term memory controls, and the IP classification driving repo-level rules. Customer-data exposure through agent prompts is a common pain point and gets its own line.

We discuss whether human review of AI-generated code is mandatory, optional, or skipped, and whether AI-authored code is attributed (tag, comment, or commit trailer). Then we walk through the security scanning stack actually wired into the pipeline (SAST, secret scanning, SCA, IaC, container, license compliance) because AI-generated code concentrates certain bug classes: weak crypto, broad CORS, eval/exec, SQL string concatenation, unsafe deserialization, TLS verification disabled.

Prompt-injection defenses for source inputs (issues, PR comments, code comments, retrieved documents that the agent consumes) are part of this domain. So are destructive-action controls (pre-execution diff or preview, confirmation prompts, allowlists, sandbox execution, snapshots), test coverage requirements for AI-generated changes, commit signing and attribution for agent-authored commits, and license-contamination checks. Where teams steer agents with spec and plan files, we look at how those files are reviewed before an agent acts on them.

Slopsquatting (AI-hallucinated or recently-registered typosquatted packages) is the highest-traffic operational risk in this domain. We go through the controls that matter here: internal registry or proxy with allowlist, lockfile enforcement, pre-install scanning, cooling periods on newly-published packages, and human review for AI-suggested dependencies.

Beyond packages, the agent itself is a binary that runs with developer privileges. We discuss how agent binaries reach machines (vendor-signed installer, corporate app store, internal mirror, public marketplace, direct web download), and how MCP servers themselves are pulled in (signing, version pinning, internal fork or mirror, update review). Third-party rule packs, system prompts, and personas (Cursor rules, CLAUDE.md fragments, Copilot custom instructions, agent persona libraries) get their own item because they are unsigned text fragments that shape agent behavior and can carry hidden instructions.

SBOM coverage of AI-introduced dependencies and the contractual stance on whether your code trains vendor models complete this domain.

We discuss where shell commands and code that the agent runs actually execute (laptop host OS, local devcontainer, remote dev environment, vendor-hosted runner, CI/CD runner, production read-only, production with write), the strength of shell sandboxing (microVM, container with restricted privileges, container with default privileges, the agent’s built-in OS-level sandbox, process-only, none), and dev-environment network egress controls.

Central enforcement of agent settings gets its own item. Several attack chains published in 2026 made an injected agent rewrite its own MCP or task configuration, after which the IDE ran attacker-supplied code. We check which settings you push as managed policy, whether the agent can write to its own configuration files, and whether outdated agent versions can keep running.

Dev-machine hardening (EDR, full-disk encryption, MDM, host firewall, least-privilege local user, application allowlisting) gets explicit coverage because the agent inherits the host’s containment. Agent access to production, the use of coding agents inside the CI/CD pipeline (PR review bots, autonomous bug fixes, test generation, security-finding triage), and whether agents can bypass branch protections or CODEOWNERS round out this domain.

We discuss what is logged centrally (prompts, completions, tool and MCP invocations with arguments, network traffic from MCP servers, commits and PRs authored by agents, authentication and session events), retention policy, whether logs are SIEM-integrated, and whether anomaly detection is tuned to agent behavior (unusual tool sequences, exfiltration patterns, destructive-action spikes, off-hours activity, cross-repo activity from one session). Request logs from model and MCP gateways count here, as do the prompt logs that some vendors of bundled agents export into your own cloud account.

We also cover whether an incident response playbook exists for the four most common agent-specific scenarios (poisoned MCP server, leaked agent token, prompt-injection-induced destructive action, vendor data exposure) and whether credential revocation has been timed end-to-end against a tabletop. Forensic capability (full session replay, transcript export, tool-call audit log, network capture) gets its own item because reconstruction is what turns an incident into a postmortem rather than a guess.

The category closes with a self-assessed maturity score from 0 to 10. It anchors the report and gives you a measurable baseline to improve against.

What you receive

At the end of the engagement you receive four artifacts.

A risk overview. A prioritized view of risks across the ten domains, grounded in your actual assessment answers rather than a generic checklist. Each item names what it is, why it matters in your environment, and the severity given your stated usage profile.

Attack scenarios. Findings rarely matter one at a time. The report shows which of your gaps combine into concrete attack chains, for example a poisoned web page that makes an agent rewrite its own configuration, or a compromised gateway component that collects every provider key, and which control breaks each chain. That is usually the shortest way to explain to leadership why a particular roadmap item comes first.

A two-wave remediation roadmap. Wave 1 for the next 0–3 months covers the foundational changes. Wave 2 for 3–9 months covers the strengthening work. Each roadmap item points back to the specific risk it addresses.

A residual risk outlook. Where you stand after each wave, what risk remains, and which categories are structural rather than fixable. Useful for board and leadership communication.

The report is written for two readers: the CISO or head of engineering reading the executive summary, and the platform or detection engineer reading the risk overview and roadmap line by line.

Engagement approach

Which agents are sanctioned, tolerated, or known to be in shadow use. Which teams are in scope and what topics deserve the most depth. Whether the assessment session is remote or onsite, half day or full day, one session or split across two half-days. Who should be in the room: typically someone from security, someone from platform or developer experience who knows the actual tool inventory and how model access is provided, and at least one developer who uses the agents every day.
The session is facilitated, not interrogative. You receive the questionnaire in advance, so the session can concentrate on the answers that need discussion. Questions are surfaced in the order that builds context: adoption first, then the AI platform behind the agents, then governance, identity and secrets, the integration layer, and so on. Where the answer is “we don’t know,” I mark it explicitly rather than guessing. That has its own value: items marked as unknown become explicit scope-limitations in the report rather than silent gaps.
I take the session output and produce the risk overview, the two-wave roadmap, and the residual risk outlook. Each finding’s severity is weighed against how the agents are actually used in your environment. The report carries individual analysis and depth rather than a generic checklist.
We go through the risk overview category by category. Your team challenges severities and adds context where it helps. From there we work the two-wave roadmap from the top, agreeing owners and timeline assumptions for Wave 1 items so the document is actionable when you leave the session. The output is the same report with your annotations folded in, plus an action sheet for the first 90 days.
When one agent is your strategic standard, for example Kiro, Claude Code, or GitHub Copilot, I review its managed configuration against a hardening baseline: sandbox mode and network rules, central permission policy, MCP registry, web tools, model access and inference region, update channel, and how the agent is wired into the IDE (for example, Kiro CLI in IntelliJ via the terminal or ACP). You get a configuration baseline you can roll out through MDM, plus the gaps that the vendor’s settings cannot close.
We review progress against Wave 1 items, surface new risks that have emerged since the assessment (new MCP servers, new agents, new repositories in scope), and decide whether the assessment should be re-run on a regular cadence as your posture evolves.

Customer-side and consultant-side time is between two and three days each, split across the two sessions, plus the optional baseline review and follow-up. The calendar duration is typically one to two weeks because the report preparation between the sessions runs asynchronously.

Is this assessment right for you?

This engagement is the right fit when AI coding agents are already in production use across your engineering organization, when leadership or customers are asking how AI-assisted development is governed, or when you have started to feel the gap between heavy MCP adoption and the lack of vetting, logging, and incident response around it.

It is also useful as a baseline before larger architectural decisions: building or buying an AI gateway and running it as SaaS or in your own infrastructure, choosing between vendor cloud background agents and self-hosted alternatives, designing the next iteration of your dev-environment hardening, deciding which repositories should never see a coding agent, or building out the policy that will land in your acceptable-use document next quarter.

If your starting point is earlier, say you are still exploring whether to adopt agents, running a pilot in one team, or your security team is new to this topic, a 3-hour custom focus session on the highest-leverage controls makes more sense than the full assessment. The intro can be turned into the assessment later when you are ready.

For background on the threat patterns this assessment is built around, see my research and blog series, the Coding Agent Security Cheat Sheet (PDF), and the Agentic AI Security engagement, which is the right one if your concern is the AI systems your customers interact with rather than the AI tooling your engineers use.

Ready to assess how AI coding agents are used in your org? Let’s talk about scoping the two-session package for your team.

3-Hour Intro: Securing AI-Assisted Development
Want an overview before scoping a full assessment?
Book a custom 3-hour intro session on the highest-leverage controls for AI coding agent adoption in your org.