Subscribe to the Non-Human & AI Identity Journal

How should security teams prevent AI agents from deleting shared files after reading email instructions?

Security teams should separate read access from destructive action rights and require per-action confirmation for any delete, move, or bulk change. They should also validate the origin of instructions inside emails and documents, because content-derived tasks can be malicious even when they look polite and routine. The control point is the connector, not the chat prompt.

Why This Matters for Security Teams

Agentic AI changes the risk from “can the model answer” to “what can the connected system do after the model reads something.” When an agent can process email, open files, and invoke a delete action, a single malicious instruction can become a real destructive event. That makes the connector, token scope, and action policy more important than the prompt itself. The OWASP Agentic AI Top 10 is useful here because it treats unsafe tool access, indirect prompt injection, and weak authorization as primary design risks rather than edge cases.

Security teams often underestimate how ordinary language can carry operational intent. A message that looks like a routine request to “clean up duplicates” or “remove outdated files” may be enough to steer an agent into destructive behaviour if the workflow trusts content instead of verified intent. That is especially dangerous in shared drives, collaboration suites, and mailbox-connected assistants where the same identity can read broadly but should act narrowly.

In practice, many security teams encounter the deletion problem only after a shared folder has already been altered by an agent that followed a convincing email instruction rather than through intentional privilege design.

How It Works in Practice

The safest pattern is to split the workflow into discrete trust zones. Reading email, summarising content, and drafting a proposed action can be low risk. Executing delete, move, share, or bulk-edit operations should require a separate authorisation step that is evaluated by policy, not by the language model. This aligns with the NIST AI Risk Management Framework, which emphasises governance, mapping, measurement, and management across the full AI lifecycle.

  • Give the agent read-only access to email content unless a specific task truly needs write access.
  • Use per-action approval for destructive operations, especially deletes and permission changes.
  • Require the connector to verify instruction provenance, sender trust, and task context before allowing execution.
  • Log the exact email, file, and action decision so investigators can reconstruct why the agent acted.
  • Constrain bulk operations with thresholds, cooldowns, and human review for high-impact changes.

Operationally, the best control point is the connector layer, API gateway, or orchestration service. That is where the system can inspect the source of the instruction, compare it with allowed actions, and block unsafe requests before the agent reaches the file system. This is also where teams should apply policy that distinguishes between “content that may be summarised” and “content that may authorise action.”

Threat modeling should include indirect prompt injection, malicious forwarding, compromised mailboxes, and poisoned attachments. The MITRE ATLAS adversarial AI threat matrix helps teams map how prompt manipulation and tool abuse can combine into real operational impact, while the CSA MAESTRO agentic AI threat modeling framework is useful for reasoning about multi-step agent workflows and control placement.

These controls tend to break down when the agent is granted broad workspace admin rights in the same identity used for everyday email triage, because the policy boundary disappears and every instruction becomes a potential command.

Common Variations and Edge Cases

Tighter action gating often increases workflow friction, requiring organisations to balance automation speed against the risk of irreversible file loss. That tradeoff is real, especially when teams want an agent to handle routine mailbox cleanup or document lifecycle tasks at scale. Current guidance suggests that high-volume convenience should never override explicit control over destructive actions.

There is no universal standard for this yet, but best practice is evolving toward contextual approvals for any action that changes shared state. For example, an agent may be allowed to flag candidate files for deletion, but a human or separate policy engine should confirm the final delete. This is particularly important when email instructions arrive from external senders, forwarded threads, or compromised internal accounts that appear legitimate on the surface.

Security teams should also watch for cases where “delete” is embedded in a broader request such as archive, deduplicate, or reorganise. Those verbs can mask the same underlying risk if the agent interprets them too broadly. The OWASP Top 10 for Agentic Applications 2026 remains relevant because it reinforces that the model’s reasoning may be persuasive while still being unsafe.

In regulated or highly collaborative environments, teams should add retention rules, legal-hold checks, and object-level versioning so that a mistaken delete can be reversed quickly. When those safeguards are absent, the guidance breaks down in mail-connected agents that operate across shared drives, because the agent cannot reliably distinguish legitimate housekeeping from attacker-supplied instructions.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP Agentic AI Top 10, MITRE ATLAS and CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
OWASP Agentic AI Top 10 A3 Indirect prompt injection can turn email text into destructive tool use.
NIST AI RMF GOVERN Governance defines who can authorise agent actions and under what policy.
MITRE ATLAS AML.TA0001 Prompt manipulation and tool abuse map to adversarial AI attack patterns.
CSA MAESTRO Multi-step agent workflows need control points at orchestration boundaries.
NIST CSF 2.0 PR.AC-4 Least privilege limits what an agent can delete after reading instructions.

Assign accountability, approval rules, and oversight for agent actions that change shared data.