Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
FREEDOM251

Freedom251 › Blog › agent IAM

AI Agent Security Settings: Least Privilege, Sandboxing and Human Approval

By Freedom251 Team · · 10 min read

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

The safest default for an AI agent is deny-by-default access, an isolated execution environment, and a human checkpoint before any action that is difficult to undo. Give the agent a separate identity, short-lived credentials and only the named tools, resources and operations required for one task. Enforce those limits in infrastructure outside the model, record every action in an independent audit system, and make it easy to revoke access or stop the session.

What an AI agent security setting must control

An agent that can call tools is not just a chatbot. It may read files, execute code, query services, send messages or alter systems. A useful security design therefore controls five things for every attempted action: the human who initiated the work, the agent identity, the tool, the operation and the target resource. It also limits how long the grant remains valid.

As an Amazon Associate I earn from qualifying purchases.

Prompt instructions are not an authorization system. A model can misunderstand a prompt, follow hostile text retrieved from a document, or be manipulated into treating an unsafe request as legitimate. Authorization should be decided by a policy decision point, API gateway, service mesh or tool-execution proxy that the model cannot rewrite.

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

OWASP describes this approach as “least agency”: use scoped, revocable identities and tokens and give an agent only the authority needed for its current task. The same principle appears in OWASP DevSecOps guidance and the OWASP AI Agent Security Cheat Sheet.

#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.

Build a deny-by-default permission model

Start with an empty allowlist

Create the agent with no usable permissions. Add one capability at a time after identifying the task it must perform. A permission should name the tool, operation, resource and time window, rather than granting a broad role such as “developer” or “administrator.”

  • Allow named read operations on the specific project or dataset.
  • Allow only low-risk commands that have been reviewed and have bounded inputs.
  • Keep production writes, deletion, permission changes and unrestricted shell access denied unless a separate control explicitly permits them.
  • Block secrets by default, including .env files, credential stores and SSH keys.
  • Block unrestricted network egress and require a policy decision for each new destination.
  • Deny arbitrary package installation; package downloads can introduce both code execution and supply-chain risk.

Task scope matters as much as role scope. A token issued to summarize a folder should not also create pull requests, modify infrastructure or read unrelated repositories. When the task ends, the grant should expire rather than remain available for a later conversation.

Use an attributable agent identity

Create a service account or bot identity for each agent or workload and keep it separate from a developer’s personal account. Every event should carry both identities: the initiating human and the agent that actually invoked the tool. This preserves accountability when an agent acts automatically and prevents a shared human credential from hiding which workload made a change.

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

Separate read-only and write identities. If an analysis task needs repository access, issue a read-only identity; do not give it the same credential used for deployment. Use a secrets manager or an OIDC flow to issue short-lived, task-scoped tokens. Rotate and revoke them promptly, and never put long-lived production credentials in a prompt or in an agent’s environment.

Enforce policy outside the model

Place a control point between the agent and every tool. The control point receives a request containing the human principal, agent identity, tool, operation, resource and grant expiry. It evaluates that request against an allowlist and records the decision before forwarding an approved call.

Rank #2
Yubico - YubiKey 5C NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5C NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5C NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5C NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

This arrangement prevents a prompt injection or a model error from granting itself new authority. The model can request an operation, but it cannot edit the policy, mint a token, change the destination or bypass the proxy. Apply the same check to direct API calls, shell execution, file writes and network connections; securing only the chat interface leaves alternate paths open.

For high-impact operations, bind the authorization to one concrete action. The approval should cover the exact command or API method, arguments, target and expected effect, not a vague approval such as “let the agent deploy.” A changed argument or target should create a new request and require a new decision.

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

Sandbox code execution and tool use

NIST’s 2025 AI profile says arbitrary agent code execution should generally be curtailed, sandboxed, subject to approval and monitoring, or completely disallowed. Treat code download and execution as a high-risk capability even when the requested task sounds routine.

Restrict the execution boundary

  • Filesystem: mount only the working directory and required inputs. Make sensitive host paths unavailable and make outputs explicit.
  • Processes: prevent access to host process controls and privileged operations. Do not expose an unrestricted shell when a narrow tool can perform the job.
  • Network: deny egress by default. Permit only named destinations and protocols, and review every new destination as a separate risk decision.
  • Packages: disable installation unless the package source, version and purpose have been approved. Prefer a prebuilt environment with a known dependency set.
  • Resources: apply CPU, memory and wall-clock limits so loops, recursion or oversized inputs cannot consume the host.
  • System calls: use the strongest practical syscall and privilege restrictions for the runtime. A container boundary is useful, but it is not a reason to grant broad host access.

