Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 9 min read

The Check Approved a Name, the OS Opened a Different Object: What Object-Bound Confinement Changes for Coding Agents

TL;DR: A recent arXiv paper (Commey, "Names Are Not Objects", October 2026) argues that many exploits against coding agents share one root cause: a gate approves a name (a path, an argument vector, a directory), and a la

TL;DR: A recent arXiv paper (Commey, "Names Are Not Objects", October 2026) argues that many exploits against coding agents share one root cause: a gate approves a name (a path, an argument vector, a directory), and a later step maps that name to a different object. In the author's 74-attack suite, a plain tool allowlist lost 66 attacks, an allowlist plus a typical command sandbox lost 56, and an object-bound broker lost 2. Below: what "name vs object" means, a runnable demo, what the paper measured, and a checklist you can apply to your own agent gate.

Attacks that succeeded against three gate designs

Why do so many agent exploits look alike?

If you read agent security write-ups for a few weeks, a pattern appears. A symlink that points outside the workspace. A trailing dot on a file name that Windows strips. A newline inside a "read-only" command. A repository whose config git discovers by itself. A shell built-in that changes what a permitted program does. Each case has a different CVE, a different vendor, and a different patch. They feel like separate bugs.

The paper's claim is that they are one bug seen from different angles. The gate looks at a string the model produced. The operating system later acts on an object the string resolves to. Between the check and the use, the mapping from string to object can differ from what the reviewer assumed. The gate said yes to a name. The effect landed on an object nobody approved.

That framing matters for engineers because it changes what you fix. Patching each bypass one at a time means writing a new lexical rule for each new trick. Fixing the class means moving the decision from the name to the object.

What does "approving a name" actually look like in code?

Here is the shape of the typical gate, simplified:

def allow(tool_call):
    if tool_call.tool not in ALLOWED_TOOLS:
        return False
    path = normalize(tool_call.args["path"])      # string work
    return path.startswith(WORKSPACE)              # prefix check on a string

Everything here operates on text. normalize handles .. and duplicate slashes. The prefix test confirms the string starts with the workspace path. Nothing in this function touches the file system, so nothing in it can know that workspace/cache is a link to a directory elsewhere.

The paper lists the common ways a name and an object diverge:

  • Path to file: a symlink or junction inside the workspace that points outside it.
  • Argument vector to behavior: an option or environment variable that changes what an allowed program does.
  • Directory to repository: a tool that discovers a nested repository or config on its own and runs what it finds.

In all three, the gate reasoned about the first thing and the effect came from the second.

Can I see the difference in a small demo?

Yes. This script builds a workspace, plants a directory junction (a symlink on POSIX) that points to a folder outside it, and compares a name gate with an object gate. It is a local simulation I ran for this article, not an exploit of any product.

import os, tempfile, pathlib, subprocess, sys
root = pathlib.Path(tempfile.mkdtemp())
work = root/"work"; work.mkdir()
outside = root/"outside"; outside.mkdir()
(outside/"secret.txt").write_text("TOKEN=hunter2")
(work/"notes.txt").write_text("hello")
link = work/"cache"
if os.name == "nt":
    subprocess.run(["cmd","/c","mklink","/J",str(link),str(outside)],capture_output=True,check=True)
else:
    os.symlink(outside, link)

def name_gate(path):
    """Approves the NAME: lexical prefix check."""
    return os.path.normpath(path).startswith(str(work))

def object_gate(path):
    """Resolves to the OBJECT first, then decides on the resolved path."""
    real = os.path.realpath(path)
    return real.startswith(os.path.realpath(work)), real

for rel in ["notes.txt", "cache/secret.txt"]:
    p = str(work/rel)
    ok_obj, real = object_gate(p)
    rel_real = os.path.relpath(real, os.path.realpath(root))
    print(f"{rel:18s} name_gate={name_gate(p)!s:5s} object_gate={ok_obj!s:5s} object={rel_real}")

Output from my run on Windows 11 with Python 3:

notes.txt          name_gate=True  object_gate=True  object=work\notes.txt
cache/secret.txt   name_gate=True  object_gate=False object=outside\secret.txt

The name gate approves both reads, because both strings start with the workspace path. The object gate resolves first and sees that the second read lands in outside. Same inputs, different verdicts, and only one of them matches what the operating system will do.

Even the object gate in this demo is incomplete, and the paper is explicit about why. Resolving a path and then opening it are two steps. If a compromised agent running in parallel can swap the link between them, you have a time-of-check-to-time-of-use race. A robust design checks at use, on the handle that will actually be used, rather than checking early and trusting the result.

What is the proposed design?

The paper calls it Zero-Trust Agent Cells (ZTAC). The agent process runs inside a kernel sandbox. Its only route to files, programs, and the network is a single socket to a broker. The broker does the work a gate normally pretends to do:

  1. Resolve each request to the object it will act on.
  2. Decide on that object, not on the string.
  3. Check at use that the action is landing on the authorized object.
  4. Run spawned programs in a sandbox compiled from the same policy, so a child process cannot widen what the parent was allowed.
  5. Bind approvals to the resolved object and make them single-use, so one human click cannot become a standing grant.

Point 5 is worth a pause. Many gates cache an approval by tool name, so one "yes" covers every later call. Binding approval to a resolved object and consuming it on use removes that whole category of reuse.

