Manuscript Offprint

arXiv:2610.39155

REALM: Identifying Minimal Task Assets for LLM Agents

Zihou Ren, Byungchul Tak, Long Wang

Abstract

Large language model (LLM) agents often receive access to more files, accounts, and services than a task requires. Prompt injection turns this excess access into an opportunity to redirect execution toward unrelated resources. Applying least privilege therefore requires identifying the assets needed by a task, including assets whose identities emerge only during execution. We present REALM (Required Execution Assets Linked to a Mission), an approach to identifying and maintaining a task's required assets and their permitted uses. The approach represents required assets as Dependency Graph nodes, resolves prerequisite relationships, and admits newly discovered assets through source-scoped selection. It separates discovering an asset from authorizing its use, while preserving the agent's freedom to choose its computation. The REALM Builder maintains the selected grants and projects Asset Files; the Partial API Manager exposes resource-bound Partial APIs to the Agent inside a Task Container. Across 60 clean tasks and 560 injected cases in AgentDyn, it completes 40.0% and 36.4% of tasks and decreases ASR from 16.6% to 0.2% with qwen3.5-flash as the base model.

1 Introduction

An assistant asked to upload an image according to instructions in an email may need that email, the image file, a local checkout, and the destination repository (repo). The account running the assistant may expose an entire inbox, many repositories, and unrelated private files. This gap between the resources a task requires and the resources an agent receives creates an opportunity for indirect prompt injection: instructions embedded in a document or tool result redirect the agent toward effects the user never requested [10, 13, 45].

Such malicious behavior often consists of a sequence of individually permitted tool operations. Reading a file and sending an email are both routine parts of legitimate workflows; reading an unrelated private file and emailing its contents to an attacker-selected mailbox implements exfiltration using the same operations. An allowlist of tool names permits both operation types without distinguishing the requested report delivery from this malicious sequence. The restriction must therefore account for the specific input resources and output destinations required by the task, together with their permitted uses. This motivates our central question: what is the minimal set of assets an agent needs to complete a given task?

We define an asset as an identifiable local or remote resource that an execution reads, modifies, or uses. Examples include a file, a directory, a message, a repository, an account, a recipient mailbox, and a service collection exposed by an application programming interface (API). An asset's identity consists of its resource namespace and canonical identifier; an email address and a local path therefore denote different kinds of assets. Access is specified separately by a scoped grant: the asset, permitted operations, interfaces through which it is used, and extent of access, such as one file or a directory tree.

REALM stands for Required Execution Assets Linked to a Mission. A mission is the trusted user task together with its explicit constraints and authorized delegation. A task's REALM is the set of scoped asset grants selected for that task, with task-derived links explaining why each asset is included. "Required Execution Assets" identifies the resources needed for discovery, intermediate computation, and final effects; "Linked to a Mission" requires their inclusion to follow from the user's purpose, rather than their mere appearance in encountered text. The identification objective is a REALM that is sufficient to complete the task and contains no unnecessary asset access, relative to the available interfaces and their access granularity. We distinguish this asset set from the execution environment used to enforce it.

Minimality is difficult for three reasons. First, natural-language tasks describe required assets before identifying concrete objects: "Alice's email" and "the image and group repo specified there" are requirements whose concrete identities are initially unknown. Second, required assets include prerequisites and intermediate objects. An email may be needed to identify the image and repo, and a checkout may be needed to upload the image. Removing these assets because they are absent from the final output makes the task impossible. Third, the evidence used to resolve an asset is itself an attack surface. A document may contain both the requested recipient and an attacker-selected address. Neither textual mention nor relevance of the containing document establishes that both destinations belong in the REALM.

Existing defenses provide important foundations. StruQ and SecAlign strengthen the model's separation of instructions from data [6,7]; CaMeL enforces information-flow restrictions during program execution [9]. Progent generates task-specific privilege specifications and controls their updates [28], while CapScope derives an authority ceiling and assigns capabilities to individual agents [4]. Graph-based defenses separate planning or authorization from observations [19,34]. These systems already recognize that task intent must constrain authority. We focus on the asset-identification problem within that broader goal: representing which concrete resources a mission requires, why they are needed, and how unknown resources become scoped grants without treating every discovered reference as permission.

Our approach is task-linked asset identification. The REALM Builder first identifies requested outcomes and represents the assets needed to realize them as dependency nodes. It resolves known identities using task literals and provider metadata, and links unresolved nodes to their evidence sources through dependency edges. For example, an edge from image to Alice's email expresses that identifying the required image depends on evidence in that email. Each edge carries a task-derived look-for attribute specifying what information to extract from its source. Nodes retain evidence and progress from unknown to identified to fetched: identification establishes a concrete asset eligible for admission after access checks, while fetching supplies information to resolve dependent nodes. Registered API dependencies additionally identify prerequisite operations and the assets they require. At runtime, observations provide candidate identities, but the REALM Builder selects candidates that satisfy the node's task-derived requirements and records the source of each admission. Reading Alice's email therefore permits discovering the group repo; it does not authorize uploading to every destination in that email. Bounded delegation supports tasks that explicitly ask the agent to follow a document, while preserving the original task as the basis for new access.

This formulation separates asset identity, permitted use, and evidence of necessity. It supports incremental construction of a REALM as information becomes available, without prescribing a fixed sequence of agent actions. It also exposes the two-sided nature of minimality: excess grants expand the attack surface, while missing prerequisites prevent legitimate completion. Multiple sufficient ways to solve a task may exist, so there need not be a unique minimal REALM. Our prototype approximates this objective through task-derived asset descriptions, dependency resolution, and constrained admission; it does not certify that every selected grant is indispensable.

Enforcing the selected asset boundary requires bridging a gap between tool semantics and operating-system observations. Agents receive permission to invoke tools whose arguments identify application-level resources, but system calls expose lower-level objects such as file descriptors and network connections. For example, an email recipient passes through client-library encoding, protocol serialization, and potentially encryption before the request reaches a network system call. A connection to the mail provider identifies the service rather than the recipient; when encryption occurs in user space, the transmitted buffer contains ciphertext rather than the recipient's address. Generic system-call inspection therefore cannot reliably recover the asset targets of arbitrary tools without application-specific decoding and visibility into the relevant plaintext. The intuition is to bind resource-bearing arguments while their meaning is still explicit at the application interface, then enforce access to the resulting bound operations.

The prototype realizes this separation by projecting selected local assets as Asset Files and selected remote access as Partial APIs, whose resource arguments are fixed by the Partial API Manager outside the Task Container before invocation. For example, a grant to deliver the summary to a selected mailbox becomes a sending partial that fixes the recipient while accepting the message body. A private Linux Task Container restricts the Agent's ordinary shell and Python code to Asset Files and Partial APIs, alongside the basic runtime. The Task Container enforces this reachability boundary, while task-linked asset identification determines which files and destinations populate it. Resource selection also remains distinct from payload integrity: access to the right mailbox does not establish that the message body is appropriate.

We evaluate the prototype on 620 AgentDyn cases using one base model for both the REALM LLM and Agent LLM. Clean utility is 20/60; utility under injection is 204/560. The native attack success rate decreases from 93/560 to 1/560.

This paper makes three contributions:

• An asset-based formulation of task least privilege, defining assets, task-linked REALMs, and minimality in terms of sufficient execution with no unnecessary scoped access.

• An approach to identify required assets through dependency nodes, annotated edges, and source-scoped discovery, including tasks whose concrete assets are initially unknown.

• A container-based realization of selected REALMs.

References (47)