Run the process or container under the agent identity, not under a privileged operator account. Keep the sandbox disposable where possible: preserve the reviewable output or diff, then destroy the execution environment and its temporary credentials.

Decide when execution is unnecessary

If an agent only needs to classify text, search a known index or propose a change, disable code execution entirely. Removing a capability is stronger than trying to make an unrestricted capability safe with additional prompts. Enable exceptional execution only when the task requires it, with approval and monitoring attached to that specific run.

Rank #3
Yubico - YubiKey 5 NFC - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-A or NFC, FIDO Certified - Protect Your Online Accounts
  • POWERFUL SECURITY KEY: The YubiKey 5 NFC is the most versatile physical passkey, protecting your digital life from phishing attacks. It ensures only you can access your accounts
  • WORKS WITH 1000+ ACCOUNTS: Compatible with popular accounts like Google, Microsoft, and Apple. A single YubiKey 5 NFC secures 100+ of your favorite accounts, including email, password managers, and more
  • FAST & CONVENIENT LOGIN: Plug in your YubiKey 5 NFC via USB and tap it, or tap it against your phone (NFC), to authenticate. No batteries, no internet connection, and no extra fees required
  • MOST SECURE PASSKEY: Supports FIDO2/WebAuthn, FIDO U2F, Yubico OTP, OATH-TOTP/HOTP, Smart card (PIV), and OpenPGP. That means it’s versatile, working almost anywhere you need it
  • PRIMARY & SPARE KEYS: Just like having a spare house key, we recommend buying two YubiKeys - one for daily use and one as a spare. That way you’ll never get locked out of your accounts

Put human approval at irreversible boundaries

OWASP guidance says to keep a human decision where harm is hard to undo and to require explicit approval for high-impact or irreversible actions. The reviewer must be independent of the agent: an agent must never approve its own request or ask another automated step to rubber-stamp it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Action class Default treatment What the reviewer must see
Searches and bounded reads Allowlist after review; log each call Tool, resource, query scope and requesting identity
File or repository writes Require approval unless the change is narrowly pre-authorized Exact files, proposed diff, operation and rollback path
Code execution Sandbox, monitor and approve exceptional runs; disable when unnecessary Command, arguments, image or environment, inputs and limits
External messages Require approval before sending Recipients, channel, full content and attachments
Financial actions Require an independent human decision Amount, currency, payee, account and resulting transaction
Deletion Require approval and a recoverable path Objects, scope, retention impact and restoration method
Deployment or production change Require approval before execution Exact command, target, version, change summary and rollback
Permission changes or new network destinations Require approval; treat as a new trust boundary New grants or destination, owner, purpose and expiry

Present one action per approval where practical. A reviewer should be able to reject a single unsafe step without approving the rest of a tool chain. If the request changes after approval, invalidate the decision and display the new request.

Log and monitor outside the agent

Send structured events to a central system that the agent cannot modify. Record the tool, arguments, identity, initiating user, session, timestamp, result and resulting diff for every call. Redact secrets before storage and retain the records according to your organization’s policy.

Monitoring should detect behavior that differs from the task grant. Alert on attempts to read credential files, bulk reads, unexpected destinations, newly introduced tools and changes to instruction or policy files. A log that records only successful calls misses the most useful evidence; include denied requests, approval decisions and errors.

Maintain a kill switch that revokes the agent’s credentials or pauses execution. Test that switch before production use. Recovery should include revoking active tokens, stopping the sandbox, preserving the audit trail and reverting or isolating changes identified in the last session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
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.

A deployable setup sequence

  1. Describe the task boundary. Write down the input data, permitted outputs, tools, resources and maximum duration. Identify actions that would be irreversible or externally visible.
  2. Create the identity. Assign a dedicated service account or bot identity and record the initiating human for each session. Do not reuse a personal administrator credential.
  3. Issue temporary credentials. Obtain a short-lived token through a secrets manager or OIDC flow. Create separate read and write identities and define how either can be revoked.
  4. Write the allowlist. Start empty, then add named read operations and low-risk commands. Explicitly deny secrets, unrestricted shell, arbitrary packages, unrestricted egress, production writes and permission changes.
  5. Put an enforcement proxy in the path. Make the proxy evaluate principal, agent, tool, operation, resource and expiry before every call. Ensure the model cannot alter the policy or bypass the proxy.
  6. Build the sandbox. Isolate filesystem, process, network, package, resource and syscall capabilities. Make code execution an optional, high-risk feature rather than a default.
  7. Define approval gates. Require independent human approval for writes, execution, messages, spending, deletion, deployment, permission changes and new destinations. Display exact commands and arguments plus the expected effect.
  8. Connect independent logging. Capture requests, decisions, results and diffs centrally, with secret redaction. Add alerts for credential access, bulk reads, new tools and unexpected destinations.
  9. Exercise failure recovery. Test token revocation, session pause, sandbox termination and rollback before allowing production access.
  10. Re-test after every material change. Repeat adversarial testing when prompts, tools, memory, retrieval, model or provider changes. Cap retries, cost, recursion and tool-chain length.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to evaluate an agent-security architecture

