Skip to main content
Back to Insights

How staging stays safe: scrubbed data and no accidental emails

Ottilia Zsigmond
Ottilia ZsigmondJul 2, 20265 min read

Behind every live website there is a quieter family of copies. A developer runs one on their own machine to build a new feature. A staging environment holds the next release so it can be reviewed before anyone else sees it. These copies are where the actual work happens, and to be useful they need to look like the real site: same code, same structure, same kind of content. Which raises a question that most site owners have never had a reason to ask, but should be able to answer: when your site gets copied for development, what happens to your customers' personal data?

It is a fair question, because a production database is full of people. Names and email addresses from contact forms, order histories, newsletter signups, user accounts. The live site protects all of this with layers of care. A copy on a laptop, or in a test environment that exists for the convenience of trying things, does not naturally enjoy the same protection unless someone decides it must. We decided it must, and more importantly, we built it so that nobody has to remember.

Copies are where data quietly leaks

Here is the uncomfortable pattern, stated calmly: personal data is rarely mishandled on the live site, where everyone is paying attention. The risk concentrates in the copies, where nobody is. A database snapshot taken for debugging and forgotten in a downloads folder. A test environment with real customer emails and a login shared around a team. None of this involves bad intent. It is ordinary work, done under deadline, with data that happened to come along for the ride.

The traditional answer is a policy: be careful with production data. We do not think much of policies as a primary defense, not because people are careless, but because policies ask everyone to be careful every time, forever, and every time is a lot of times. The better answer is to make the safe path the only path, so that being careful stops being a daily act of discipline and becomes a property of the system. That is what we mean by privacy by construction.

Scrubbed before it arrives

On our platform, when a database copy is pulled from production into any non-production environment, personal data is scrubbed as part of the pull itself. Names, email addresses, phone numbers, and the other personal fields are replaced with realistic stand-ins before the data lands anywhere a developer works. This is not a separate cleanup step someone runs afterwards if they remember. It is built into the one path the data travels, which means there is no version of the workflow where real personal data ends up on a laptop by accident.

The scrubbed copy keeps everything development actually needs. The structure is identical, the volume is realistic, the content is real, and the edge cases that only show up with production-shaped data still show up. What a developer never needs is the true identity behind row four thousand, so that is precisely what the copy does not contain. The site on staging looks and behaves like the live one in every way that matters, while the people in the live database simply are not present in it.

Staging cannot email anyone, at all

Data at rest is half the story. The other half is what a test environment might do, and the classic incident goes like this: a copied site still contains real addresses somewhere, a developer tests a notification flow, and the system dutifully sends genuine emails to genuine people about things that are not real. A password reset nobody requested. An order confirmation for an order that does not exist. For the customer on the receiving end it is confusing at best and alarming at worst, and it is entirely preventable.

So we prevent it below the application, where prevention actually holds. Non-production environments on our platform are physically unable to deliver mail to the outside world; outbound mail is blocked at the environment level, full stop. Everything the site attempts to send is captured instead in a mail catcher, where the team can open each message, check its content and formatting, and confirm the flow behaves correctly, without anything leaving the environment. Notice the shape of that guarantee. It does not say we are careful not to email customers from staging. It says staging cannot email customers, which is a much stronger sentence, and the scrubbing means that even the addresses are not there to be mailed in the first place. Two independent layers, either of which would have to fail before a real person could be touched, and neither of which depends on anyone remembering anything.

What this does for your GDPR posture

If your organization operates in Europe, you carry responsibility for the personal data your website collects, and that responsibility follows the data into every copy. When someone asks where personal data lives and who can access it, an answer that ends with and an unknown number of database copies on development machines is not an answer anyone enjoys giving.

The construction above makes the honest answer short: personal data lives in production, and it does not travel into development or staging, because the copying process removes it in transit. Fewer places holding personal data means less to secure, less to account for, and less to worry about in the scenarios nobody likes to imagine, like a stolen laptop. We are not offering legal advice, and good data protection involves more than environments. But the environments are a place where real, structural risk reduction is available, and taking it makes every other conversation about your data easier and shorter.

Freedom is the other benefit

It would be easy to file all this under caution, but the lived experience is closer to the opposite. Guardrails, done properly, produce speed. A developer who knows the environment cannot send real mail and does not contain real people can test aggressively: trigger every notification, run the whole signup flow, break things on purpose to see how they fail. There is no hesitation before trying something, because the worst case is contained by construction.

Hesitation is expensive. Work slows down when every experiment begins with wait, is this safe here? Removing that question does not just protect your customers, it makes the work on your site faster and more thorough, because thorough testing no longer carries risk. Everyone gets a better deal at once, which is the mark of a well-placed guarantee.

A question worth asking anyone who runs your site

You do not need to audit anyone's infrastructure to raise the standard. Two plain questions do most of the work. When my site is copied for development, is personal data removed, and is that automatic or does someone have to remember? And can a test environment send email to real people, or is that impossible by design? The answers you want are automatic and impossible, and the word to listen for in both is not carefulness but construction. Carefulness is a fine quality in a team. It is just not what your customers' data should be depending on.

Share this article
Ottilia Zsigmond
Written by
Ottilia Zsigmond
Co-Founder & Project Lead

Digital marketing strategist and project manager with extensive experience in marketing Drupal projects, content operations, and client delivery. Bridges the gap between technical teams and business goals. Fluent in English, Hungarian, Romanian, and German — enabling seamless collaboration with clients across Central and Eastern Europe.

Enjoyed this article?

If this resonated, imagine what we could do working together on your Drupal site.