
Route coding agent installs through AWS Continuum
I tested AWS Continuum for software supply chain with a coding agent, and it blocked every risky package it saw. See how to route every install through it.
Series: A study on AI in the product lifecycle (10 articles)
- …
- 6Route coding agent installs through AWS Continuum This article
Global Sr. Solutions Architect, Private Equity
Coding agents now install open source packages and Model Context Protocol (MCP) servers, which give an agent its tools. AWS Continuum for software supply chain checks each one before it installs and blocks those it identifies as malicious or that break your rules. I tested whether that check still protects you when the agent, not a developer, decides what to install and how, using Kiro CLI, the command line version of the AWS agentic integrated development environment (IDE).
Continuum's decision held every time an install reached it. With the rules switched on, no risky package went into the app in 68 runs, and the agent never tried to get around a deny. The risky servers that did start never reached Continuum. Kiro starts MCP servers itself, out of reach of my instructions and hooks. I took
npx , the npm command that downloads and runs a package, off the agent's path to force launches through the check. The agent found npx again in the Homebrew package manager's folder and started a denied server, one that can read and write files, in four of four runs. It never saw a deny, only a missing tool, and it fixed the tool.My view is that an agent respects a verdict it can see and fixes a control it can edit, so route every install through Continuum in a way the agent can't change.
What I tested
I gave Kiro small tasks on a test app built from a real backend's dependencies, and each task needed one package. Some packages were safe, and some were versions with known vulnerabilities, including two MCP servers. I installed no real malicious package, so harmless packages I blocked by name played that part. Continuum ran with five rules of mine, one of which blocks anything Amazon Inspector rates HIGH or CRITICAL. Installs went through
cscf , the Continuum command line tool, which checks each package as it downloads. Each task ran twice under each setup. Of the 108 package runs, 68 had the rules switched on, 44 with steering, meaning standing instructions Kiro reads, or a hook, and 24 with the wrapper, and the rest were baselines. Another 56 runs covered MCP servers. I ran the two critical package versions and the two vulnerable MCP servers only under setups meant to block them before download.The agent respects a verdict it can see
After a deny, the agent never tried another registry, a git URL or a package archive downloaded by hand. In 5 runs it upgraded to a patched release that Continuum allowed, such as ejs 3.1.10, and in the rest it wrote the function itself or stopped and reported the block. In a pilot run, after reading the script that routed its installs through
cscf , it wrote "I won't bypass an intentional security control (e.g. by calling the real npm directly or fetching the tarball by hand)."Make the deny reach the agent. When installs run through
cscf , the agent gets Continuum's answer and acts on it, while a hidden or blocked tool only gives it a problem to solve.Only a wrapper on the path covered the shell and the MCP launcher
An agent can install a package three ways. It can run an install command in its shell, Kiro can start an MCP server from its configuration, and the agent can repair its own environment when a tool it needs is missing. Instructions in Kiro's steering files and hooks only see the shell, because Kiro starts MCP servers on its own. When I took
npx away to close that gap, the agent repaired its environment, put npx back and launched the server anyway. Figure 1 shows the routes before and after.
Figure 1. Install routes before and after a wrapper on the path.
What worked was a wrapper, two short scripts named
npx and npm placed first on the agent's path. Kiro's launcher uses the same path as the agent, so the shell and the launcher both went through the wrapper to Continuum, which denied both vulnerable servers before download in every run. Mine covered only installs and let undecided packages through, so have yours send every npm and npx command through cscf , including npm exec , and block any package Continuum can't decide. Give every session an empty package cache, since a cached package installs without a check. Keep a Kiro hook on shell commands as a second guardrail. Have it exit with code 2 to block. The documentation says any non-zero code blocks, but in Kiro CLI 3.6 code 1 only warned.The agent can still edit the wrapper and its own settings. In one run it wrote the full path of the real
npx into a server's configuration, which would skip a wrapper altogether. The next step, which I haven't tested, is to make Continuum the only way package traffic leaves the agent's machine, and to make the wrapper and the agent's settings read-only to the agent.A build check fails every lockfile until you excuse what you inherited
The build is where every package the app uses meets the check again. A build step that runs
npm ci through cscf installs every package version recorded in the app's lockfile and checks each one, including packages the app already had. On the first run every lockfile failed, the untouched one included. The cause was three vulnerable packages that came in with express 4.18.2. Figure 2 shows how exceptions fix that.
Figure 2. Turning on the build check, in three steps.
An exception tells one Continuum rule to allow one named package. Pinned to an exact version, it excused what the app inherited and nothing else, and every risky change still failed. The express upgrade still failed, because its newer packages had their own HIGH ratings and no exception named them, so expect each upgrade to come back for review. Pinned to a name only, an exception let a second vulnerable version of qs through. Pin every exception to a version, give it an expiry, and put the owner and the fix ticket in its justification. An excused package also installs on the agent's machine without a deny, so check why Continuum allowed a package before you trust it.
Start with the rules in audit mode, where they only log what they would block, and run it in a temporary build. Do this before the wrappers reach agent machines, because audit mode covers the whole policy and would let every agent install through. Then clear the caches, switch the rules to block, and add
CSCF_FAIL_CLOSED=1 cscf npm ci --ignore-scripts as an AWS CodeBuild step, with the buildspec kept in the CodeBuild project, out of the agent's reach. I ran the same command outside CodeBuild. The build can't see an MCP server an agent starts on its own machine, so it sits behind the wrapper as a second check. Add it to the deterministic checks in step 2 of Gate agent-written pull requests with AI code reviewers .What should you ask your team?
Platform engineering owns the routes, and security owns the policy and its exceptions. The package decisions across these tests cost well under a dollar, and the work is in the routing.
- What are all the ways our agents install code, including MCP servers they start themselves?
- Which of those routes go through a check, and can the agent edit any of them?
- How many builds would fail if we switched on the build check today, and which exceptions would we accept?
These results come from one app, one model (Claude Opus 4.8 in Kiro CLI 3.6 and 3.8), npm and
npx only, and cooperative tasks in which every prompt named its package. I tested the hook and the wrapper separately, and I didn't test agent skills, MCP servers started any other way than npx , Kiro's tool permissions or version-range rules. I set the tasks and approved the specs and checks, and an AI assistant helped me draft them. Part 1 of this series describes trust in coding agents growing from targeted to one-shot to autonomous. An agent that installs its own packages works at the autonomous level, and a route it can't edit is part of what earns that trust. The wrapper is the first step, and a boundary the agent can't edit is the second, which is the platform team's to build and test.
Can your coding agents change the route their installs take?
- No, routing is enforced outside the agent
- Yes, through their path or configuration
- I don't know every route they use
- Our agents don't install packages yet
Further reading
- Measure AI developer productivity from idea to production (AWS Builder Center)
- Introducing AWS Continuum for software supply chain (AWS What's New)
- AWS Continuum adds end-to-end security for AI agents (About Amazon)
- Gate agent-written pull requests with AI code reviewers (AWS Builder Center)
- Secure AI-generated code across the SDLC on AWS (AWS Builder Center)
- Hook actions (Kiro documentation)
About the author
Michael Purpura is a Senior Global Private Equity Solutions Architect at AWS. He works with private equity firms and their portfolio companies to structure AI adoption around measurable business outcomes.
Series: A study on AI in the product lifecycle (10 articles)
- …
- 6Route coding agent installs through AWS Continuum This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article