Skip to main content
SkillTotal

Is agents safe?

What agents does

agents is Cloudflare's library for building persistent AI agents that run on Cloudflare Workers and Durable Objects. The npm author field lists Cloudflare Inc., and the code lives in cloudflare/agents under the MIT license. Each agent keeps state that survives restarts, syncs it to connected clients over WebSockets, exposes methods to clients through @callable() decorators, and can schedule work, call AI models and tools, and act as an MCP server or client. A React hook, useAgent, connects front ends. You start from npm create cloudflare with the agents-starter template or add it with npm install agents. Before installing, note that Vite projects must extend agents/tsconfig and add the agents/vite plugin for decorators.

No malicious indicators - review capabilities before installing
Notable — review in context (a capability is not a malicious indicator):
  • Node.js shell/command execution
  • Node.js filesystem read
  • Node.js filesystem write/delete

What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.

agents is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: filesystem read, filesystem write, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).

agents 0.33.0

npm package · npm:agents
LOW
0
/ 100 risk score
Snapshot · scanned Nov 13, 2026 · agents@0.33.0 · engine 1.1.0 / ruleset 100

Get notified when this component changes

Change alerts aren't live yet. Leave your email and we'll let you know when they launch. We use it only for this and delete it on request.

Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of agents's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
filesystem readfilesystem writemcp tools detectednetwork egressshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Tool surface
Tool Usage
Execution authority
Tool Access Control / Direct Tool Access
Filesystem reach
Tool Execution Context
Network egress
Interaction & Communication / Direct Communication

Findings (5)

CapabilityNode.js shell/command executionnot scored · severity highST-SHELL-NODE

The component can run operating-system commands or spawn processes.

import { spawn } from "node:child_process";
const child = spawn(file, args, {

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.

CapabilityNode.js filesystem readnot scored · severity mediumST-FS-NODE-READ

The component reads files from disk.

return await drain(await fs.readFile(path));
return TEXT_DECODER.decode(await drain(await fs.readFile(resolvePath(path))));

Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.

Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.

CapabilityNode.js filesystem write/deletenot scored · severity mediumST-FS-NODE-WRITE

The component writes or deletes files on disk.

await fs.writeFile(absolute, typeof content === "string" ? TEXT_ENCODER.encode(content) : content);

Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.

Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.

CapabilityNode.js network egressnot scored · severity mediumST-NET-NODE

The component makes outbound network requests.

fetch(request: Request): Promise<Response>;
const response = await retryDurableObjectOperation(() => namespace.get(id, getOptions).fetch(cloneRequestForFetch(request)), {
async fetch(request) {
const response = await this.lifecycle.runInHostContext(() => fetch(request, target), { request });
const response = await fetch(messagesUrl, {
const response = await fetch(getMessagesUrl.toString(), {
import{createRequire as e}from"node:module";import{execSync as t,spawn as n}from"node:child_process";import{performance as r}from"node:perf_hooks";import*as i from"node:os";import*as a from"node:path";import{dirname as o,join as s}from"node …
static fetch(_opts) {
if (opts.basePath) return PartySocket.fetch({
return PartySocket.fetch({
static fetch(_opts: PartyFetchOptions): Promise<Response>;
const response = await browser.fetch(browserSessionEndpoint(void 0, options), {
const response = await browser.fetch(`https://localhost/v1/devtools/browser/${sessionId}/json/list`);
const response = await browser.fetch(`https://localhost/v1/devtools/browser/${sessionId}`, { method: "DELETE" });
const response = await browser.fetch(browserSessionEndpoint(void 0, normalizedOptions.browser === "kitesurf" ? { browser: "kitesurf" } : {
const response = await browser.fetch(browserSessionEndpoint(sessionId), { headers: { Upgrade: "websocket" } });
const response = await fetch(endpoint, { headers });
const response = await browser.fetch(`https://localhost/v1/devtools/browser/${sessionId}/json/protocol`);
const createResponse = await browser.fetch("https://localhost/v1/devtools/browser", { method: "POST" });
const response = await browser.fetch(`https://localhost/v1/devtools/browser/${sessionId}/json/protocol`);
await browser.fetch(`https://localhost/v1/devtools/browser/${sessionId}`, { method: "DELETE" });
const response = await fetch(endpoint, { headers: _classPrivateFieldGet2(_options, this).cdpHeaders });
fetch(request: Request): Promise<Response>;
return _classPrivateFieldGet2(_agent, this).call(this, route).fetch(new Request(request, { headers }));

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

CapabilityMCP tool surface detectednot scored · severity lowST-MCP-DETECTED

An MCP tool surface (manifest or tool definitions) was found.

modelContext.registerTool(toolDef, { signal: controller.signal });
{"version":3,"file":"webmcp.js","names":[],"sources":["../../src/experimental/webmcp.ts"],"sourcesContent":["/**\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * !! WARNING: EXPERIMENTAL — DO NOT USE IN PRODU …
{"version":3,"file":"webmcp.js","names":[],"sources":["../../src/experimental/webmcp.ts"],"sourcesContent":["/**\n * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n * !! WARNING: EXPERIMENTAL — DO NOT USE IN PRODU …
return server.registerTool(name, {
{"version":3,"file":"x402.js","names":[],"sources":["../../../src/mcp/client/invoker-compat.ts","../../../src/mcp/client/x402.ts"],"sourcesContent":["import type {\n  CallToolRequest,\n  CallToolRequestOptions,\n  Client,\n  ListToolsResult …
const transport = new StreamableHTTPServerTransport({ eventStore: this.getEventStore() });
{"version":3,"file":"index.js","names":["isJSONRPCRequest","WebStandardStreamableHTTPServerTransport","McpServer","LegacyMcpServer","LegacyServer","StatelessMcpServer","StatelessServer"],"sources":["../../src/mcp/server/sse-keepalive.ts",". …

Why it matters: Just context — review which tools it offers and their permissions.

Fix: Review the declared MCP tools and their permissions.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in agents.

Maintain agents?

Check the next package before your agent installs it

The free Claude Code plugin scans each npm, PyPI or MCP package with this report's open-source engine before the install command runs. It runs on your machine and needs no account.

Check your own component

Run the same evidence-backed scan on any MCP server, agent skill, or package.

Scan your own component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →