Agents

Semantic rules stop agent injections on three benchmarks

Reviewing SecureGARD: Dynamic Ontology-Guided Governance for Secure Tool-Using LLM Agents · Guoqin Xiong, Shengtao Wen, Xiang Chen et al.

Semantic rules stop agent injections on three benchmarks

Researchers put a rule-based gate between an agent's planner and its tools. It judges each action by what it means and what must already be true, and it stops every indirect prompt injection across three benchmarks without crippling the agent. The open question is an attacker who forges the evidence the rules trust.

An email tells your agent to forward the user's files to an outside address. The model is persuaded and writes the tool call. Most defences then face a binary choice: let it through, or block it and risk breaking the task the user actually asked for. This research adds a third answer: not yet.

The system, SecureGARD, sits between the agent's planner and its tools. Every tool call is translated into a description of what the action means. That covers what kind of action it is, what it changes and what role each argument plays. The description is then checked against rules about which actions need which conditions to hold first. It is also checked against a record of verified facts and progress for the current task.

Each action comes back as ready, waiting or forbidden. The decision is deterministic, so no second model is guessing. Waiting means something the action depends on has not been established yet. The agent can replan to satisfy it, but only inside the permissions it already had. Recovery never grants new authority.

That is the clever part, and it explains why the utility numbers hold up. Blunt defences buy safety by refusing anything suspicious, so the agent fails at its job. Here the agent gets a bounded second chance. The researchers tested three benchmarks and five models and report 0% attack success. Undefended agents fell to roughly a quarter to a half of attacks. Task completion under attack also improved over competing defences.

The rules are not edited at runtime. Offline, an LLM proposes new rules from verified training runs. A proposal is accepted only if it fixes an error those runs exposed, stays logically consistent and passes held-out validation. Then the rule set is frozen, and live runs can only add facts. I like that discipline, because nobody can talk the policy into changing mid-task.

Zero is a benchmark result

Benchmark injections are written without knowledge of the defence. The study does not test an attacker who knows the rules exist and what they require. The obvious next move is to plant input that looks like the evidence a forbidden action needs, so it becomes ready. The researchers name this risk themselves, along with poisoning the training runs that feed rule evolution. They also say plainly that zero observed attack success is not a formal guarantee.

There are coverage limits too. The rules express simple prerequisites, not timing, conditions or chains across several actions. Longer tasks and fast-changing tool sets are largely untested. A rule set is only as good as the training runs it learned from.

Still, what surprised me is how well being explicit about an action's meaning worked. It beat both doing nothing and blocking hard. If you build agents, treat the store of verified facts as attack surface, because everything downstream trusts it. The gate holds. The evidence feeding it is the next target.

Further analysis

Problem

This paper studies execution security for tool‑using large language model agents, where indirect prompt injections in untrusted inputs can cause the agent to perform harmful actions. Existing defences tend to operate over concrete tool interfaces, data flows, or trajectories, leaving action semantics, state prerequisites and evidence relations implicit. That limits transfer across heterogeneous tools and makes safe, auditable updates difficult. The work addresses how to govern agent actions with explicit, transferable semantics so that maliciously suggested actions are detected, deferred, or rejected without blanket blocking of useful behaviour.

Approach

SecureGARD introduces a dynamic, executable ontology as a semantic governance layer between planning and tool execution. Tool calls are grounded into semantic action instances whose class, effects, parameter roles and execution context are represented. Governance uses a frozen cross‑task TBox with reusable action–state axioms and an episode‑specific ABox of verified facts, plus a TaskState that records procedural progress, pending actions and unresolved obligations. Runtime reasoning deterministically classifies grounded actions as ready, waiting or forbidden. Waiting denotes an unmet but recoverable obligation and permits bounded replanning that must stay within the agent's authorised boundary. The ontology evolves offline from verified training executions: an LLM proposes instance‑independent axioms from filtered evidence, but edits are accepted only if they address observed ontology errors, preserve logical consistency and protected entailments, and pass held‑out validation. Accepted ontology revisions are versioned and frozen before deployment; online runs may only update ABox and TaskState. The system was evaluated on three benchmarks with multiple LLM backbones and compared to undefended agents and several system‑level defences.

