NewThe Mac app is out for Apple SiliconGet it →
Fenzi
blog, safety

What are the risks of agentic AI?

For an agent that runs commands on your machine, the risks are ordinary ones: it follows text it reads, a repository can change its settings, its own checks have bugs, other code can borrow its reach, and it holds whatever you hold. Each of them is in a published advisory or in the vendor's own docs. None of them needs a rogue model.

By Boris Kwemo, , five-minute read

This list is narrower than most. It is for the AI agent a developer runs, such as Claude Code, Codex or OpenCode: a process that reads files, runs commands and calls hosts with your account. Every risk below comes with a report you can read yourself.

It follows text it reads

Anthropic's Security page defines prompt injection as a technique where an attacker tries "to override or manipulate an AI assistant's instructions by inserting malicious text." The text can be a README that says to curl a script, an issue comment, or a page the agent fetched; our prompt injection examples walk through published ones.

The defenses Anthropic lists sit around the model. Commands that fetch from the web, such as curl and wget, are not auto-approved by default, and its best practices end with running scripts and tool calls in virtual machines. The same page says no system is completely immune.

Our list of AI agent security risks covers the wrong file, the wrong host and the prompt that does not hold.

A repository can change the agent's settings

Agents read config from the project folder, so a repository you clone can arrive with its own rules. Advisory GHSA-mmgp-wc2j-qcv7, published 18 March 2026, shows the cost.

Claude Code read the permission mode from the repository's .claude/settings.json before it showed the trust dialog, so a committed "defaultMode": "bypassPermissions" skipped the dialog; version 2.1.53 fixed it.

Headless runs are wider by design. Anthropic's permissions page lists what a repository still supplies when you run claude -p in a folder you never trusted: its hooks, its env block, and the servers in .mcp.json, which connect without asking. Before such a run it suggests --setting-sources user or --bare.

OpenCode's security policy lists malicious config files as out of scope, because users control their own config. Our notes on how OpenCode permissions work show which file wins when a project and your own settings disagree.

The agent's own checks have bugs

The limits an agent sets on itself are software, and they fail like software. In Codex, advisory GHSA-w5fx-fh39-j5rw, published 19 September 2025, let a working directory chosen by the model become the sandbox's writable root, outside the folder you started in. Version 0.39.0 fixed it, and the network block was not affected.

In Claude Code, GHSA-5j29-h97v-84ch, published 5 October 2026, checked that a path was inside the project when it asked, then resolved it again at write time. A symlink swapped in between could send the write to a shell startup file; 2.1.129 fixed it. Our notes on whether Codex is safe and whether Claude Code is safe read these advisories closely.

Both flaws were found, published and fixed. They are still the reason a second boundary belongs outside the agent's own.

Other code can borrow the agent's reach

An agent on your machine is also a tool that someone else's code can call. In August 2025, malicious releases of the nx package ran an install script that searched the machine for text files and credentials, then posted them to a new repository under the victim's own GitHub account. The Nx advisory quotes the script's prompt, which opens "You are a file-search agent."

The way in was ordinary: a GitHub Actions workflow with a bash injection flaw let an attacker take the npm publishing token. The prompt is the new part. A program that already reads your files with your sign-ins was asked to do the searching.

It holds what you hold

On a bare laptop the agent runs as you. Anthropic's Security page says the working directory boundary is a permission prompt, so a shell command you approve can write anywhere your account can. Your ~/.ssh, your cloud credentials and every token in the environment are in reach of any command it runs.

MCP servers bring their own reach. Anthropic reviews the connectors it lists but does not security-audit or manage any MCP server, and OpenCode's policy puts external MCP servers outside its trust boundary.

Any approach that allows network egress can still leak data the agent can read.Claude Code docs, Choose a sandbox environment

"The risk is the model going rogue."

Revision 1: the reports show text it read, settings it was handed, bugs in its checks and reach it already had.

Our notes on the Hugging Face incident read a much larger case the same way.

What to do about each one

Treat what it reads as input. Keep the prompts you will actually read for commands that fetch or send, and read a README's install step before the agent runs it, package names included, since a name a model invented is how slopsquatting works.

Read the repository's agent config first. .claude/settings.json, .mcp.json, opencode.json and hooks are code. For a headless run on code you did not write, start Claude Code with --setting-sources user or --bare.

Keep the agent current. Leave auto-update on, and read the advisories when you pin a version.

Put the boundary outside the agent. A container, a virtual machine or a sandbox runtime that limits files to the project and hosts to a short list still holds when the agent's own check fails.

Keep keys out of reach, and let a person widen the room. Short-lived tokens, nothing in the environment the task does not need, and more access only when a person says yes. That short list is what agentic AI security means to us: directories, hosts, keys, and a person who approves more.

A side note on how we do it

We build Fenzi, which starts the agent inside an OpenShell sandbox with a copy of the project, a short list of hosts and a placeholder in place of the real key; the security model sheet says which layer stops what. It is one way to put the boundary outside the agent, and a container, a virtual machine or a vendor's sandbox runtime can do it too.

So, what are the risks?

Five, and all of them ordinary: text it follows, settings a repository hands it, bugs in its own checks, code that borrows its reach, and the keys it holds. None needs a model that wants anything, and each has a boundary that narrows it. Anthropic's sandbox environments page compares those boundaries by what each one isolates, and is a good place to start.

One line to install.
One command to run.

curl -fsSL https://fenzi.dev/install.sh | sh

Then fenzi run claude. Ask it to open a pull request with the GitHub API, and watch the deny land.