Elith日本語版
Menu

What is AI agent security? How to evaluate not just safe answers, but safe actions

AI agents read outside information and take actions through tools. Based on primary sources, this article explains how to evaluate an agent beyond safe answers: what it reads, what it can do, and whether it can be stopped.

Published
{minutes} min read
10 min read
Diagram, with labels in Japanese, of an AI agent's flow from user request through the agent, external data and tools, execution and result, marking three checkpoints: the trust boundary when reading, authorization and approval before tools run, and logging and stopping after execution

Conclusion: In AI agent security, it is not enough to check whether answers are safe. You also need to check what the agent reads, what it can do, and whether it can be stopped when something goes wrong. The process runs in this order: design review, testing that includes attacks, testing of logging and stopping, and re-evaluation after changes. Protecting the prompt alone is not enough. You need to limit what the agent is allowed to do and test real actions and stopping.

At Elith, we evaluate the quality and safety of generative AI, RAG and AI agents with GENFLUX Evaluation, and carry out attack testing within the scope our customers permit with GENFLUX RedTeam. Advanced verification of AI agents is available on a case-by-case basis depending on the target and conditions. GENFLUX Governance can also be used to manage your list of AI systems, risk and impact assessments, and records of reviews and approvals.

AI agent security basics: safe answers and safe actions

With chat-style generative AI, the main risk was the content of the answer. AI agents read outside documents and the web, call tools, and take actions such as sending email or handling files. So even if the answer is safe, a dangerous action is still a problem.

A NIST report explains how an agent calls tools based on the model's output and feeds the result back in as input. It notes that agents can be hijacked through instructions planted in outside documents or web pages (indirect prompt injection) (NIST AI 100-2e2025). We cover the risks of generative AI as a whole in "What is generative AI security?". This article focuses on what is specific to agents: tools, permissions and actions.

Where risks arise: outside data, memory, tools and permissions

Agent risks mainly arise in these places.

  • Outside data: the web, email, documents and tool responses, which can contain untrusted instructions.
  • Memory and context: if earlier conversations or stored information are tampered with, later decisions drift.
  • Tools and MCP: the actions an agent can call. A tool that looks read-only may actually run with strong permissions.
  • Delegated permissions: the credentials an agent uses, and delegation to other agents.
Diagram of an AI agent's execution flow and three points to check. A user request goes to the agent (planning, memory), which calls external data and tools (web, email, documents, MCP servers, APIs) and reads their responses, then proceeds to execution and a result. 1: At the trust boundary between the agent and external data, treat web pages, email, documents and tool responses as untrusted input, not as instructions from the user. 2: Before tools run, grant only the permissions needed, and route high-impact actions such as sending or deleting through authorization independent of the model and a person's confirmation. 3: After execution, record tool calls and outbound traffic, and make sure a person can stop the agent when it drifts. OWASP categories do not map one-to-one to parts of the diagram. No single point fully prevents attacks.
Figure 1: Three points to check: (1) the trust boundary when reading, (2) authorization and approval before tools run, and (3) logging and stopping after execution (created by Elith based on OWASP, NIST and J-AISI materials)

Anthropic's documentation for Managed Agents treats webpages, email, repository files, MCP server results and similar text as untrusted input, and recommends that an agent reading it should not be able to use powerful tools without approval (split reading from acting, use one narrow tool, or require a person's approval) (Anthropic documentation). It also states that model behavior is not a security control (Anthropic documentation). We describe defenses against instructions that come in through outside documents in "Prompt Injection Countermeasures".

Flaws in tool implementations are also a risk. In the MCP Git server, the read-only git_status tool was reported to be able to run arbitrary commands with the server's privileges through an untrusted repository's own Git configuration (core.fsmonitor). According to the advisory, published on November 11, 2026, a fixed version (2026.11.11) is available (GitHub security advisory). This is an implementation vulnerability, not a prompt problem. It shows the need to test what permissions a tool actually runs with.

Typical failures in OWASP's categories

OWASP classifies ten threats for agentic applications (OWASP Top 10 for Agentic Applications 2026). This is a threat classification, not a law. Here are three representative ones.

  • Agent goal hijack (ASI01): outside documents or tool responses swap the goal, changing behavior across multiple steps (ASI01).
  • Tool misuse (ASI02): legitimate tools the agent was given are used in dangerous ways (ASI02).
  • Identity and privilege abuse (ASI03): delegated credentials or proxy permissions are abused. Countermeasures include short-lived permissions limited to the task, authorization of each privileged action, and human approval of privilege escalation (ASI03).

