Real-world case

AI agent security in companies, what you actually need to lock down

The French state advises against autonomous agents on workstations. The real risks, the moves that reduce them and the best practices for going into production.

Louis Graffeuil
Founder Tandem
Updated
13 minread
Tandem illustration of AI agent security, a small dark robot sitting inside a ring closed by a coral padlock

An artificial intelligence agent installed on a workstation acts on your behalf. It reads your files, opens your mailbox, browses the web and runs system commands. AI agent security therefore comes down to the scope of rights you grant it. In April 2026, the French state published an unambiguous alert about these tools. It comes from CERT-FR, the alert centre attached to the national cybersecurity agency, which tracks attacks against French organisations. Its conclusion fits in one sentence. These assistants should not be deployed on workstations.

The alert names two products, OpenClaw and Claude Cowork. Tandem publishes an article on the OpenClaw autonomous assistant and a practical Claude Cowork guide, and has tested both in real conditions. This article covers what an AI agent really exposes, why prompt injection still has no fix, and the moves to make before plugging one in. It then sets out the best practices for putting an agent into production, with the questions to ask before you sign. Who decides and who answers for it is covered in our article on AI governance in companies.

Why the French state advises against these tools on workstations

The CERTFR-2026-ACT-016 bulletin does not deal in theoretical risk. It describes seven weaknesses specific to agentic AI automation products, all of them observable on a user workstation. These tools are still mostly in beta, and that is the document's first argument.

  • System compromise, through a flaw in a tool that lacks the maturity of enterprise software.
  • Data leakage, towards external resources nobody controls.
  • Excessive privileges, because the agent is granted access to mail, calendar, files and business applications.
  • Exposed secrets, whenever a credential or a key passes through the agent's context.
  • Loss of control over actions, with destructive moves against data integrity or availability.
  • Prompt injection, which the document calls an intrinsic vulnerability of language models.
  • An extended software supply chain, because plugins are loaded dynamically and run with trusted privileges.

The last point is the most underestimated. An agent that installs an extension on the fly runs third-party code with your rights, unreviewed and unapproved. The attack surface is no longer limited to the installed product. It covers everything that product can download.

What an AI agent really touches on your machine

The confusion comes from the interface. An AI agent is driven through a conversation, exactly like a classic assistant. But an assistant produces text you copy across. An agent executes. That difference changes the whole risk profile, because it adds building blocks that touch your systems.

Tandem one-pager breaking down the five building blocks of an AI agent, inputs and outputs, orchestration, reasoning, data and tools, interoperability
The block that matters for security is orchestration. It carries the guardrails, the tracing and the handover to a human.

I broke this architecture down in a LinkedIn post from April 2026, and the conclusion holds for security as much as for reliability. AI projects that fail almost never fail on the model. They fail on orchestration, on context and on missing guardrails. An agent without tracing cannot be watched. An agent without a handover point does not stop.

The data and tools block is where the concrete risk appears. The MCP protocol connects the agent to your CRM, your document bases, your mailbox. Every connector you open is one more door. An agent draws its value from that access, and its danger too. The two do not come apart.

Prompt injection, the flaw with no fix

A language model treats everything it receives as a single token sequence. Your instruction and the body of an email arrive in the same stream. Nothing in the architecture enforces a privilege boundary between them. So an attacker does not need to attack the model. Placing instructions in content the model will read is enough.

Tandem five-step diagram of an indirect prompt injection chain, from the booby-trapped text to data exfiltration
No step raises an alarm. The agent does exactly what it was granted the rights to do.

Anthropic documents several protections against this scenario, from the permission system to an isolated context window for web fetches. Its security documentation still ends on an explicit warning. These protections significantly reduce risk, but no system is completely immune. The same page states a rule many teams forget. The tool only has the permissions you grant it, and reviewing the proposed commands stays your responsibility.

What actually broke elsewhere in 2026

The subject left theoretical ground in the first quarter of 2026. The quarterly report from the OWASP GenAI Security Project, published in April 2026, lists eight named and dated incidents for January to April alone. What these incidents have in common is telling. Almost none of them maps to a tracked code vulnerability. They come from misconfiguration, design choices and the supply chain.

DateIncidentWhat it teaches
February 2026An OpenClaw agent deletes emailsThe agent ignored the stop commands it was given
March 2026Internal agent leak at MetaTwo hours of exposure of employee and user data
March 2026Privilege escalation on Vertex AIService accounts granted far too broadly
April 2026Active exploitation of a Flowise flawBetween 12,000 and 15,000 instances exposed online
Four AI agent incidents logged by OWASP in the first quarter of 2026

The OpenClaw case deserves a pause, because it is the tool CERT-FR names. A security audit run in late January 2026 and relayed by Kaspersky identified 512 vulnerabilities, eight of them critical. One researcher counted around a thousand installations publicly reachable with no authentication at all. More than 230 malicious plugins were published between late January and early February 2026, and downloaded thousands of times.

Another researcher demonstrated the extraction of a private key from a machine running the tool. The method boils down to an email carrying an injection, then a mundane request to check the mail. The agent handed the key over by itself.

Tandem illustration of a fenced-in AI agent, a dark clay robot in a pale ring with a coral padlock and a shield
Everything comes down to what the agent can reach, decided in advance.

The setting almost nobody puts back

Here is the point that French and English guides still miss in September 2026. The default approval mode has changed, and it changed in the opposite direction to what CERT-FR recommends. The alert calls for mandatory human approval before system commands. The most widely deployed tool on the market now starts without it.

Anthropic's documentation now lists six permission modes, not four. Since Claude Code v2.1.283, an interactive session in a terminal or in VS Code starts in Auto mode. In that mode a second model, the classifier, reviews actions instead of the user and blocks the ones it judges unsafe. The mode where a human approves every action still exists. It is called Manual, and you now have to select it.

Tandem table of the six Claude Code permission modes and who approves the action in each, human, model or rules
Four of the six modes let an action through without a human looking at it. The starting mode is one of them.

Having one model arbitrate another has its own logic. It answers prompt fatigue well, which otherwise pushes teams to approve everything mechanically. The recommendation, however, calls for human oversight, and the classifier remains a machine. On a workstation that touches customer data, the distinction is decisive.

Do you need an agent, or is an AI workflow enough?

The best security measure available costs nothing. It is not deploying an autonomous agent where a framed workflow does the job. On LinkedIn, the vast majority of posts about AI agents actually show workflows, sometimes plain automations. That gap says a lot about what teams actually deploy.

Tandem one-pager comparing automation, AI workflow and AI agent on definition, strengths, weaknesses and an example
An agent improvises depending on context. A workflow follows your method. The second one can be watched.

I already argued this in a March 2026 post on the three levels of automation. Companies are not looking for magic, they are looking for control, reliability and a return on investment. In the vast majority of situations, the AI workflow answers better than the agent. Our article on AI agents versus AI workflows maps the border between the two.

Tandem diagram of the three automation levels and the attack surface each one exposes
The most autonomous level is also the hardest one to keep an eye on.
I walk through the four automation layers in this video, and why jumping straight to an agent gets expensive.

The security reasoning follows the product reasoning. A plain automation has no decision latitude. An AI workflow calls the model at known steps, with rights granted step by step. An autonomous agent chains unforeseen actions with broad rights. The attack surface follows exactly the same slope.

Eight moves to make before plugging in an AI agent

The CERT-FR recommendations translate into concrete decisions. Tandem applies them on its own deployments, and across the 50-plus companies it has supported since the start. None of them requires a dedicated security budget. All of them are taken before installation, while the perimeter is still open.

Tandem checklist of the eight moves to make before deploying an AI agent, drawn from the recommendations CERT-FR published in April 2026
Eight decisions to make before installation. None of them needs another tool.

The second move protects the most for the least effort. In my Claude Cowork playbook, the first rule of the folder chapter is never to point the tool at all of your documents. The agent has real read and write access to the folder you share. If something goes wrong, the damage has to stay inside a limited perimeter. One dedicated folder, three subfolders, and nothing else.

