Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Agent security

How to Secure AI Agents That Access Business Data and Tools

By Freedom251 Team · · 12 min read

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

Secure an AI agent by limiting what it can identity-wise, technically and operationally do: give it a separate identity with short-lived, narrowly scoped credentials; expose only the tools and records its task requires; enforce authorization in the downstream business system; isolate execution and restrict network egress; treat retrieved content and tool metadata as untrusted; require independent human approval for high-impact actions; and log, monitor, test and periodically review everything.

An agent is not just a chatbot. It combines model output with real permissions, connectors and the ability to change data or communicate externally. A useful prompt can guide behavior, but it is not an access-control boundary. OWASP’s guidance describes the governing idea as least agency: give an agent only the autonomy, tools and access its task requires, only for as long as it needs them.

As an Amazon Associate I earn from qualifying purchases.

Why an agent needs a different security design

A conventional application follows code paths chosen by its developers. An AI agent chooses among tools and arguments at run time based on model output, conversation state and information it retrieves. That information can include customer records, internal documents, email, web pages, logs, tool descriptions and tool responses. If any of those sources contains attacker-controlled instructions, the model may treat them as directions rather than data.

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

The risk becomes material when three capabilities meet:

#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.
  • Private information: the agent can read business, personal or regulated data.
  • Tools: it can query databases, call APIs, send messages, execute code or alter records.
  • Autonomy: it can choose and chain actions without a person checking every step.

OWASP catalogs direct and indirect prompt injection, tool abuse, privilege escalation, data exfiltration, memory poisoning, goal hijacking, excessive autonomy, high-impact action abuse, cascading failures, sensitive-data exposure and supply-chain attacks. The security objective is therefore not to make the model perfectly obedient. It is to make a mistaken or manipulated choice unable to exceed a deliberately small blast radius.

Threats to include in the model

Direct and indirect prompt injection

Direct injection is an instruction supplied by a user who tries to override the agent’s task or policy. Indirect injection arrives through content the agent was asked to process: a document that says to upload secrets, a web page that changes the requested workflow, an email that asks for a payment, or a tool response containing adversarial instructions. A model may not reliably distinguish these strings from legitimate task context.

Keep retrieved material in a separate, explicitly untrusted data channel where the framework supports it. Validate proposed tool arguments outside the model, and make downstream services re-check identity, resource and operation. Prompt filters can reduce some attacks, but they cannot be the security boundary.

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

Excessive functionality, permissions and autonomy

OWASP’s Excessive Agency guidance groups the root causes into three categories. A document assistant that can also delete files has excessive functionality. A read operation using a database identity that can write and delete has excessive permissions. Automatic deletion without a separate confirmation has excessive autonomy. Fix each category independently; removing only one still leaves the others.

Tool and connector attacks

Tool metadata is executable influence. A poisoned description can persuade an agent to call a dangerous endpoint, and a compromised dependency can alter a connector without changing the model. For Model Context Protocol (MCP) deployments, OWASP identifies token mismanagement and secret exposure, privilege escalation through scope creep, tool poisoning, supply-chain tampering, command injection, contextual prompt injection, insufficient authentication and authorization, and inadequate audit telemetry.

Data exfiltration and cascading failure

An agent can combine several individually permitted reads to infer or export information that no single tool call appears to expose. It can also repeat a failing action, trigger another agent, or send an external message that starts a costly chain. Rate limits, transaction limits, destination allowlists and approval gates constrain these combinations.

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
Threat What can happen Primary control
Indirect prompt injection Untrusted content changes the planned action Untrusted-content handling, argument validation and downstream authorization
Privilege escalation A connector or tool obtains broader access than the task needs Short-lived scopes, deny-by-default permissions and separate read/write identities
Data exfiltration Private records are sent to an unintended destination Egress allowlists, destination checks, data minimization and approval
Tool poisoning or tampering Changed metadata or dependencies steer calls Version pinning, review, integrity checks and change monitoring
High-impact action abuse Deletion, payment, privilege change or public communication occurs automatically Independent human approval and transaction limits
Insufficient telemetry An incident cannot be reconstructed or detected Attributable identity, structured logs, alerts and retention policy

