Skip to content

Privacy and preparation

Final dataset privacy validation: test the bytes, not the table

By SourceX Editorial · Reviewed by Noah Loul ·

10 sections

Short answer

Final dataset privacy validation has to run on the exact files that ship, after the last conversion, compression or packaging step, because those steps can carry excluded content back in. In a synthetic test of 14 packaging steps, 11 left planted tracer values in the delivery. A buyer's view of the files caught 5, a raw byte search 6, and only a format-aware deep scan caught all 11.

Redaction

Final dataset privacy

This page covers final dataset privacy validation: test the bytes, not the table.Illustrative

Key takeaways

  • Validate the package that ships, after the last transformation: in the test, the last check before packaging passed all 11 packages that leaked.
  • Opening the files as a buyer would caught 5 of 11 leaks and a raw byte search caught 6; four leaks (hidden cells, a hidden sheet, an appended archive member, git history) were invisible to both.
  • Compression hides content from byte searches: the search found 0 tracers in a gzip file and 2 of 180 in a snappy-compressed Parquet file that held all 180.
  • Plant synthetic tracers only in excluded content before preparation, so a correct pipeline removes them and any hit in the final files points to a leaking step.
  • A clean tracer test proves scope was respected, not that the remaining records are de-identified; keep that review separate.

What does final dataset privacy validation have to prove?

It has to prove that the files you are about to release, byte for byte, contain nothing the approved scope excluded. A check on the working table, on the export script or on the sample a reviewer approved last week does not prove that, because the final steps of preparation (writing a file format, converting between formats, compressing, archiving, committing to a repository) can bring excluded content back or keep it where no viewer shows it.

The decision is binary for each release: ship this exact package, or hold it, fix the step that leaked and test again. Three records settle it: a test on the final package with known excluded values planted upstream, the ways of reading the files that were used, and a checksum tying the pass to the delivered bytes.

This page is about scope leakage: an excluded column, withdrawn rows, a field the de-identification step was meant to drop. Whether what remains could identify someone is a separate review.

Where does excluded content hide after the last transformation?

Excluded content hides in structures that survive a visual check: hidden cells and sheets, indexes and encoding dictionaries, nested copies of a field, superseded archive or repository members, and free space inside a database file. None needs a bug; each is a common tool's default behavior.

At a glance

Where does excluded content hide after the last transformation

The UK Information Commissioner's Office, in its guidance on disclosing documents to the public securely (UK GDPR), names hidden rows and columns, hidden worksheets and pivot tables as places where personal information stays in a file that looks clean, and advises checking an exported CSV because hidden columns can still appear in it (paraphrased from the guidance page). ISO/IEC 27038:2014, the international specification for digital redaction, covers redaction techniques, requirements for redaction tools and methods for testing that redaction was completed securely, and its stated scope leaves out redacting information from databases, so a database delivery needs a test of its own.

The six mechanisms below are the ones the measurement in the next section exercises:

  • Hidden, not deleted: spreadsheet rows, columns and sheets keep every value when hidden, and any program that reads the file can read them.
  • Moved, not removed: in pandas 3.0.5, to_csv writes the index by default ("index : bool, default True", "Write row names (index)."), and to_parquet stores any index other than a plain range as a column, so an identifier parked in the index for a join ships with the file.
  • Encoded once, kept after filtering: a categorical or dictionary encoding built on the full export can keep the values of rows filtered out later.
  • Copied twice: API exports often repeat a field inside a nested object, and a drop rule that names the top-level field leaves the nested copy.
  • Superseded, not erased: an archive updated by appending a corrected file keeps the old member, and a dataset repository keeps every version ever committed.
  • Deleted, not overwritten: SQLite's documentation says that when secure_delete is on, SQLite overwrites deleted content with zeros, and that the setting defaults to off unless the library was compiled with the SQLITE_SECURE_DELETE option.

Fourteen packaging steps, four ways of looking: what the test found