The prototype is on macOS and the paper reports 3.2k lines of trusted Rust, excluding dependencies. Code and data are listed at github.com/dcommey/ztac per the paper.

How well did it do against real attack patterns?

The author built a suite of 74 attacks, each with a ground-truth oracle that decides whether the attack really achieved its goal. The suite includes replays of 10 publicly disclosed incidents. The reported results:

Gate design Attacks that succeeded (of 74)
Tool allowlist 66
Allowlist plus a typical command sandbox 56
Object-bound broker (ZTAC) 2

The broker also held 14 attacks for human review instead of deciding automatically. The remaining 58 are my arithmetic (74 minus 14 minus 2), so treat that number as derived rather than quoted.

Outcome of the object-bound broker on 74 attacks

Two details deserve attention. First, adding a conventional command sandbox to an allowlist only moved the loss from 66 to 56. Sandboxing the process does not fix a gate that approves the wrong thing, because many of these attacks use permitted operations on unintended objects. Second, the 2 attacks the broker lost both encode a secret into traffic to an endpoint the policy allows. That is the known hard case for any gate that permits network access: content can ride along inside permitted destinations.

What did it cost?

On a benign workload, the paper reports 43 of 46 operations completed, with 8 approval prompts, and 4 of 7 workflows finishing. A no-op brokered request had a median latency of 4.0 ms, and programs the broker spawned took 8.5 to 18.4 ms longer than without it.

Reported latency cost in milliseconds

So the trade is explicit. You get a large drop in successful attacks, and you accept some friction (prompts, a few workflows that do not complete) and a few milliseconds per call. Whether 4 of 7 workflows is acceptable depends on your product. For an agent that edits code on a developer laptop, a handful of extra prompts may be a fair price. For an unattended pipeline, study which workflows failed and why before adopting the design.

A caution on the evidence: these are the author's own measurements on one macOS prototype, with an attack suite the author assembled. That is normal for a first paper, but it means the numbers show the design is promising, not that another environment will reproduce them. Independent replication on Linux and Windows, with attack suites written by other people, is the next thing to look for.

How do I apply this without rewriting my agent?

You do not need the full broker architecture to benefit from the idea. A practical checklist for an existing gate:

  1. Never decide on the raw string. Resolve to the real object (canonical path, inode or file ID, resolved binary) before applying policy.
  2. Check at use. Open the file first, then verify the open handle. On POSIX, compare the device and inode of the handle with what you approved. On Windows, query the final path of the handle.
  3. Treat options and environment as part of the call. An argument vector is not one thing. The same program with a different flag or variable is a different capability. Approve the whole invocation, resolved.
  4. Stop letting tools discover things. If a tool auto-discovers a repository, config, or plugin directory, either disable discovery or include whatever it will load in the decision.
  5. Make approvals single-use and object-bound. An approval should name what it covers and expire when used. Avoid "always allow this tool".
  6. Sandbox children from the same policy. If your gate permits a program, the program should inherit the gate's limits, not the user's full authority.
  7. Log the resolved object, not just the string. When something goes wrong, the name the model sent is the least useful piece of evidence.

Here is a small check-at-use helper for Linux that implements item 2:

import os

def open_if_inside(path, root):
    root_real = os.path.realpath(root)
    fd = os.open(path, os.O_RDONLY | os.O_NOFOLLOW)      # refuse a final symlink
    try:
        real = os.path.realpath(f"/proc/self/fd/{fd}")   # macOS: fcntl F_GETPATH
        if not (real == root_real or real.startswith(root_real + os.sep)):
            raise PermissionError("handle resolves outside workspace")
        return fd
    except Exception:
        os.close(fd)
        raise

This is a sketch. Directory components still need care (use openat-style walking or O_PATH for strict guarantees), but it shows the principle: decide on the thing you actually opened.

FAQ

What is the difference between a name and an object in agent security?
A name is the string a tool call carries, such as a path or command line. An object is what the operating system acts on after resolving it, such as the file behind a symlink or the behavior an option selects. Gates that approve names can be bypassed whenever the two diverge.

Does a sandbox alone fix this?
Not by itself. In the paper's suite, adding a typical command sandbox to a tool allowlist reduced successful attacks only from 66 to 56 of 74. The sandbox limits the process, but the gate can still approve the wrong object.

What is a time-of-check-to-time-of-use bug here?
It is a race where the gate verifies something and the object changes before the action runs. The defense is to verify on the handle you will actually use, at the moment of use.

What attacks did the object-bound design still lose?
Two, both encoding a secret into traffic sent to an endpoint the policy allows. Any design that permits network access to an endpoint faces this content-in-allowed-traffic problem.

Are the results independent?
They are the paper author's own measurements on a single macOS prototype. They are a strong signal for the approach, and independent replication is the step that would turn them into established evidence.

Where is the paper?
arXiv 2610.14488, "Names Are Not Objects: Object-Bound Confinement for Compromised AI Coding Agents" by Daniel Commey, submitted 10 October 2026.

Further reading

  • The Approval Prompt Said "Copy a Video": How SymJack Turned a Symlink Into Code Execution in Six Coding Agents (earlier post, same series)
  • A Trailing Dot Beat the Agent's Edit Gate: Check the Path the OS Will Open, Not the String the Model Sent (earlier post, same series)

Source: arXiv 2610.14488

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.