Build the control plane before connecting data

Use this sequence for a new deployment or a major redesign. Record decisions in an owner-approved system so that permissions do not exist only in prompts or undocumented configuration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Inventory the agent. Name an owner, business purpose, model and framework. Map every data store, connector, tool, delegated or secondary agent, action and external destination. Classify the data each action can reach and identify the business impact of an incorrect result.
  2. Create a distinct identity. Register the agent as its own workload or application identity. Make calls attributable to both the agent and, where applicable, the requesting user. Ensure the identity can be disabled independently of a person’s account.
  3. Issue temporary credentials. Mint credentials for the specific task or short session, with the smallest practical audience, resource and operation scopes. Support rapid revocation and rotation. Do not place long-lived production secrets in prompts, conversation memory, source code or general agent configuration.
  4. Start from deny. Enable only the tools, methods, fields and resources explicitly required. Remove unused connectors. Avoid unrestricted shell, arbitrary URL fetch, generic database consoles and open-ended code execution.
  5. Enforce policy at the point of action. The API, database or business service must check the agent identity, user identity when relevant, requested operation, target resource, data classification and current policy. A model’s decision is never the authorization decision.
  6. Separate read and write paths. Use different credentials, endpoints or roles for retrieval and mutation where feasible. Make read-only components technically unable to create, modify or delete records.
  7. Isolate execution. Run untrusted workflows in a disposable virtual machine, sandbox or development container. Omit production credentials and unnecessary filesystem mounts. Define what the sandbox covers; a sandbox around the model does not automatically constrain a separately hosted connector.
  8. Restrict outbound network traffic. Permit only the domains, ports and service accounts required for the task. Block direct internet access when it is not needed. Apply destination and content checks before an external upload or message.
  9. Mark and validate untrusted inputs. Treat documents, email, web pages, logs, tool descriptions and tool responses as data, not policy. Validate types, ranges, record ownership, destination and side effects before executing a proposed call. Review changes to tool definitions and connector packages.
  10. Add approval and observability. Route high-impact actions to an independent approver, then log the identity, scope, call, result, approval and relevant context change. Alert on unexpected access, repeated failures, unusual destinations and scope changes.
  11. Test and reassess. Run adversarial tests before launch and after model, tool, dependency, data or workflow changes. Reconfirm that each permission still serves a current business purpose and remove stale access.

Choose the right identity and credential model

The agent should have an attributable identity rather than borrowing a developer’s, administrator’s or employee’s password. A generic service account is safer than a personal credential only when it is narrowly scoped, monitored and independently revocable; “service account” by itself does not make access safe.

Agent-only work

For a scheduled classification or reconciliation job that does not act on behalf of a particular person, use a dedicated workload identity. Restrict it to the exact records, fields and operations required. Issue a short-lived token at run time and bind it to the intended service and environment.

User-delegated work

For an assistant acting for a named employee, preserve both identities: the downstream system should be able to answer which user requested the action and which agent executed it. Delegate only the user’s permitted scope, do not silently elevate it, and apply the agent’s narrower limits on top. A user’s broad access should not automatically become the agent’s broad access.

High-risk separation

Keep credentials for reading sensitive data separate from credentials for changing it. For especially consequential operations, require a second role or approval token that the agent cannot mint itself. Revoke tokens when a run ends, a session expires, a workflow is canceled or an incident is suspected.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Identity approach Appropriate use Required safeguards
Dedicated workload identity Agent-owned scheduled or batch work Minimal scopes, short-lived tokens, independent revocation and run-level attribution
User plus agent identity Actions requested by a specific employee Preserve both principals, enforce the intersection of their permissions and record delegation
Personal or administrator credential Not an acceptable default Replace with a dedicated identity; investigate any existing use and rotate the exposed credential
One identity for read and write Only where the system cannot separate them Compensating controls, narrow endpoints, transaction limits and mandatory approval for mutations