Key Findings

  • SecureGARD achieved an observed attack success rate (ASR) of 0% across AgentDojo, ASB and AgentDyn for all evaluated backbones, while maintaining competitive task utility under benign and attacked conditions.
  • Compared with baselines such as DRIFT, SecureGARD improved attack utility and often clean utility; for example, attacked utility on GPT‑4o‑mini AgentDojo rose from 50.3% to 61.6%, and clean utility on Qwen3.8‑Flash AgentDyn rose from 11.7% to 26.7%.
  • Undefended agents exhibited substantial ASRs (eg 27.3% to 50.0% for GPT‑4o‑mini), and other defences reduced but did not eliminate successful attacks. SecureGARD maintained 0% ASR consistently across five backbones despite variation in clean and attack utility.
  • Offline ontology evolution accepted 24 axioms derived from verified training evidence that reduced an observed ASR on unseen ASB tasks from 4.3% to 0.0% while preserving regression checks. Multi‑seed experiments report CU 57.5±1.5, AU 60.4±0.8 and 0.0% ASR across 1,908 attacked executions.
  • Ablations show semantic execution modelling is most important for utility, ontology state reasoning and goal‑bound admission most strengthen security, and bounded recovery preserves utility without expanding authority.

Limitations

SecureGARD depends on the granularity of seed axioms and the coverage of verified training evidence. Its relation vocabulary currently omits richer temporal, conditional or cross‑action dependencies, and behaviour in longer‑horizon tasks or rapidly evolving tool ecosystems remains underexplored. Offline evolution relies on filtered, verified evidence and a proposer LLM but does not learn from deployment traces; zero observed ASR does not constitute a formal guarantee of security.

Implications

For an attacker, absent explicit semantic governance, indirect prompt injections can redirect tool selection, bind malicious arguments or induce state changes that achieve adversarial goals. SecureGARD shows that grounding actions in shared semantics and enforcing explicit action‑state prerequisites can prevent execution of attack‑aligned actions even when injected evidence appears in inputs. Offensively, an attacker might seek to craft inputs that mimic the structured evidence required to satisfy specific requires relations or to poison training trajectories that feed offline ontology evolution; these vectors underscore that governance must protect evidence integrity and the ontology update pipeline.

The paper title, authors and abstract

SecureGARD: Dynamic Ontology-Guided Governance for Secure Tool-Using LLM Agents

Guoqin Xiong, Shengtao Wen, Xiang Chen, Xinyi Zeng, Zhaoxin Fan, Wei Ye, Xiaofeng Cao, Sheng-Jun Huang

Tool-using large language model (LLM) agents translate model outputs into consequential actions, turning indirect prompt injection into an execution-security problem. Existing defenses constrain tool calls, trajectories, or information flows, but often leave action semantics, state dependencies, and evidence relations implicit, limiting generalization across heterogeneous tools and complicating safe updates. We present \ours{}, a dynamic ontology-guided governance framework. \ours{} grounds heterogeneous calls in a shared semantic representation and combines an executable ontology with episode-level task state to derive deterministic ready, waiting, and forbidden decisions. A waiting decision identifies an unmet but recoverable obligation, enabling bounded replanning without expanding the agent's authorization boundary. \ours{} evolves its ontology offline from verified training executions. An offline LLM proposes instance-independent action--state axioms, which are accepted only if they address ontology errors exposed by training failures, preserve logical consistency and protected entailments, and pass held-out validation before the ontology is frozen. We evaluate \ours{} on AgentDojo, ASB, and AgentDyn under benign and indirect prompt-injection settings. \ours{} achieves a 0\% attack success rate (ASR) across all three benchmarks while improving task utility under attack compared with existing baselines. These results show that explicit semantic governance can strengthen execution security without indiscriminate blocking.