Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk5 min

How to Stop an AI Agent from Taking Unwanted Actions or Accessing Sensitive Data

Prompts alone cannot secure an AI agent. Restrict its tools, data, credentials, and execution environment, then enforce policy and approval outside the model.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Stop an AI agent from doing harm by limiting what it can access and execute—not by relying on a prompt to make it behave. Give it only the tools, data, and permissions its task requires; enforce authorization outside the model on every request; require informed human approval for consequential actions; and isolate and monitor its execution.

Why a better prompt is not enough

An AI agent can encounter instructions in a web page, document, email, or tool result that conflict with the user’s request. These are forms of indirect prompt injection: the agent may treat untrusted content as instructions. Even if a model recognizes an attack most of the time, a prompt or model-based guardrail cannot reliably serve as the security boundary.

As an Amazon Associate I earn from qualifying purchases.

The risk grows when an agent has more authority than its task needs. For example, an agent asked only to find an email could become a route for exposing private information if its mail tool can also send messages and malicious content persuades it to forward data. OWASP identifies excessive functionality, permissions, and autonomy as agent risks, alongside data exposure, tool abuse, and goal hijacking.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use layered controls

Build controls so that a missed prompt-injection attempt still cannot exceed the agent’s permitted authority. The model may propose an action; a trusted tool gateway or downstream service should decide whether that action is allowed.

#1 Best Overall
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key C NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key C NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key C NFC via USB-C and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.
Control What it limits What to verify
Capability and permission limits Which tools, operations, resources, and credentials the agent can use Tools and access are limited to the task; read and write permissions are separated where practical.
Authorization at execution Whether a particular request is permitted when it reaches the system that will carry it out Every request is checked against the user, tool, resource, operation, arguments, and applicable policy.
Human approval Consequential actions that warrant a person’s decision before execution The reviewer sees the actual action, target, and relevant parameters—not just the agent’s explanation.
Isolation What code or tools can reach in the filesystem and network Execution is contained, with access limited to the paths and destinations the task requires.
Monitoring and rate limits How quickly or quietly an unexpected action can cause damage Operators can inspect tool activity and downstream effects and respond to anomalies.

Set permissions according to the action’s risk

Inventory what the agent can do before connecting it to real data or services. For each tool, record its operations, accessible resources, credentials, and downstream effects. Classify actions by impact and reversibility. OWASP’s examples below are illustrative, not a universal regulatory standard.

Example action Illustrative risk level
Search documents or read a file Low
Write a file Medium
Send email or execute code High
Delete database records or transfer funds Critical

Use that inventory to remove permissions the task does not need. Prefer a specific read-only email lookup or a constrained file-writing function over a general-purpose shell or an extension that combines broad read and write powers. Restrict access to particular mailboxes, records, repositories, or database tables. Where possible, connect downstream systems with the requesting user’s identity and minimum necessary authorization rather than a shared, high-privilege account.

Enforce authorization where actions execute

Check each proposed tool request at the trusted gateway or service that will execute it. Apply policy to the requesting user, tool, resource, operation, and arguments; do not treat the model’s confidence, rationale, or instructions found in retrieved content as proof of permission. This is complete mediation: each downstream request must be validated, not just the initial user prompt.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Yubico - Security Key NFC - Basic Compatibility - Multi-Factor Authentication (MFA) Key, Connect via USB-A or NFC, FIDO Certified
  • POWERFUL SECURITY KEY: The Security Key NFC is the essential physical passkey for protecting your digital life from phishing attacks. It ensures only you can access your accounts.
  • WORKS WITH 1000+ ACCOUNTS: Compatible with Google, Microsoft, and Apple. A single Security Key NFC secures 100 of your favorite accounts, including email, password managers, and more.
  • FAST & CONVENIENT LOGIN: Plug in your Security Key NFC via USB-A and tap it, or tap it against your phone (NFC) to authenticate. No batteries, no internet connection, and no extra fees required.
  • TRUSTED PASSKEY TECHNOLOGY: Uses the latest passkey standards (FIDO2/WebAuthn & FIDO U2F) but does not support One-Time Passwords. For complex needs, check out the YubiKey 5 Series.
  • BUILT TO LAST: Made from tough, waterproof, and crush-resistant materials. Manufactured in Sweden and programmed in the USA with the highest security standards.

OWASP’s LLM06:2025 Excessive Agency guidance puts the principle plainly: “Implement authorization in downstream systems rather than relying on an LLM to decide if an action is allowed or not.” A model can help identify or explain a proposed action, but it should not grant itself authority.

Put meaningful approval gates around consequential actions

Require a human decision before actions such as deleting data, sending or publishing information, transferring funds, changing access, or deploying to production. The approval request should identify what will happen, to which target, with which parameters, and what information will leave the system. Bind approval to that specific action so a materially changed request needs a fresh decision.

Fail closed if risk classification, policy lookup, approval validation, or required audit logging fails: do not execute the action while the check is unavailable. Avoid asking for approval on every trivial step. Repeated, vague prompts encourage approval fatigue; reserve review for consequential or uncertain operations and make the request understandable enough to judge.

Treat retrieved content as data, not authority

Web pages, documents, emails, tool results, and messages from other agents can contain instructions aimed at the model. They do not have authority to change the user’s task or grant new access. Before executing a proposed action, check whether it is actually needed for the original request and whether its target and arguments fit that request.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Input filtering, output checks, and model-based guardrails can help detect suspicious instructions or actions, but they are supporting controls. OWASP warns that LLM guardrails can themselves be susceptible to prompt injection. They do not replace least privilege, authorization checks, or human approval for destructive actions.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Contain code, files, and network access

Run code and terminal operations inside an OS-level sandbox, container, or comparable execution boundary. Restrict filesystem access to the workspace and network access to necessary destinations; keep sensitive files outside the agent’s accessible area when possible. A narrow tool set is safer than giving an agent general access and hoping it chooses not to use it.

Rank #4
Sale
Thetis Nano-A FIDO2 Security Key Hardware Passkey Device with USB Type A, TOTP/HOTP, FIDO2.0 Two Factor Authentication 2FA MFA, Works with Windows/mac/iOS/Android/Linux/Gmail/Facebook/GitHub/Coinbase
  • Ultra-Compact FIDO2 Security Key - Plug-and-stay or carry on a keychain. This USB-A hardware security key offers portable, always-on protection for desktop and mobile use. (Item Size: 0.75 X 0.74 IN x 0.25 IN)
  • USB-A Hardware Key for All Devices - Works with USB-A ports on PC, Mac, Android, and other laptop/notebook device. Enables secure, cross-platform login with FIDO2.0 passkey support.
  • FIDO Certified Security Key - Meets FIDO and FIDO2 standards. Works with Google, Microsoft, GitHub, Dropbox, and more. Please check service compatibility before purchase.
  • Passwordless Login with Passkey - Supports passkey login via WebAuthn and CTAP2. Enjoy password-free sign-ins where supported. Not all websites or services currently support passkeys.
  • Advanced Multi-Factor Authentication - Offers 200 FIDO2 passkey slots and 50 OATH-TOTP slots. Strong, flexible 2FA/MFA support across various apps and authentication platforms.

Some products provide product-specific boundaries. Microsoft’s VS Code documentation describes workspace-limited access, temporary session permissions, a tool picker, and agent sandboxing. It advises using sandboxing or a dev container when prompt injection is a concern rather than relying on auto-approval rules alone. These are VS Code-specific capabilities; do not assume another agent product has the same controls.

Log activity, limit damage, and test attacks

Keep records of tool invocations and the effects they produce in downstream systems. Monitor for unexpected access or action patterns, and apply rate limits that can slow damage while an incident is investigated. Logs and rate limits improve visibility and containment; they do not prevent an unauthorized request from succeeding if the execution path permits it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test the boundaries before relying on an agent for consequential work. Include adversarial cases such as malicious instructions embedded in a document, attempts to send or delete information, manipulated tool arguments, and requests to access another user’s resources. Confirm that the request is blocked at the tool or service boundary, that approval is required where intended, and that the event is visible to operators.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.