Design tools that cannot do more than the task

A narrow function such as get_invoice_status(invoice_id) is easier to authorize and monitor than a generic database query tool. Define each tool’s accepted inputs, output fields, side effects, maximum result size, rate and destination. Reject unknown arguments and fail closed when a policy decision is unavailable.

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

Prefer typed, bounded operations

  • Use enumerated operations instead of arbitrary commands.
  • Require an explicit resource identifier and verify that the identity owns or may access it.
  • Limit record counts, monetary amounts, time ranges and retry attempts.
  • Return only fields needed for the next step; redact secrets and unrelated personal data.
  • Make mutations idempotent where possible and attach an approval or transaction identifier.

Keep authorization downstream

At the business API or database, evaluate the principal, operation, resource, tenant, field sensitivity and current state. Do not trust a resource ID supplied by the model. Re-fetch authoritative state before a write, check that the requested transition is valid and reject stale or conflicting versions. If the tool invokes another service, pass the original identity and authorization context rather than replacing it with an unrestricted connector identity.

Isolation and egress: contain a manipulated agent

OWASP states that permission prompts are not a security boundary against a manipulated agent; isolation is. A confirmation message inside the same model-controlled loop can be ignored, misrepresented or approved by an automated component. Use technical boundaries outside the model.

Execution boundary

Use a disposable VM or container for workflows that process untrusted files or execute code. Mount only a working directory, run as a non-administrator, disable unnecessary device access and remove the environment after the job. Keep production credentials and host sockets out of the sandbox. If a connector runs outside it, apply equivalent controls at the connector service.

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.

Network boundary

Start with no outbound access, then allowlist required service destinations. Separate internal APIs from public destinations, require encrypted transport, and block direct connections to metadata services, private address ranges and management interfaces unless explicitly needed. Inspect uploads and messages for destination, size, content type and sensitive data before release.

Resource boundary

Set CPU, memory, storage, token, request and execution-time limits. Cap recursion and the number of tools an agent may call in one run. These limits reduce denial-of-service and cascading-failure risk even when every individual call is authorized.

Decide which actions require a human

Human approval should be an independent control, not a request for the model to approve its own explanation. Show the approver the actual target, changed values, destination, identity, evidence used and policy reason. Do not make approval an excuse for broad permissions; the underlying service must still enforce scope.

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.
Action class Default treatment Approval design
Read non-sensitive, task-scoped data Automate within narrow scopes Log the call and apply rate and field limits
Read sensitive or regulated data Restrict fields and purpose Use user-delegated authorization, masking and elevated monitoring; require approval when policy demands it
Internal draft or reversible update Automate only with bounded values Provide rollback, version checks and an audit record
External email, publication or data transfer Require an explicit gate Independent person verifies recipients, content and attachments
Financial commitment or payment Require approval Show amount, beneficiary, limits and fraud checks; separate request and approval roles
Deletion, privilege change or production configuration Require approval and often a second operator Use a narrow, time-limited elevation, precondition checks and tested rollback

Log enough to detect and investigate

Record an immutable event for each run and tool call. At minimum include the agent identity and version, requesting user, credential scope or policy decision, tool and connector version, timestamp, target resource, operation, sanitized arguments, result status, approval identity and relevant state or context changes. Hash or reference large payloads rather than copying sensitive content into logs unnecessarily.

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

Monitor for new destinations, access outside normal resources, unusual volume, repeated authorization failures, denied calls followed by alternate tools, tool-definition changes, token-scope increases and unexpected agent-to-agent calls. Apply rate limits and circuit breakers that pause a workflow when thresholds are exceeded.

Telemetry limits harm and supports response; it does not replace preventive controls. When an alert fires, revoke the agent’s tokens, disable affected connectors, preserve logs and tool-package versions, identify data read or sent, and review downstream changes. Rotate any secret that may have appeared in prompts, outputs, tool responses or logs.

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

Govern MCP and connector supply chains