The first move is the one Tandem applied to test OpenClaw. My newsletter edition on autonomous assistants describes the setup. The tool runs on a dedicated private server, away from workstations, and it is wired to a team Slack channel. That isolation is what made the test possible. Without it, there was no way to try the tool while exposing our client data.

Security best practices for an AI agent in production

The eight moves apply to an agent sitting on a workstation. An agent wired into the company's CRM, mailbox or accounting goes through a different review before production. IT asks four things: who accesses what, what is logged, what goes to the model provider, and under which contract. Each one is proven with a document or a demo.

ItemWhat to getProof to ask for
AccessThe agent reads and writes with the signed-in user's rightsDiagram of the connectors and how each one authenticates
IdentitySign-in through the company directory (SSO), automatic shutdown when an employee leavesSSO configuration and, ideally, SCIM provisioning
Audit logEvery request, tool call, refusal and answer logged, with a written retention periodLog sample and export format
Data sent to the modelSensitive data masked before sending, categories set per use caseList of masked categories and a before/after example
ContractEnterprise plan or API, no training on your data, known hosting regionNo-training clause, GDPR data processing agreement, region
Security posture sheet, what to get and the proof to ask for

Access and identity management: the agent inherits the user's rights

An agent wired into the CRM can connect in two ways. With a service account, it sees everything that account sees, often the whole database. Only the prompt then tells it to hide financial data from the sales rep. A prompt can be bypassed, as the injection described above shows.

With delegation, the agent acts on behalf of the signed-in user and inherits their rights in the source tool. A sales rep who cannot open accounting in the software cannot open it through the agent either. The same rule applies to every connected app, with one connector per tool, limited to the user's rights in that tool.

Delegation requires the user to be identified end to end. That is the job of SSO, single sign-on through the company directory (Microsoft Entra ID, Google Workspace, Okta). The day an employee leaves, disabling their directory account also cuts off the agent. SCIM provisioning does the same for new hires and team changes. Past sessions stay in the log.

That leaves the agent's own credentials. API keys and connector tokens belong in a secrets vault (Azure Key Vault, AWS Secrets Manager, HashiCorp Vault), never in the prompt. CERT-FR lists secret exposure among its seven weaknesses.

Audit log: monitoring and auditing an AI agent's activity

The question always comes after an incident: what did the agent do, for whom, with which data? The log has to answer without any reconstruction. It records the request, every tool call and its target, every refusal, the answer, the user, their scope and the time.

For retention, the CNIL recommendation on logging generally sets a rolling period of six months to one year. If your security team already centralises its logs in a SIEM (Splunk, Microsoft Sentinel, Elastic), the agent's logs must be able to flow there too.

TimeUserActionTargetScopeResult
14:32:08c.martinReadCRM, Durand SA accountSales WestAllowed
14:32:11c.martinAnswerFollow-ups older than 30 daysSales WestAllowed
14:31:42a.rouxReadAccounting, general ledger exportCustomer supportDenied
14:30:54systemKey rotationEntra ID connectorPlatformDone
Audit log sample from a sales agent (fictional example)

The denied line is the most useful one in the table. A log that only holds successes says nothing about out-of-scope attempts.

Anonymising sensitive data before it reaches the model

Masking, often called anonymisation, replaces personal data with placeholders before the text leaves your environment. The model works on the masked version. The mapping table stays on your side, and the real values are put back into the answer on the way back.

StepText
Original textCustomer Marie Dupont (marie.dupont@durand.fr) asks for a refund of the invoice paid with IBAN FR76 3000 6000 0112 3456.
Sent to the modelCustomer [NAME_1] ([EMAIL_1]) asks for a refund of the invoice paid with IBAN [IBAN_1].
Model answerHello [NAME_1], the refund is booked to account [IBAN_1].
Answer shownHello Marie Dupont, the refund is booked to account FR76 3000 6000 0112 3456.
The same message, before and after masking (fictional example)

Detection relies on rules (the format of an IBAN, a social security number, an email address) and on name recognition models. Presidio, Microsoft's open source library, is a common example. In-house identifiers, such as a contract number, need rules written for the company.

Strictly speaking, as long as the mapping table exists, this is pseudonymisation. The GDPR is clear that pseudonymised data remains personal data. Masking reduces what the model provider sees. It does not take the processing outside the GDPR.

Contract, data hosting and model training

An IT director's first question is about training. The answer depends on the plan far more than on the model. On the consumer plans of ChatGPT and Claude, whether conversations are used for training depends on each user's own setting. On OpenAI's and Anthropic's enterprise plans and APIs, the contract terms exclude it by default. An employee who pastes a client contract into a personal account steps outside that frame.

Two more points are in the contract. Retention first: providers keep exchanges for a limited time to detect abuse, and offer zero retention on the API to eligible customers. Then the region. OpenAI offers data residency in Europe on ChatGPT Enterprise, ChatGPT Edu and the API. Anthropic's models are available in European regions of AWS and Google Cloud.

Under the GDPR, the firm that builds the project and the model provider are both processors. Each must be covered by a GDPR-compliant data processing agreement. The firm must also give you the list of its own sub-processors.

Regulated sectors: healthcare, finance and the public sector

These practices apply everywhere, and some sectors add their own rules. In French healthcare, hosting health data on behalf of a third party requires an HDS-certified host. Banks, insurers and asset managers have fallen under the EU DORA regulation since January 2025. It governs the use of third-party IT providers, the model provider included. For sensitive public administration data, the French "cloud au centre" doctrine requires SecNumCloud-qualified hosting. These requirements weigh on the choice of model and hosting from the very first prototype.

Tandem applies these practices to its enterprise deployments. The systems we deliver are GDPR compliant, with hosting in the European Union depending on your needs. The rest is set client by client, according to the sector's own compliance rules and the company's internal constraints.

Security questionnaire: 9 questions to ask before deploying an AI agent

The same questions come back from one security questionnaire to the next. The table gives the answer to expect from a provider, and the one that should stop you.

QuestionAnswer to expectRed flag
Where does our data travel, and who can see it at the model provider?A diagram of the data path, with the region and retention period at each step"In the cloud", with no region or retention period
Is our data used to train a model?No, with the enterprise or API contract clause that says soConsumer accounts, with a setting each employee has to switch off
Can a sales rep see financial data through the agent?No, unless their current rights already allow it. The agent reads with the signed-in user's rightsA single service account with full rights, filtered by the prompt
What happens when an employee leaves?Disabling them in the directory cuts off agent access. Their past sessions stay in the logA local account to delete by hand in every tool
What happens to personal data in requests?The list of categories masked before sending, adjustable per use case, with the mapping table kept on your side"The model doesn't remember anything", with no mechanism described
Can we prove what the system did six months ago?Yes. Requests, tool calls, refusals and answers are logged with the user and the outcome, and can be exportedTechnical logs held by the provider, with no access for you
Who is a processor under the GDPR?A signed data processing agreement with the provider and the list of its sub-processors, model provider includedOnline terms and conditions, with no signed agreement
How is prompt injection handled?Rights limited at each step and human approval before any irreversible action"The model is protected against that"
What happens if we stop?The code, prompts and connectors are handed over to you, and the data held by the provider is deleted by a written dateA closed platform nothing can be taken out of
Nine questions to ask before signing an AI agent project

Model providers publish their audit reports and certifications on their trust portal. Ask for the one covering the model in use, and add it to the IT file.

What GDPR and the AI Act already require

In July 2026, France's CNIL and the national council for AI and digital affairs published an exploratory note on agentic AI. The document makes two findings. These systems access large volumes of data from multiple sources, and keep persistent interaction histories. The risk of losing control over personal data is described as real.

The second finding is more awkward for a company. Decision-making autonomy and interaction with several services complicate the identification of responsibilities. When an agent sends an email that should never have gone out, the chain of accountability becomes hard to reconstruct. Both authorities note that existing European law already applies, but that these characteristics call for an adapted implementation.

Article 4 of the European AI regulation also covers companies that use these systems. From February 2025, they had to ensure a sufficient level of AI literacy among their staff. The AI omnibus regulation, in force since 27 July 2026, softened that obligation without removing it. Companies must now take measures to build their staff's AI literacy. Training teams on injection risk therefore falls under regulatory requirements, like the rest of compliance. Our article on AI governance details the role split that follows, and our AI literacy page describes the format we use to answer it.