We built one synthetic support-ticket table of 200 tickets and made every excluded value a tracer: a unique, searchable marker such as ZQC0001X that is very unlikely to occur by chance. The excluded column (a requester email) held 200 tracers, the 20 withdrawn tickets each carried one in their text, and the JSON exports repeated the email inside a nested requester object. Then we packaged the table 14 ways, each a step that turns up in real deliveries, and searched every package four ways.

The four views were: the last check before packaging, run on the object the pipeline believed it was writing; the buyer's view, opening each file the way a recipient would; a byte search of every delivered file without decompressing anything; and a deep scan that reads each format's own structure, from zip members with duplicate names to Parquet dictionaries, git history and raw database pages. The methods note gives each definition exactly.

Three packages were clean in every view: the two controls written straight from the approved table (CSV and Parquet) and a SQLite file built with secure_delete on, which is this build's default. The other 11 carried tracers into the delivery. The last check before packaging caught none of them. The buyer's view caught 5, the byte search 6, and the two together 7. Four leaks were invisible to both: hidden cells, a hidden sheet, an appended archive member and git history. The deep scan found tracers in all 11.

Each of the 11 was then rebuilt the safe way (the fix is named in the matrix further down), and the deep scan and the byte search found zero tracers in every rebuilt package. The table lists the leaking packages; the two JSONL packages share a row, plain and then gzip-compressed:

Fourteen packaging steps, four ways of looking: what the test found
Packaging stepTracers in step inputBuyer's view foundByte search foundDeep scan found
CSV, identifier moved into the index220180180180
XLSX, excluded column and rows hidden22000220
That XLSX converted to CSV with pandas220220220220
XLSX, source tab left as a hidden sheet22000220
JSONL, nested copy kept (plain, gzip)360180 and 180180 and 0180 and 180
ZIP, corrected file appended under the same name22000220
SQLite, rows deleted and column dropped, secure_delete off22009494
Git dataset repository, file replaced in a later commit22000220
Parquet, identifier kept as the index2201802180
Parquet, categories of removed rows kept2200120
A set diagram of 11 leaking packages inside a box for the deep scan: two overlapping circles for the buyer's view and the byte search hold seven packages, four in the overlap, one in the buyer's view only and two in the byte search only, while four packages (hidden cells, hidden sheet, appended zip member, git history) sit outside both circles.
Each of the 11 leaking packages placed by the views that caught it; the last check before packaging caught none. Synthetic data.

Why do a buyer's view and a byte search each miss what the other catches?

Because they fail in opposite directions: a viewer hides what the format hides, and a byte search cannot read compressed bytes. An XLSX workbook is a zip package, git stores objects compressed, gzip is compression by definition, and pandas 3.0.5 compresses Parquet pages with snappy by default ("compression : str or None, default 'snappy'"). So the byte search found nothing in the hidden-cell and hidden-sheet workbooks, the appended archive, the gzip file and the repository, and only 2 of 180 tracers in the Parquet index case and 1 of 20 in the categories case. A single hit is enough to stop a release, but it badly understates the leak.

The buyer's view fails on everything a format keeps out of sight: hidden structures, the earlier member an extraction overwrites, the history behind a checked-out tree, freed page space a query never returns and categories no row uses. A recipient with ordinary tools can still reach all of it: in the converted CSV, all 220 tracers the workbook hid came back as plain columns and rows.

The deep scan worked because it reads each format through its own structure, which is also its limit: a file type the scanner does not parse has not been checked. The checklist therefore requires a type inventory and treats any unparsed type as a hold.

The tracer test: plant markers upstream, scan the bytes you ship

Plant synthetic markers in everything the scope excludes before preparation starts, run the pipeline unchanged, then scan the exact package that will ship. The markers live only in excluded content, so a correct pipeline removes them along with everything else and nothing has to be cleaned out of the delivery afterward. The procedure:

At a glance

The tracer test: plant markers upstream, scan the bytes you ship

  • Before preparation, add synthetic tracer rows to every excluded population (withdrawn accounts, restricted customers, out-of-range dates) and tracer values to every excluded column and field the de-identification step must drop, nested paths included.
  • Write the tracer list, its pattern and a list of known excluded source values to the preparation log, held apart from the package; never write any of them into the deliverable.
  • Run the full pipeline exactly as it will run for release, final conversion, compression and archive steps included.
  • Inventory the package from its bytes: every file, its type from its leading bytes rather than its extension, every member of every container including duplicate names, and the full history of any repository.
  • Deep-scan every file through its format for tracers and known excluded values; hold any file type the scanner cannot parse.
  • Also run the buyer's view and a byte search, and record all three results side by side.
  • On any hit, hold the release, trace the hit to the step that produced it, fix the step and rerun from the start.
  • Record the checksum of the passing package with the scan report, so the delivered bytes can be matched to the bytes that passed.

Privacy-utility review matrix for package formats

Each format has its own way of bringing excluded content back, its own check on the final bytes and a fix whose cost to utility is usually small. The matrix pairs them and names the record that closes each row:

Privacy-utility review matrix for package formats
Package elementHow excluded content returnsCheck on the final bytesFix and utility costRecord that settles it
Spreadsheets (XLSX)Hidden rows, columns and sheets keep values; converting to CSV can bring them backUnzip and search every sheet's XML, hidden or notDelete instead of hide; no cost if the visible view was the approved scopeSheet list with states and a scan result per part
Data frames written to CSV or ParquetThe index is written by default; categories survive row filtersRead every column, index and dictionary, plus file metadataWrite with index off and drop unused categories; no costWriter call and the final file's schema
Nested JSON and JSONLCopies inside nested objects survive a top-level drop ruleFlatten every path and search all valuesDrop fields by full path; nested structure needs a recheckList of dropped paths
Compressed files and archivesByte search reads nothing; appended members keep old copiesDecompress every member, duplicate names included, and match the member list to the manifestRebuild archives from approved files only; costs rebuild timeMember list with counts and checksums
Database files (SQLite)Deleted rows and dropped columns linger in free spaceSearch raw pages and read the secure_delete settingVACUUM or turn on secure_delete before release; costs rebuild timePragma values and a post-VACUUM scan
Repositories and dataset hubs (git)Every committed version stays in historyScan every object in history, not the checked-out treePublish a fresh repository holding only approved files; history is lostObject count and history scan result
Any conversion between formatsThe converter reads what the source format hidRescan after every conversion, not only the sourceConvert from the approved table, never from a viewer file; no costConversion log with a scan per output

If identifiers were removed upstream and the transfer is encrypted, why test again?

Because both claims describe other objects. Removing direct identifiers is a statement about the working table, and encryption protects files in transit without saying anything about what is inside them. In the measurement, every one of the 11 leaking packages came from a pipeline whose last check before packaging passed; that check found zero tracers in all of them.

Some exclusions are not about privacy at all. Records of a customer whose contract forbids licensing, or a date range outside the agreement, become a rights breach if they travel inside a hidden sheet or an old archive member, even with every name replaced. A tracer test covers both kinds, because it tests scope, not identifiability.

The reverse holds too. A package that passes has kept excluded content out; it has not shown that the remaining records are safe to share, so never write a pass up as a privacy clearance.

Before release: the final-bytes checklist

Release only when every item below is recorded for the exact package being delivered:

Checklist · 9 items

  1. Tracer records were planted in every excluded population, column and nested field before preparation, and the tracer list is stored outside the package.
  2. The scan ran on the final package after the last conversion, compression, archive and commit step, not on an intermediate file.
  3. A type inventory, read from leading bytes, lists every file and container member, and no file type is left unparsed.
  4. Deep scan, buyer's view and byte search results are recorded side by side, each with zero tracers and zero known excluded values.
  5. Spreadsheets contain no hidden rows, columns or sheets, and every conversion output was rescanned.
  6. Data frame outputs were written with the index off unless the index is an approved field, and categorical columns hold only categories in use.
  7. Archives were built fresh from approved files, and the member list matches the manifest with no duplicate names.
  8. Database files were vacuumed or written with secure_delete on, and repositories hold only approved history.
  9. The checksum of the passing package is recorded with the scan report and matches the delivered bytes.

0 of 9 ticked. Tick each item as you go.

How final validation lines up with SourceX's published process

SourceX's public pages describe its process in general terms; final validation is evidence that whoever prepares the files can keep alongside it. The how-it-works page says that once SourceX gives the go-ahead, the data is "extracted, transferred and de-identified through approved processing routes," and the trust page says SourceX "reviews the result against the agreed scope." The same page says "Source, rights, preparation and permitted use are documented with each dataset," and the legal framework page notes that the de-identification method used is recorded for each dataset.

None of those pages describes tracer tests or byte-level scans, so nothing here is SourceX's own procedure. The pages do fix the reference point: the scope in the signed agreement, which the company approves before any data is delivered. A tracer report against that scope shows the files respect it, whether the data stays in the supplier's storage or ships on encrypted drives, both options the trust page names.

If you are weighing whether your records could be licensed at all, the first step is a short company assessment with no data upload. Its result is an indication of fit; it is not an offer and promises no payment.

Methods note: the synthetic table, the four views and the limits

Data: one synthetic table generated by the script from loop counters, with no personal data. It has five text columns, in this order: ticket_id (T0001 to T0200), created (a 2025 date written YYYY-MM-DD), category (billing, login, shipping, refund or other), body (for example "Customer reports a login issue, case 1." and, for withdrawn ticket 10, "Customer reports a billing issue, case 10. Account note ZQR0010X.") and requester_email (for example ZQC0001X@tracer.invalid). 200 tickets; 20 excluded rows (ticket number divisible by 10), each with a row tracer in its text; an excluded column, requester_email, holding 200 tracer values under the reserved .invalid domain; in the JSON recipes, a nested requester.email copy for each of the 180 kept records. A tracer is a token matching ZQ[CRN] followed by four digits and X, matched case-sensitively (every tracer is generated in upper case). A view finds a tracer when the token occurs in what that view reads; counts are distinct tokens; a view catches a package when it finds at least one tracer. Tracers in the step input counts the distinct tokens anywhere in the data a step starts from: 220 for the table steps (200 column, 20 row) and 360 for the JSON steps (180 top-level and 180 nested email copies for the 180 kept records; withdrawn tickets are not in the JSON export).

Views. Last check before packaging, depending on the step: the text of the data frame's columns without the index; the visible cells of the workbook as built (for the conversion step, of the source workbook); the top-level scalar fields of each JSON record; the corrected file before it was appended to the archive; the result of SELECT * on the database; or the approved file committed last. Buyer's view: CSV and JSONL read as text; gzip decompressed; visible cells of visible sheets only, skipping hidden rows and columns; the archive extracted with Python's zipfile, where a duplicate name resolves to the last member; SELECT * on every table; the checked-out working tree; Parquet loaded with pandas and printed with any stored index. Byte search: the raw bytes of every delivered file, repository internals included, with nothing decompressed. Deep scan: gzip decompressed; every zip member in the archive's full member list, duplicates included, scanned recursively (XLSX parts included); every Parquet column read with its dictionary, plus the file's key-value metadata; every object in the git object store plus the checked-out files; and SQLite's raw file bytes, whose pages are not compressed, so for SQLite the deep scan equals the byte search.

