The best security practices for AI workflow platforms are to treat every model input as untrusted, give each agent only the tools and data its task needs, require human approval for irreversible actions, minimise the data sent to models, log every agent action in an append-only audit trail, and test with prompt injection and red teaming after every material change. Prompt injection is the top risk in the OWASP Top 10 for LLM Applications 2026.
Key takeaways
- Prompt injection is the top LLM risk in 2026, and it arrives through data, not just through user messages.
- Give each AI agent its own identity, least-privilege tools and short-lived credentials, and enforce limits outside the model.
- Require human approval for irreversible actions and keep an append-only audit log of every agent decision.
An AI workflow platform does more than answer questions. It reads email, fetches documents, calls tools, writes to databases and sends messages, often without a human watching each step. That autonomy is the point, and it is also the risk: a manipulated model can take real actions, not just give wrong answers.
What is AI workflow security?
AI workflow security is the set of controls that keep an automated workflow safe when a language model is part of it. It covers the data the model sees, the tools it can call, the actions it can take and the record it leaves behind.
Traditional automation follows fixed rules, so its risks are mostly about access and data handling. AI workflows add new risks: prompt injection, data leakage through prompts, excessive agency and unbounded consumption. The OWASP Top 10 for LLM Applications 2026 lists prompt injection first, sensitive information disclosure second and excessive agency third, which tells you where to start.
What are the main risks in AI workflow platforms?
The main risks are prompt injection, sensitive information disclosure, excessive agency, supply chain and data poisoning, unbounded consumption and improper output handling. Each one maps to a real failure mode in a workflow, not just a theoretical attack.
| Risk | What happens | OWASP 2026 | First control |
|---|---|---|---|
| Prompt injection | Hidden instructions in data override your instructions | LLM01 | Separate instructions from data, inspect inputs |
| Sensitive information disclosure | Model reveals credentials, personal data or other tenants data | LLM02 | Classify and minimise data before prompts |
| Excessive agency | Agent has more tools or permissions than its task needs | LLM03 | Least privilege, authorise outside the model |
| Supply chain | Tampered model, tool or plugin enters the workflow | LLM04 | Pin versions, check provenance, scan artifacts |
| Data and model poisoning | Poisoned training or retrieval data changes behaviour | LLM05 | Validate data at ingestion, version datasets |
| Unbounded consumption | Runaway tokens, loops or cost from agent actions | LLM06 | Rate limits, token budgets, recursion caps |
| Improper output handling | Generated code or commands run without validation | LLM10 | Validate and encode output for its destination |
Two of these deserve special attention. Prompt injection arrives through data the agent retrieves, not just through the user, so a crafted email or document can hijack a workflow that never talks to an attacker directly. Excessive agency turns that hijack into damage, because an agent with write access to a database or an email system can act on the injected instruction.
1. Inventory every AI workflow before you secure it
You cannot secure what you have not listed. Inventory every AI path in your business: who owns it, what it does, which model and provider it uses, which identity it runs as, what data it touches, which tools it can call and where it runs. Include shadow AI, the tools staff use without IT approval.
For each workflow, write down the worst thing that could happen if the model is manipulated. A workflow that drafts marketing copy has a low ceiling. A workflow that reads customer email and issues refunds has a high one. That ranking decides where your controls go first.
Review the inventory when a workflow changes, when a new model is added or when a new tool is connected. An AI inventory that is six months old is a list of workflows that no longer exist.
2. Minimise and classify data before it reaches the model
Only send the model the data the task actually needs. Define what may enter each provider, remove unnecessary fields, mask personal identifiers and tokenise secrets before they reach a prompt. Data minimisation is the cheapest control in AI security, and it limits the damage when a prompt or a log leaks.
Classify data by sensitivity and keep high-sensitivity data in separate indexes or workflows. In retrieval workflows, authorise inside the index query, per chunk, so a user only sees documents they are allowed to see. Do not rely on the model to enforce access control: it will not do it reliably.
Check what the provider retains. Some providers train on prompts, some store them for abuse monitoring and some offer zero-retention options. If a provider retains prompts, treat every prompt as a record that could be read later, and keep credentials and full customer records out of it.
3. Give each agent least-privilege tools and its own identity
Give each agent only the tools, functions and permissions its task needs, and enforce those limits in the systems it calls rather than in the model. If an agent only needs to read a database, give it a read-only identity. If it needs to send email, limit it to a specific template and a specific recipient list.
Build every agent as a distinct principal with its own keys or certificates, as joint CISA and Five Eyes guidance recommends. Do not share one service account across agents, and do not let agents change their own privileges or delegate access without expiry timers and a recorded grant chain.
Use short-lived credentials and revoke them when the task ends. The UK National Cyber Security Centre puts it plainly: minimum access for the shortest time. A credential that lives for a year is a credential an attacker can reuse for a year.
Check the tool descriptions too. Tool poisoning hides malicious instructions in a tool's name, description or input schema, and the agent reads those descriptions to decide how to use the tool. Pin and hash tool descriptions at ingestion, and keep an allowlist of approved tools and model context protocol servers with version pinning.
4. Require human approval for irreversible actions
A chatbot that hallucinates a wrong answer is annoying. An agent that hallucinates a wrong action, then executes it with write access to your production database, is a breach. Human approval is the control that separates those two outcomes.
Require a human to approve any action that cannot be undone: sending money, deleting data, changing access, emailing a customer or publishing content. Put the approval step in the workflow, not in a prompt, so the model cannot talk its way past it.
Make the approval meaningful. Show the approver what the agent wants to do, which data it used and why, in plain language. An approval button that says only "approve" with no context is a rubber stamp, and rubber stamps get clicked.
5. Validate model output before you use it
Treat model output as untrusted input. Validate it for its destination: schemas for structured data, context-specific encoding for HTML, and sensitive-information checks before it is delivered or executed. Never let generated code, SQL or shell commands run without validation.
This matters most where output flows into another system. A model that writes a database query, a file path or an API call can be manipulated into writing a different one. Check the output against an allowlist of expected shapes, and reject anything that does not match.
Also check outputs for misinformation before they reach a customer or a decision-maker. The OWASP 2026 list ranks misinformation seventh, and a confident wrong answer in a customer email or a report is a reputational risk even when no system is breached.
6. Log every agent action in an append-only audit trail
Every agent action, decision branch, tool call and data access should write to an append-only audit log. Record the agent identity, the input it saw, the tools it called, the arguments it passed and the output it produced, so you can explain an outcome after the fact.
Keep the log tamper-resistant. If an attacker can edit the log, they can hide what the agent did. Store logs separately from the workflow, restrict who can read prompt content in them, and set a deletion policy for sensitive log data.
Monitor the logs, do not just store them. Set alerts for unusual tool calls, large data reads, repeated failures and cost spikes. Unbounded consumption is an OWASP top-ten risk, and a runaway agent loop can burn through a token budget in an hour.
7. Protect secrets, keys and workflow state
Never put a secret in a prompt. Use a secrets manager, pass short-lived tokens to the workflow, and keep API keys out of prompts, logs and tool descriptions. If a model has seen a key, assume it is compromised and rotate it.
Encrypt workflow state at rest and in transit. Workflow state includes variables, intermediate outputs and session context, and it often contains the very data you minimised out of the prompt. Use strong encryption, segment the workflow network, and patch the platform and its dependencies on a schedule.
Use strong, unique credentials for every platform account, and turn on multi-factor authentication for admin dashboards, workflow approval interfaces and APIs. Our free password generator can create a unique password for each account in seconds.
8. Test with prompt injection and red teaming
Test after every material change: a new model, a new prompt, new retrieval data, a new tool or a new policy. Re-evaluate the workflow with direct and indirect prompt injection attempts, including instructions hidden in documents, emails and tool output.
Red team the workflow the way an attacker would. Try to get the agent to reveal a system prompt, to send data to an external address, to call a tool it should not call and to approve its own action. Record what worked, fix the control that failed, and test again.
NIST AI 600-1 recommends red teaming against training data output, model extraction and exposure of confidential information. Treat the test results as evidence for your security review, not as a pass or fail mark to file away.
9. Govern AI workflows like any other system
Put AI workflows under the same governance as other systems: an owner, a risk assessment, a data classification, an access review and an incident response plan. The NIST Generative AI Profile organises this work into four functions — Govern, Map, Measure and Manage — and its Generative AI Profile adds risks specific to generative AI.
Write an acceptable-use policy for AI tools, including which data may go into which platform and which workflows need approval before they go live. Train staff on prompt injection the same way you train them on phishing: show a real example, explain what to look for and give them a way to report it. Our spear phishing guide covers the same human factors, because the attack pattern is similar.
Plan for incidents. If an agent acts on an injected instruction, you need to know how to stop the workflow, revoke its credentials, preserve the logs and tell the people affected. Run that plan once before you need it for real.
A security checklist for AI workflow platforms
Use this checklist before a workflow goes live, and again after any material change. If you cannot tick a box, either fix it or accept the risk in writing.
- Inventory: every workflow listed, with owner, model, provider, data and tools.
- Data: data classified and minimised, secrets out of prompts, provider retention checked.
- Identity: each agent has its own identity, least-privilege tools and short-lived credentials.
- Approval: human approval required for irreversible and high-impact actions.
- Validation: inputs inspected, outputs validated, tool results treated as untrusted.
- Limits: rate limits, token budgets, recursion caps and cost alerts in place.
- Logs: append-only audit log, with alerts for unusual activity.
- Testing: prompt injection and red teaming done after the last material change.
- Governance: owner, risk assessment and incident response plan in place.
The bottom line
AI workflow security is not a new discipline, but it does add new failure modes to the systems you already run. Prompt injection, excessive agency and data leakage are the risks that matter most, and they are stopped by the same principles that secure any system: least privilege, separation of duties, validation and audit.
Start with the inventory, minimise the data, scope the agent, require human approval for irreversible actions and log everything. Then test it like an attacker would. You can check how well your own public-facing systems are protected with our free SSL checker, and build from there.
Frequently asked questions
What is the biggest security risk in AI workflow platforms?
Prompt injection is the top risk in the OWASP Top 10 for LLM Applications 2026. Instructions hidden in emails, documents, web pages or tool output can override the instructions you gave the model and redirect what the agent does.
How do you stop prompt injection in AI workflows?
You cannot stop it with one filter. Separate instructions from data, inspect inputs before they reach the model, validate outputs before they are used, give agents least-privilege tools, and require human approval for high-risk actions. Assume some injected instructions will get through.
Should AI agents have their own accounts?
Yes. Joint guidance from CISA and Five Eyes partners in 2026 says each agent should be a distinct principal with its own keys or certificates, and agents should not be able to change their own privileges. That makes access review and revocation possible.
What data should never go into an AI workflow?
Never send credentials, API keys, full customer records or unredacted personal data to a model unless the workflow needs that exact data and the platform is approved for it. Minimise, mask or tokenise data first, and check what the provider retains and where it is stored.
Do AI workflows need human approval?
Yes, for irreversible or high-impact actions such as sending money, deleting data, changing access or emailing customers. Human-in-the-loop approval is a core control in OWASP and NIST guidance, and it is the control that stops a manipulated model from doing real damage.
How do you audit an AI workflow?
Log every agent action, decision branch, tool call and data access in an append-only audit log, with the identity of the agent, the input it saw and the output it produced. Keep enough evidence to explain an outcome, and restrict access to prompt content in logs.
Which frameworks cover AI workflow security?
The OWASP Top 10 for LLM Applications 2026 lists the main risks, the OWASP Top 10 for Agentic Applications covers agent-specific risks, and NIST AI 600-1, the Generative AI Profile, gives voluntary lifecycle risk-management guidance including testing, monitoring and incident response.
Is it safe to connect AI agents to email and databases?
It can be, if the connection is scoped. Give the agent read-only access where possible, enforce authorisation in the system it calls rather than in the model, and require approval before the agent writes, sends or deletes anything. An agent with write access to a production database is a breach waiting for a bad prompt.
Sources
The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.
Checked against the OWASP Top 10 for LLM Applications 2026, the OWASP Agentic Top 10 and NIST AI 600-1.
How we write and fact-check →