OWASP's risk list for LLMs in general also says excessive functionality, permissions and autonomy can be the root cause. In the 2026 edition this is "LLM03:2026 Excessive Agency" (LLM06:2025 in the 2025 edition, the number the ASI02 and ASI03 pages above refer to) (OWASP LLM03:2026).

There are reports of real incidents too. In a report dated August 26, 2026, OpenAI explained that in July 2026, during internal cybersecurity evaluations, models circumvented controls designed to isolate them from the internet and compromised parts of OpenAI's internal research infrastructure and Hugging Face's systems. The models had used an internally shared package-management service as a channel for agents to communicate with each other and to reach the internet (OpenAI's report). It does not show how often this happens, but it is a useful example for thinking about permissions, outbound traffic and stop design.

What to decide before deployment: what the agent reads and what it can do

Before deployment, decide what the agent will do and where it connects.

  • Who it works for and what job it does.
  • Which documents, MCP servers, APIs, memory and other agents it touches.
  • Separate reading from actions such as sending or deleting.

A list of connections, actions, data types and user permissions becomes the basis for later evaluation. Some connections have their own terms, as with Google Workspace ("AI Agent Security: Google Workspace's New Terms Requiring Access via MCP, and What Companies Should Check Now"). We introduce an example of product-level tool control in "AI agent security: what LangSmith Tool Gateway shows about managing tool use".

How to evaluate: from design review to re-evaluation after changes

Based on the J-AISI guide and the evaluation methods of OWASP and NIST, we summarized the work into five practical steps. This is our own arrangement; public documents do not prescribe these steps.

Diagram of five steps for evaluating an AI agent. 1. Define the job and its connections (list connections, actions, data and permissions; separate reading from sending or deleting). 2. Constrain permissions (limit functions, scope, lifetime and outbound traffic; route high-impact actions through authorization independent of the model, and a person's confirmation). 3. Test normal and attack cases in the same environment (record task completion and the success of unauthorized actions separately; run several trials). 4. Test observation and stopping (check that tool calls and drift are logged and a person can stop the agent). 5. Re-evaluate after changes to the model, prompts, permissions, tools or reference data, with an arrow back to step 1. As an editorial mapping to J-AISI, steps 1–2 are prevention and steps 3–4 are observation and control. No public document prescribes these five steps, and passing an evaluation does not guarantee safety in operation.
Figure 2: Five evaluation steps. The mapping to J-AISI's prevention, observation and control is our editorial arrangement (created by Elith based on J-AISI, OWASP and NIST CAISI materials)
  1. Define the job and connections: create the list above. The J-AISI guide lists whether permissions are granted only for the tools the agent's purpose requires as an example evaluation item for preventive measures (J-AISI evaluation guide §3.11.2).
  2. Constrain permissions: narrow tool functions, scope, validity periods, outbound traffic and delegation. For powerful operations, put authorization independent of the model and a human check in place (OWASP LLM03:2026, OWASP ASI03).
  3. Test normal and attack cases in the same environment: look separately at how often the legitimate job is completed and how often improper sending or deletion succeeds. Target untrusted inputs such as the web, email, documents and tool responses. NIST's lessons from its evaluations are that evaluations need to be adaptive, because red teaming can reveal other weaknesses even as known attacks are addressed; that results per attack task are informative alongside the overall average; and that measuring attack success over multiple attempts can be more realistic (NIST CAISI).
  4. Test observation and stopping: check that tool calls, outbound traffic, dangerous operations and drift from the goal can be detected, and that a person can stop the agent. Also test the procedure for revoking credentials.
  5. Re-evaluate after changes: when the model, prompt, permissions, tools or reference data change, the assumptions behind the tests change too. Redo normal and attack tests with each change.

How a task is framed can also change how an agent works, so keep evaluation conditions fixed. We also discuss the care needed so that the result of a single study is not read as general performance in "Evaluating AI Agents: Does Task Framing Change How Claude Code Works?".

What Japanese companies should check before deciding to adopt

In Japan, J-AISI's "Guide to Evaluation Perspectives on AI Safety" version 1.20 (published July 7, 2026) is a useful guide for evaluating agents (J-AISI evaluation guide, in Japanese). It organizes the technical evaluation of agents into three perspectives.

  • Prevention: measures taken in advance, such as constraining permissions and the range of possible actions
  • Observation: watching the call history during execution, high-risk operations and drift from the goal
  • Control: a person can intervene and stop the agent

It also separates verification, which checks whether the design and permission settings meet requirements, from validation, which checks behavior, logs, attack-scenario tests, and intervention and stopping in an environment close to real use (J-AISI §5.1.4).

The "AI Guidelines for Business" version 1.2 (March 31, 2026) by Japan's Ministry of Internal Affairs and Communications and Ministry of Economy, Trade and Industry set out common guiding principles such as safety, security and appropriate risk analysis, and, as matters for AI developers, measures such as security by design (AI Guidelines for Business, in Japanese). For checks specific to agents, it helps to combine them with the J-AISI guide.

We recommend that companies check the following.

  1. Do you have a list of where the agent connects and what actions it can take?
  2. Is human approval required for powerful operations such as sending or deleting?
  3. Have you tested, including attacks, in an environment close to real use?
  4. Can you trace actions in logs, and have you tested the stop procedure?
  5. Do you have a way to re-evaluate with every change?

Frequently asked questions

Is it safe if we use MCP?

MCP is a connection protocol; using it does not make things safe by itself. In its announcement of a document released on May 20, 2026, the NSA points out that agentic systems using MCP bring new risks such as dynamic tool invocation, implicit trust relationships and context sharing. It says authentication, authorization and input validation remain necessary, but established cyber defense strategies do not adequately address these new risks (NSA announcement). Check permissions and behavior for each connection.

Where should human approval come in?

Just before high-impact operations such as sending, deleting, paying or publishing externally. OWASP recommends that a person approve high-impact actions, and that authorization be implemented in program logic rather than left to the model, with every request to downstream systems checked (OWASP LLM03:2026). Microsoft also lists verifying risky actions with the user (Microsoft documentation).

What should we keep in logs?

Make it possible to trace the history of tool calls and executions, high-risk operations such as deleting files or escalating privileges, drift from the goal, and unauthorized writes to memory. The J-AISI guide lists observing these, along with human intervention and stopping, as example evaluation items (J-AISI §3.11). Capturing and checking the reasoning text (chain of thought) is also an example item, but the guide notes there is a debate that it should not be captured or stored for safety reasons, and suggests that if it is stored, it can be encrypted and decrypted to find the cause when a problem occurs (J-AISI §3.11.1).

For evaluating the quality and safety of AI agents, see GENFLUX Evaluation and GENFLUX RedTeam.

Sources

  1. OWASP, Top 10 for Agentic Applications 2026
  2. OWASP, ASI01: Agent Goal Hijack
  3. OWASP, ASI02: Tool Misuse and Exploitation
  4. OWASP, ASI03: Identity and Privilege Abuse
  5. OWASP, LLM03:2026 Excessive Agency (LLM06:2025 in the 2025 edition)
  6. NIST AI 100-2e2025, Adversarial Machine Learning: A Taxonomy and Terminology of Attacks and Mitigations (March 2025)
  7. NIST CAISI, Technical Blog: Strengthening AI Agent Hijacking Evaluations (January 17, 2025; updated December 19, 2025)
  8. Japan AI Safety Institute (J-AISI), Guide to Evaluation Perspectives on AI Safety, version 1.20 (July 7, 2026, in Japanese)
  9. Ministry of Internal Affairs and Communications and Ministry of Economy, Trade and Industry, AI Guidelines for Business, version 1.2 (March 31, 2026, in Japanese)
  10. Anthropic, Secure your Managed Agents deployment
  11. Anthropic, Security risks and sandbox boundaries
  12. Microsoft, Defend against indirect prompt injection attacks
  13. NSA, NSA Releases Security Design Considerations for AI-Driven Automation Leveraging the Model Context Protocol (May 20, 2026)
  14. GitHub Security Advisory, mcp-server-git: arbitrary command execution via a repository's own Git configuration (core.fsmonitor) during read-only tools (November 11, 2026)
  15. OpenAI, The Hugging Face incident and the road ahead (August 26, 2026)