Maintain an inventory of every server, connector, package and tool definition. Assign an owner, pin versions where practical, verify integrity, review requested scopes and remove components that are not used. Treat a tool description as untrusted input until it has passed the same change review as code.

Review the complete path from model to connector to business system. Confirm authentication and authorization at each hop, prevent a connector from exchanging a narrow token for a broader one, and ensure revocation reaches cached or delegated credentials. Test what happens when a tool disappears, returns malformed data, changes its schema or becomes unavailable; fail closed rather than silently selecting a more powerful alternative.

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

Test the agent like an untrusted operator

Security testing should exercise the real model, tools, identities and downstream policies, not just a prompt template. Include the following cases:

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.
  • A document, email or web page instructs the agent to reveal a secret or call an unrelated tool.
  • A tool description asks for credentials, adds a hidden parameter or claims a broader business purpose.
  • A user requests access to another tenant’s record by changing an identifier.
  • A read-only workflow attempts a write, delete, shell command or arbitrary URL request.
  • A tool returns oversized, malformed or instruction-like content.
  • An agent is asked to repeat a failing payment, message or destructive action.
  • A secondary agent receives a broader scope than its parent and attempts to use it.
  • A token expires, a policy service is unavailable or a connector is downgraded during execution.

For every test, verify the expected denial, the absence of secret leakage, the approval behavior, the log record and the recovery path. Re-run the suite after model changes, prompt changes, connector updates, data-source changes and permission reviews.

Use a practical comparison framework

When evaluating an internal build or an agent platform, compare capabilities rather than marketing labels. Ask for evidence in these areas:

Evaluation axis Questions to ask
Identity and credential lifecycle Can every run be attributed? Are tokens short-lived, scoped and independently revocable?
Resource and action granularity Can access be limited by tenant, record, field, operation, amount and destination?
Downstream enforcement Do APIs and databases re-authorize each call, or is policy left to the model?
Isolation and egress What is actually sandboxed, and can outbound destinations be allowlisted?
Approval and separation of duties Can high-impact actions require an independent approver and a second role?
Audit and response Are tool calls, scopes, approvals, context changes and failures exportable for investigation?
Connector and dependency governance Are versions, definitions, requested scopes and integrity changes reviewable?
Business-system fit Does it integrate with the organization’s existing identity, authorization, data classification and incident processes?

Keep the design current

Permissions drift as tools, data and business processes change. Schedule reviews of the agent inventory, credential scopes, tool definitions, connector dependencies, egress rules, approval thresholds and logs. Remove unused access and rotate credentials after ownership or workflow changes.

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

NIST’s CAISI announcement of January 12, 2026 describes an information request covering indirect prompt injection, data-poisoned models, harmful actions without adversarial input and ways to constrain and monitor agent access in deployment environments. NIST announced an AI Agent Standards Initiative on February 17, 2026, updated February 18, involving industry-led standards and protocols and research on agent security and identity. Those efforts are evolving initiatives, not a completed security standard, so use them as context while maintaining concrete controls in your own environment.

A reference workflow for a sensitive task

Consider an agent that summarizes a customer case and proposes a refund. The safe sequence is:

  1. The employee signs in; the system records the user and starts a short-lived agent session.
  2. The agent receives a read-only case tool limited to that customer and the fields needed for the summary.
  3. Documents and emails are labeled untrusted. The agent may quote them, but their instructions cannot authorize a new tool or destination.
  4. The policy service checks whether the user, agent and case permit a refund proposal and caps the amount.
  5. The agent produces a proposal, not a payment. A separate approval service shows the amount, reason, account and supporting records to an authorized reviewer.
  6. After approval, a narrowly scoped refund tool performs one idempotent transaction and returns a receipt.
  7. The system logs the user, agent, scopes, records accessed, proposal, approval, transaction and result, then revokes the session token.

If any authorization, approval, destination or state check fails, the workflow stops and records the denial. That behavior is more dependable than asking the model to promise that it will follow a policy.

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.

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

Agent securityAI securitybusiness data protectionIdentity and Access Managementleast privilegeMCP securityprompt injection

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.

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.