Why this matters now:Perforce's third annual State of Data Compliance and Security report, based on 518 enterprise leaders and published in July 2026, found that 99% have a data masking policy for non-production environments, 84% still allow exceptions to it, and 34% reported a breach or theft involving that data. India's DPDP Rules were notified on 14 November 2025 with an 18-month phased compliance period, and the Act sets penalties of up to ₹250 crore for failing to maintain reasonable security safeguards. AI agents are now being tested against those same environments.

A Masked Database Meets an Agent Test Run

Consider a quality team at a mid-sized insurer that has done what the policy says. The claims database copy in the test environment has names, phone numbers, and policy numbers masked, and the team passes its annual audit. Then the same team starts testing a claims-triage agent. The agent does not read columns the way a report does. It reads the adjuster notes field, which still contains a claimant's full name, a street address, and a description of an injury, because masking rules were written for structured fields.

The leak does not stop at the notes. The test harness sends each record to a hosted model, the observability platform stores the full prompt and response for ninety days, the evaluation report quotes the failing cases verbatim, and someone exports a spreadsheet of those cases to a laptop to debug them. One masked database has become five copies of sensitive text in five places, and only the first one was ever in the data inventory. Perforce's 2026 survey points at the same pattern from the other side: 57% of respondents said the volume of sensitive data in non-production grew in the past year, with faster release cycles (31%) and more use of data for decisions (30%) as the top drivers.

None of this means masking is the wrong tool. It means masking was built for a world in which test data was read by people and by deterministic code. Agents add readers that interpret free text, call tools, and write detailed records of what they saw. A quality engineering team that wants to test those agents needs a test data design that assumes the data will be read, summarized, stored, and quoted, and that decides in advance where each of those happens.

"A masking policy describes the data you meant to protect. An agent test run shows you the data you actually have."
34%
of 518 enterprise leaders reported a breach or theft involving non-production data. Source: Perforce, State of Data Compliance and Security Report, 2026 edition.
84%
still allow exceptions to their non-production masking policy, even though 99% have one. Source: Perforce, 2026 edition.
₹250 crore
maximum penalty under the DPDP Act for failing to maintain reasonable security safeguards. Source: PIB explainer on the DPDP Rules, 17 November 2025.

Six Ways Test Data Leaks Once Agents Join the Test Cycle

Each row below is a pattern we look for when a quality team starts testing agents against realistic data. Severity reflects how much harm follows if the gap is found by someone other than the team.

Test data gapWhat goes wrong in practiceSeverity
Free text left unmaskedColumn rules cover names and ID fields, but notes, emails, and documents keep identifying details that the agent reads and repeatsCritical
Test records sent to unreviewed model endpointsA tester points the harness at a personal API key or a public tool, and real customer text leaves the approved boundaryCritical
Traces and eval reports stored unmaskedObservability and evaluation tools retain full prompts, tool payloads, and failing cases with broad read access and no retention limitHigh
Exceptions with no owner or expiryA temporary copy of production for a bug investigation is still sitting in a shared environment a year laterHigh
Synthetic data too clean to catch real failuresGenerated records are tidy and well formed, so the agent passes tests that production inputs would failModerate
Masked values that can be linked backDates of birth, postcodes, and rare diagnoses or amounts remain in combination, so records can be matched to a personModerate

Not sure where your test data gaps are?

10decoders reviews how test data moves through your environments, harnesses, and evaluation tools when agents are involved. You get a ranked list of exposure points and a test data model your quality, security, and data teams can sign off together.

Book a Free AI Assessment →

Synthetic Data Solves Privacy and Creates a Fidelity Problem

Many teams respond by moving to synthetic data, and the survey data says the shift is under way: 51% of Perforce's 2026 respondents use it, alongside 86% using static masking and 60% using dynamic masking. Synthetic data removes the link to real people, which is its main value. It also removes the mess that makes production hard. Real claim notes contain typos, abbreviations in three languages, copied email chains, and a field that was repurposed in 2019. Generated records rarely include any of that unless someone designs it in.

Agents are sensitive to that gap in a way that most older systems are not. A classifier that handles a tidy sentence can fail on a pasted block with a signature and a disclaimer. A tool-calling agent that reads a well formed date will break on a date written as “3rd of Oct, ish.” If your test data never contains those inputs, your pass rate describes the test data and says little about production. A Tonic.ai survey of 1,000 developers and startup employees in 2022 found that 42% said their test data practices were not secure or did not scale, which fits what we see: teams get one of the two properties and not both. The sample skews toward startups, so read it as direction rather than a benchmark.