How do you deploy an AI agent securely in your company?

Start by not deploying one everywhere. The first call is the level of autonomy, and it is made use case by use case. If a framed workflow produces the expected result, take the workflow. You gain reliability, traceability and a smaller attack surface, all in the same move.

When the agent genuinely earns its place, three decisions cover most of the risk. Fence its file perimeter to one dedicated folder. Put human approval back on system commands, which takes a single line of configuration. And open only the connectors the use case needs. The rest is monitoring over time.

Before production, four things are checked on paper. Access is inherited from the directory, the audit log can be exported, sensitive-data masking is set per use case, and the contract excludes training. The nine questions of the questionnaire serve as the checklist for the meeting with your IT director.

Tandem supports these calls in the field, starting from use cases. That is the point of our AI audit, which maps the automatable tasks and the level of autonomy each one can actually carry. To first understand what agents really do in production today, our state of the market and our AI literacy path are two good starting points.

Frequently asked questions

How do you put an AI agent into production safely?

First pick the lowest level of autonomy that delivers the result. Then four controls: the agent reads with the signed-in user's rights through SSO, every action is logged, sensitive data is masked before it reaches the model, and the model is used under an enterprise contract with no training on your data. Human approval stays in place before any irreversible action.

Are AI agents banned in companies in France?

No, there is no legal ban. France's CERT-FR formally advises against deploying them on production workstations, in its alert of April 2026. It allows experimentation in an isolated sandbox with no sensitive data. Production use remains possible after IT department sign-off and documented acceptance of the residual risk.

What is a prompt injection against an AI agent?

A prompt injection hides instructions inside content the agent will read, such as an email, a support ticket or a web page. The model processes your instruction and that content in the same token sequence, with no privilege boundary between them. The agent then runs the hidden instruction using the rights it was granted.

How do you limit an AI agent's rights on a workstation?

Three measures cover most of it. Fence the file perimeter to one dedicated folder rather than the whole disk. Put human approval back on system commands through managed enterprise settings. And open only the connectors the use case genuinely needs, since every extra integration is one more door into your data.

Is an AI workflow safer than an autonomous agent?

Yes, in the vast majority of cases. A workflow calls the model at known steps, with rights granted step by step and a predictable output. An autonomous agent chains unforeseen actions with broad rights, which makes it hard to monitor. The right reflex is to pick the lowest level of autonomy that still produces the expected result.

Does GDPR apply to AI agents?

Yes. In their note of July 2026, France's CNIL and the national AI and digital council point out that existing European law already applies to agentic AI. They flag two difficulties specific to these systems, the volume of data processed alongside persistent histories, and the difficulty of identifying responsibilities when the agent decides alone and interacts with several services.

Can you anonymise personal data before sending it to ChatGPT or Claude?

Yes. A detection tool replaces names, email addresses, IBANs or social security numbers with placeholders before sending, then puts the real values back into the answer. The mapping table stays in your environment. Under the GDPR this is pseudonymisation, so the data remains personal data. Masking also degrades tasks that need the person's identity.

Is data sent to an AI model used to train it?

It depends on the plan. On consumer plans, training depends on each user's setting. On OpenAI's and Anthropic's enterprise plans and APIs, the contract terms exclude it by default. Check the clause in the contract, and the data hosting region.

What should an AI agent's audit log contain?

Every request, every tool call and its target, every refusal and every answer, with the user, their scope and the time. France's CNIL generally recommends keeping logs for six months to a year. The log must be exportable to your security team's monitoring tool.

Read next

All articles →
Applied AIAI governance in a company: illustration of a committee table with one seat highlighted

AI governance in a company: who decides, who builds, who spreads it

By Louis Graffeuil
Tools3D illustration of a claw grabber hanging above a closed laptop

OpenClaw: we tested the open-source autonomous AI assistant

By Louis Graffeuil
Real-world caseTandem card titled Automating customer order entry into your ERP with AI

Automating customer order entry into your ERP with AI

By Louis Graffeuil