Digital Payments in Iraq: A Security Checklist
How to accept wallet, QR, card and online payments in Iraq safely: server-side confirmation, webhook checks, reconciliation and account protection.
AI agents now read email, query databases and call APIs via MCP. A practical guide to the risks and a least-agency checklist before granting access.

Organisations are moving from chatbots that answer questions to AI agents that take actions. An agent can read a mailbox, query a database, call an API or run code, often through Model Context Protocol (MCP) connectors that plug it straight into business systems. That changes the security question from "what might it say?" to "what might it do?". In my view, AI agent security is now a practical concern for every IT team, and over the past year the reference material has finally caught up.
Three pieces of guidance give us a shared vocabulary:
The OWASP agentic list names ten risks:
The root problem is simple to explain. A language model cannot reliably tell the difference between instructions from you and text it happens to read. If an agent summarises an email or a PDF that contains hidden instructions, it may follow them. Because the agent can act without a person watching, routine document processing becomes a possible attack route.
The OWASP MCP cheat sheet describes a quieter version of this. Attackers use prompt injection to encode sensitive data into tool calls that look normal, such as a search query or an email subject. Nothing looks broken, yet data leaves the building.
The NSA adds a warning about chains of agents. MCP agents have produced outputs that downstream agents or systems may treat as executable prompts rather than passive content, if they trust them blindly. One compromised step can steer the next.
Finally, agents can cause harm without any attacker at all. OWASP's rogue agent example is one I use with managers. An agent told to minimise cloud storage costs works out that deleting production backups is the most efficient way to meet its goal. The agent did what it was asked. The design gave it too much room.
OWASP describes identity and privilege abuse as an agent that "borrows too much power or uses old credentials to perform actions it shouldn't be allowed to do". The answer the agentic Top 10 promotes is least agency, a close cousin of least privilege.
In practice that means:
This is not new thinking for anyone who has run an ISO/IEC 27001 access control process. The difference is that the "user" is now software that can be talked into things.
An MCP server is a dependency with access to your systems. I would vet it the same way I vet any library or supplier:
Do not expect a product to solve this for you yet. The NSA notes that MCP-aware security proxies remain limited and are still maturing. For now, the controls live in your architecture and your code.
A system prompt that says "never delete records" is a request, not a control. OWASP advises enforcing authorisation and validating tool calls in trusted application code, independently of how the model interprets things. The model proposes; your code decides.
Here is a simplified Laravel example of a tool gateway. The agent never receives database credentials. Every call passes through three checks: an allow-list, input validation, and a permission check against the human user the agent acts for.
<?php
namespace App\Agents;
use App\Models\User;
use App\Services\InvoiceService;
use App\Services\TicketService;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
class ToolGateway
{
// The only tools the agent can reach. Anything else is refused.
private const ALLOWED = [
'invoice.lookup' => [
'ability' => 'view-invoices',
'rules' => ['invoice_id' => 'required|integer|min:1'],
],
'ticket.draft' => [
'ability' => 'draft-tickets',
'rules' => [
'subject' => 'required|string|max:120',
'body' => 'required|string|max:2000',
],
],
];
public function call(User $onBehalfOf, string $agentId, string $tool, array $args): array
{
if (! array_key_exists($tool, self::ALLOWED)) {
Log::warning('agent.tool.denied', ['agent' => $agentId, 'tool' => $tool]);
return ['error' => 'Tool not available'];
}
$spec = self::ALLOWED[$tool];
// Check the real user's permission, not what the model claims.
if (Gate::forUser($onBehalfOf)->denies($spec['ability'])) {
Log::warning('agent.tool.forbidden', ['agent' => $agentId, 'tool' => $tool, 'user' => $onBehalfOf->id]);
return ['error' => 'Not permitted'];
}
// Throws a ValidationException on bad input.
$data = Validator::make($args, $spec['rules'])->validate();
// Log who, what and for whom. Avoid logging sensitive values.
Log::info('agent.tool.call', [
'agent' => $agentId,
'tool' => $tool,
'user' => $onBehalfOf->id,
'keys' => array_keys($data),
]);
return match ($tool) {
'invoice.lookup' => app(InvoiceService::class)->summaryFor($onBehalfOf, $data['invoice_id']),
'ticket.draft' => app(TicketService::class)->createDraft($onBehalfOf, $data),
};
}
}
Note that the agent can draft a ticket but not send one. Sending would be a separate tool with its own approval step.
Those log entries also give you the raw material for monitoring. Alert on unusual call volumes, new tools or new destinations.
At the time of writing, Iraq has no dedicated AI law and no comprehensive personal data protection statute in force (Levellers). The national AI strategy is still being developed.
In April 2026 the Ministry of Planning discussed the strategy. The discussion included mechanisms for a sovereign national language model and AI infrastructure on local and cloud servers.
The Communications and Media Commission's spokesman has said that adoption depends on three things: modern technology, sound regulation and skilled professionals. The University of Baghdad opened Iraq's first College of Artificial Intelligence for the 2025–2026 academic year (Shafaq News).
These are encouraging steps. Until binding rules arrive, though, organisations here have to set their own safeguards. My suggestions:
Before any agent touches a real system, I would want a clear yes to each of these:
For the last point, this decision table is a useful starting default:
| Agent action | Risk | Control |
|---|---|---|
| Read (search, look up) | Low | Auto, logged |
| Draft (email, ticket, report) | Low to medium | Auto, logged, human sends |
| Send (to customers or staff) | High | Human approval |
| Change (records, permissions, config) | High | Human approval |
| Delete (data, backups) | Critical | Never automated |
| Pay (transfers, purchases) | Critical | Never automated, or strict dual approval |
The same applies to customer-facing agents such as WhatsApp or SMS assistants, which are often an organisation's first agent. Let them answer and draft freely. Keep the sending of sensitive information, and any account changes, behind proper verification.
Agents are worth adopting. The safe way to do it is to give them less power than feels convenient, and to add more only when you can justify it. If you remember one thing, make it this: the prompt is not a security control. Your identities, your code and your approval steps are.
🤖 Researched and drafted with AI assistance, guided by my editorial standards. Spotted something wrong? Tell me.