The workable answer is a tiered model. Use synthetic data for the bulk of runs, build a small library of messy cases from real incidents and rewrite them so no person is identifiable, keep masked subsets only where relational shape matters, and make every exception expire. The aim is test data that is safe to hand to an agent and rough enough to embarrass it.

Stage 1
Copy and mask

Production Copies with Column Rules

Test environments are refreshed from production and structured fields are masked. Free text, attachments, traces, and evaluation outputs are outside the policy, and exceptions are granted by message.

Stage 2
Scoped and inventoried

Free Text and Tooling Brought Into Scope

The inventory covers documents, notes, harness endpoints, and trace stores. Approved model endpoints are enforced, retention is set, and exceptions have an owner and an end date.

Stage 3
Designed test data

Synthetic Core with a Real-World Edge Library

Most runs use generated data checked against production distributions. An incident-based edge-case library keeps tests honest, and re-identification checks run before any dataset is shared.

Checklist: Is Your Test Data Ready for an Agent?

Pick one agent under test and check its environment against this list. Anything you cannot show is a gap to close before the next release cycle.

What a ready quality team can show
A data inventory per test environmentEvery environment lists which tables, files, and document stores it holds, which fields are sensitive, and who approved each copy. Free text and attachments are listed, not skipped.
Free text treated as sensitive by defaultNotes, call summaries, claim narratives, and email bodies are scrubbed or replaced before they reach any test run, because an agent reads them and a column mask never touched them.
An approved model endpoint for test runsTest harnesses call only endpoints that your security team has reviewed for retention and training use. No one pastes a record into a public chat window to see what the agent would say.
Trace and log retention set on purposeAgent traces, tool call payloads, and evaluation reports have a retention period, an access list, and the same masking as the data they quote.
A tiered test data modelSynthetic data for most runs, masked subsets where relational shape matters, and a short written exception path for anything else, with an owner and an expiry date.
An edge-case library drawn from real incidentsRare formats, malformed inputs, and odd customer histories from past incidents are rebuilt as synthetic cases and tagged, so clean data does not hide production behavior.
A re-identification check before data is reusedA short test tries to link masked or synthetic records back to people using dates, locations, and rare values, and the result is recorded before a dataset is shared across teams.
Fidelity measured against productionField distributions, null rates, and value formats in the test set are compared with production on a schedule, and drift beyond an agreed limit triggers a refresh.
"The goal is not test data that looks like production. It is test data that behaves like production and belongs to no one."

What to do this week

01 Trace one agent run end to end

Choose the agent your team is testing now and follow a single test record from the source table to every place it lands: the harness, the model endpoint, the trace store, the evaluation report, and any exported file. Write each hop in a table with the system, the owner, the retention period, and who can read it. Most teams find at least one hop nobody had on the inventory, and that finding sets your priority order for the rest of the work.

02 Scan free text for identifiers

Sample five hundred rows from each free text field in your test environment and run a pattern and entity scan for names, phone numbers, addresses, ID formats, and account numbers. Have a person review a smaller sample of the hits and the misses. The hit rate tells you whether column masking is covering the fields that agents actually read, and the miss rate tells you how much to trust the scanner.

03 Lock the model endpoints and retention

List every endpoint and API key that test harnesses use, remove the ones your security team has not reviewed, and route the rest through one configuration. Set a retention period on traces and evaluation reports that matches the data they quote, and restrict read access to the people running the tests. This is a configuration change you can finish in a day, and it closes the two highest-severity gaps in the table above.

04 Start the edge-case library

Pull ten recent production incidents that involved odd inputs, such as a pasted email chain, a malformed date, or an unusual customer history. Rewrite each as a synthetic case that keeps the shape of the problem and removes any real person, then tag it and add it to the regression suite. Ten cases will not cover production, but they will show your team the difference between a green run on clean data and a green run on realistic data.

Let 10decoders Review Your AI Test Data

We trace test data through one to three of your agent test environments, covering free text, model endpoints, trace retention, exception handling, and synthetic data fidelity. You leave with a ranked gap list and a tiered test data model your quality, security, and data teams can adopt. This is an engineering review that supports your privacy and legal teams, not legal advice.