When comparing designs or products, evaluate the controls rather than the model’s claimed intelligence. The following questions expose gaps that a feature list can hide.

Evaluation axis Questions to ask
Scope granularity Can access be limited per tool, operation, resource, user and time window?
Enforcement location Does infrastructure make the authorization decision, or is the rule merely written in a prompt?
Isolation strength Which filesystem, network, process, package and syscall boundaries are enforced?
Approval quality Does the reviewer see exact commands and arguments, and is approval bound to one action?
Auditability Are logs complete, centrally retained, tamper-resistant and free of secret values?
Revocation and recovery Can credentials be revoked, sessions paused and changes rolled back quickly?
Operational friction Can low-risk actions be safely allowlisted without creating approval fatigue?

Common failure modes and fixes

The prompt says “do not access secrets,” but the tool can read them

That is a policy statement, not enforcement. Remove the files from the sandbox, deny the path at the proxy or filesystem layer, and alert on attempted access. Keep the denial in place even if a future prompt appears to authorize it.

A read-only agent can still cause damage

Read access can expose sensitive data, trigger expensive queries or enable an unsafe tool chain. Restrict the resource and query scope, cap retries and cost, log bulk reads, and require approval for any action that sends data outside the approved boundary.

Approval fatigue leads to automatic acceptance

Reduce prompts for genuinely low-risk, bounded reads by allowlisting them after review. Keep high-impact actions separate, show a precise diff or command, and require a fresh decision when the target or arguments change.

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

The sandbox is isolated, but the token is not

A strong runtime boundary cannot compensate for a long-lived production credential. Replace it with a short-lived, task-scoped token, separate read and write identities, and verify that revocation stops active calls.

Best Value
Yubico - Security Key C NFC - Basic Compatibility - Multi-Factor authentication (MFA) Security Key and passkey, Connect via USB-C or NFC, FIDO Certified (Pack of 2)
  • The information below is per-pack only
  • 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.

Logs are stored where the agent can edit them

Forward events to a central system outside the agent’s control, include denied requests and approval decisions, redact secrets and test that the agent cannot delete or rewrite its own history.

Testing and change management

Security testing must cover the whole tool chain, not just the model’s responses. Attempt to cross resource boundaries, read denied files, reach an unapproved destination, alter policy or instruction files, exceed resource limits and continue after a token is revoked. Verify that every attempt produces an attributable event.

Repeat adversarial testing whenever prompts, tools, memory, retrieval sources, model or provider changes. Also retest when a new package, network route, permission or approval workflow is introduced. Cap retries, cost, recursion and tool-chain length so a harmless error cannot become an uncontrolled loop.

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

Practical security checklist

  • Is the initial permission set empty?
  • Does every grant name the tool, operation, resource and expiry?
  • Are human and agent identities recorded separately?
  • Are credentials short-lived, task-scoped, rotatable and revocable?
  • Are secrets, unrestricted shell, arbitrary packages, broad egress, production writes and permission changes denied by default?
  • Is code execution isolated and resource-limited, or disabled when unnecessary?
  • Do humans approve deployment, deletion, messages, spending, permission changes and new destinations?
  • Does the reviewer see exact commands, arguments, targets and expected effects?
  • Are logs central, complete, tamper-resistant and redacted?
  • Can a kill switch revoke credentials and pause execution?
  • Are retries, cost, recursion and tool-chain length capped?
  • Is adversarial testing repeated after changes to prompts, tools, memory, retrieval, models or providers?

These controls implement the central advice from OWASP’s DevSecOps Guideline, OWASP’s AI Agent Security Cheat Sheet and OWASP LLM06:2025: keep authority narrow, place authorization and monitoring outside the model, and require a human before high-impact actions.

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.

agent IAMAI agent securityhuman approvalleast privilegesandboxingSecurity Architecture

Leave a Reply

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

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.

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.