Redacted copies
Every document of a materialized version gets a redacted copy: a file in the
document’s own format, built by the ingest runner after the version’s text and
media. Every value the version’s text replaced is replaced in the copy by the
same token ([EMAIL], or [CUSTOMER_NAME_2] numbered as the text numbers it),
every embedded picture is covered by the same image reading the image documents
get, and the parts a copier cannot redact are left out.
A copy is downloaded by a tenant administrator through a short-lived ticket, or by
any reader of the version through a document link.
Its name is neutral: <name>-redacted<ext>, or document-redacted<ext> when the
original name itself held a value.
Per format
Section titled “Per format”| Original | Copy |
|---|---|
| Text PDF | A text PDF, values replaced in place; pages that cannot be trusted as text are re-typeset (below) |
| Scanned PDF, image | The covered pages, in the original’s format |
| Word, Excel, PowerPoint (OOXML) and OpenDocument | The same format, rewritten at the XML level (never converted) |
Plain text (.txt, .md, .csv, .log, .rst) |
The version’s reading, as the same type |
HTML, XML, JSON, YAML, TSV, mail (.eml, .msg) |
.txt of the version’s reading (markup is not rebuilt; attachments are documents of their own, with their own copies) |
| Audio | The toned recording |
| Video | The covered video with toned audio; none when the frames were not covered |
A format without a copier has no copy (copy_unsupported_format); its text is
still served or withheld on its own evidence.
Office documents
Section titled “Office documents”- Tracked changes are accepted, and authors and identifying metadata are cleared.
- A value split across runs, lines, cells or paragraphs is found and replaced; names with a syntax (sheet, table and bookmark names, links) get a sanitized replacement.
- No value runs across two parts of a document (body, headers and footers, sheet names, alternative text, links, charts): a value is cut at each part boundary, each piece keeping its class.
- Spreadsheets are recalculated first. Before a workbook with formulas is read, a sandboxed renderer (macros disabled, no network) computes the formulas again, so a name built by a formula is detected like any cell. The copy keeps each value, or its token, as a static value and drops every formula; the copy report lists each formula cell removed. A recalculation that fails leaves those cells empty and the document goes to review.
- Numbers keep their type. A date or an amount keeps its number format unless a value was redacted in it.
Content a reader cannot see
Section titled “Content a reader cannot see”A copy holds nothing its reader does not see. Content that is stored in a document but not displayed is removed from the copy rather than kept or revealed:
- Word and OpenDocument text: hidden runs and paragraphs, sections not displayed;
- presentations: hidden slides, with their notes and comments;
- workbooks: hidden and very hidden sheets (and the names that point at them), the cells of hidden rows and columns, and cells whose number format shows nothing.
The extraction still reads hidden content, so its values are detected and counted in the version’s text; the copy simply does not carry it, and the coverage record lists each removal. A merged cell over hidden rows or columns shrinks to its visible part; a workbook or presentation always keeps one sheet or slide.
Re-typeset PDF pages
Section titled “Re-typeset PDF pages”Some PDF pages draw text with a font whose glyphs no font table confirms: a
ToUnicode map or a font program that disagrees with the glyphs drawn, a Type3
font, glyphs that all read as spaces. On such a page the text a reader extracts
may not be the text the page shows, so covering only the values a reading finds
would trust that same reading.
Such a page is re-typeset as one picture:
- The page is rendered unable to draw text: every text-showing operator is removed from every content stream the page reaches, and clipping text modes become non-clipping. If any text object is left, the copy fails.
- Text-like vector paths are filled with the page’s background.
- The remaining graphics (images, rules, table frames) go under the version’s picture cover.
- The version’s reading of the page is drawn line by line in a bundled font (DejaVu Sans), tokens in place of values, along each line’s baseline and in the colour the original used there.
The guarantee: every glyph visible on a re-typeset page is drawn from the version’s reading; no glyph of the original is drawn. A font that draws one word and declares another shows the declared one. The copier refuses a copy whose lines would read as a value, and the runner checks every drawn line against the version’s redacted text.
The trade-offs:
- the page no longer looks like the original: another font, one size per line, no bold or italic, lines placed by their first and last glyphs;
- where a font lies, the page shows what the extraction read, not what the original drew: a reviewer comparing it with the original sees different words there, which is the font’s lie made visible;
- a small logo, icon or checkbox of letter size is taken for text and blanked;
- graphics painted through a text clip show whole;
- letters drawn as larger vector shapes, or inside images, are left to the picture cover and the render verification.
A re-typeset page always sends the document to a person’s review and to render verification. An approach that proved the drawn glyphs by OCR was built and dropped: OCR misreads short and stylised text, and a misreading in an attacker’s favour would pass as confirmed.
When a copy is offered
Section titled “When a copy is offered”A copy is offered only when every check passed:
- Coverage. The runner re-reads the written copy with a parser that is not the copier’s and checks that every run of three words in the copy occurs in the version’s redacted text, that every picture or object is covered or removed, and that every part the copier says it removed is absent. An incomplete copy is not stored.
- Render verification (documents in the validation sample and documents with a
doubtful reason). A separate job renders the copy, reads every page by OCR and
looks, deterministically, for the values the version redacts in that document
and for values of its pattern classes. A hit withholds the document and the
copy is not offered (
copy_failed:render_verification). A value of a text class the detection itself missed cannot be found this way: that is a gap of the version, which the review is for. - Review. A copy whose report asks for a look (rasterized or re-typeset pages, pictures to review, a failed recalculation) joins the document’s review reasons: the whole document is withheld until a person marks it, and the mark binds the copy’s SHA-256.