Steps: the 14 packages and 11 fixes are in xs0874_packaging_tracers.py in the writer's scratch bin folder, with results in xs0874_results.json (counts only). The SQLite build used here defaults secure_delete to on (the script reads the setting); the leaking SQLite package sets it off to represent builds compiled without the option, and the fix vacuums. The SQLite packages store the five columns as TEXT in one table, insert the 200 rows in ticket order at the default page size of 4,096 bytes, then delete the 20 withdrawn rows and drop requester_email without VACUUM; in this build 94 of 220 tracers survived in freed space inside the database pages, and the count depends on row sizes and page layout. Appending the corrected archive member made Python's zipfile emit a duplicate-name warning, which the script silences. No randomness is used. Environment: Python 3.13.16, pandas 3.0.5, pyarrow 26.0.0, openpyxl 3.1.5, SQLite 3.45.1, git 2.43.0; run 2026-10-28.

Limits: one small synthetic table, and 14 steps chosen to cover common mechanisms, not a sample of real pipelines, so the counts show what each view can miss, not how often leaks happen. Byte-search results for compressed formats depend on the library and settings; snappy left a few tokens readable here. The deep scan covers only the formats it parses: PDF, Word, pivot caches, images and email were not tested, and tracers test only planted values, not unknown personal data.

Frequently asked questions

What is a tracer value in dataset validation?

A tracer is a synthetic marker, such as a made-up email under a reserved domain, planted only in content the approved scope excludes. If any tracer appears in the final files, excluded content leaked somewhere in preparation or packaging. Because tracers sit only in excluded content, a correct pipeline removes them without extra cleanup.

Is converting a spreadsheet to CSV a safe way to drop hidden content?

Only if you check the result. In the test here, a pandas conversion of a workbook with a hidden column and hidden rows brought back all 220 tracers as plain columns and rows. The UK ICO's guidance on disclosing documents also advises checking an exported CSV, because hidden columns can still appear.

Is a byte search of the final files enough?

No. Compressed formats hide content from a raw byte search: XLSX packages, gzip files, git objects and snappy-compressed Parquet pages. In the measurement a byte search missed four leaks a viewer also missed, and found only 2 of 180 tracers in one Parquet file.

Do we need to rerun validation after every packaging change?

Yes. Any change to the final steps, such as a new compression setting, an extra conversion, an updated archive or a repository commit, creates a new package, and only a scan of that package covers it. Record the checksum of the passing package so the delivered bytes can be matched to the scan.

Does a clean tracer test mean a dataset is de-identified?

No. It shows that excluded content stayed out of the files. Whether the remaining records could identify someone, alone or combined with other data, is a separate review with its own evidence.

Sources

  • The UK ICO's guidance on disclosing documents to the public securely (UK GDPR) names hidden rows and columns, hidden worksheets and pivot tables as places where personal information stays in a spreadsheet, and advises checking an exported CSV because hidden columns can still appear. Source
  • ISO/IEC 27038:2014, Specification for digital redaction, covers redaction techniques, requirements for redaction software and methods of testing that redaction was completed securely; redacting information from databases is outside its scope. Source
  • SQLite's pragma documentation: when secure_delete is on, SQLite overwrites deleted content with zeros; the default is off unless the library is compiled with SQLITE_SECURE_DELETE. Source
  • pandas 3.0.5 documents to_csv's index parameter as "index : bool, default True" with "Write row names (index)." Source
  • pandas 3.0.5 documents to_parquet's compression default as snappy and says that with index left as None, indexes other than a RangeIndex are included as columns in the file. Source
  • SourceX's how-it-works page says that once SourceX gives the go-ahead, the data is extracted, transferred and de-identified through approved processing routes. Source
  • SourceX's trust page says it reviews the de-identified result against the agreed scope, documents source, rights, preparation and permitted use with each dataset, and that large datasets can stay in the supplier's storage or ship on encrypted drives. Source
  • SourceX's legal framework page says the de-identification method used is recorded for each dataset. Source

See if your company qualifies

A short company assessment. No data uploads are needed.

See if your company qualifies