<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tanramisu</title>
    <description>The latest articles on DEV Community by Tanramisu (@jckdj_icks_917496e6e63aa6).</description>
    <link>https://dev.to/jckdj_icks_917496e6e63aa6</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4284593%2Feeda29dc-bd1c-4f4c-b638-2688892a47ac.png</url>
      <title>DEV Community: Tanramisu</title>
      <link>https://dev.to/jckdj_icks_917496e6e63aa6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jckdj_icks_917496e6e63aa6"/>
    <language>en</language>
    <item>
      <title>Stripping Excel Pivot Caches, Bank Memos, and PII Inside a Single Offline HTML File</title>
      <dc:creator>Tanramisu</dc:creator>
      <pubDate>Sat, 05 Dec 2026 11:27:39 +0000</pubDate>
      <link>https://dev.to/jckdj_icks_917496e6e63aa6/stripping-excel-pivot-caches-bank-memos-and-pii-inside-a-single-offline-html-file-54mf</link>
      <guid>https://dev.to/jckdj_icks_917496e6e63aa6/stripping-excel-pivot-caches-bank-memos-and-pii-inside-a-single-offline-html-file-54mf</guid>
      <description>&lt;p&gt;Deleting the &lt;code&gt;email&lt;/code&gt; and &lt;code&gt;phone&lt;/code&gt; columns in Excel before sharing a spreadsheet rarely makes it safe.&lt;/p&gt;

&lt;p&gt;When I started inspecting real e-commerce and ERP exports (Shopify, Amazon, TikTok Shop, bank statements), four leaks showed up repeatedly even after people manually scrubbed customer columns:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Excel hidden residue&lt;/strong&gt;: &lt;code&gt;xl/pivotCache/&lt;/code&gt; XML files still hold cached source records from deleted columns; workbook properties keep author and company names; hidden sheets and cell comments survive casual edits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free-text bank memos&lt;/strong&gt;: Transfer descriptions routinely embed counterparty names, IBANs, and VAT numbers (&lt;code&gt;ZELLE FROM JOHN DOE · IBAN GB29...&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Commercial identity&lt;/strong&gt;: Even with customer PII gone, store names, SKU codes, supplier names, and exact revenue totals still expose business margins and vendors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Irreversible redaction&lt;/strong&gt;: Once you replace values with &lt;code&gt;***&lt;/code&gt;, you cannot map findings from an external audit back to the original orders.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Here is how I built a zero-network, single-file browser sanitizer to solve those four issues without requiring a server.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Enforcing zero network egress at the browser layer
&lt;/h3&gt;

&lt;p&gt;Instead of asking users to trust a privacy promise, the standalone HTML file ships with a strict Content Security Policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;http-equiv&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Content-Security-Policy"&lt;/span&gt;
      &lt;span class="na"&gt;content&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; connect-src 'none'; object-src 'none'; base-uri 'none'; form-action 'none'"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With &lt;code&gt;connect-src 'none'&lt;/code&gt;, &lt;code&gt;fetch&lt;/code&gt;, &lt;code&gt;XMLHttpRequest&lt;/code&gt;, and &lt;code&gt;sendBeacon&lt;/code&gt; are blocked by the browser engine itself. All JS and CSS are inlined at build time into a single ~630 KB HTML file that runs from &lt;code&gt;file://&lt;/code&gt; with Wi-Fi turned off.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Inspecting Excel ZIP internals before flattening to CSV
&lt;/h3&gt;

&lt;p&gt;An &lt;code&gt;.xlsx&lt;/code&gt; file is a ZIP archive. Before exporting a clean UTF-8 CSV, the parser inspects the archive entries for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docProps/core.xml&lt;/code&gt; and &lt;code&gt;docProps/app.xml&lt;/code&gt; (author, last modified by, company)&lt;/li&gt;
&lt;li&gt;Hidden worksheet flags in &lt;code&gt;xl/workbook.xml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;xl/comments*.xml&lt;/code&gt; and formula cells&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;xl/pivotCache/&lt;/code&gt; and &lt;code&gt;xl/externalLinks/&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Exporting strictly evaluated cell values to a fresh UTF-8 CSV drops all of those structures automatically, while surfacing a report of what was stripped.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Preserving accounting math while hiding revenue scale
&lt;/h3&gt;

&lt;p&gt;Sometimes you want an outside analyst to check net margin or fee percentages without revealing whether your store does $50k or $5M a month.&lt;/p&gt;

&lt;p&gt;Multiplying every monetary column by a single local random factor &lt;code&gt;k&lt;/code&gt; keeps every ratio, margin percentage, and fee discrepancy proportional. The factor is stored only inside the local key file (&lt;code&gt;_meta.scaleFactor&lt;/code&gt;), so when the audit report comes back in JSON or CSV, dividing by &lt;code&gt;k&lt;/code&gt; restores exact figures locally. (The UI explicitly notes to keep scaling off when fixed statutory tax thresholds matter.)&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Encrypting the local key file with Web Crypto
&lt;/h3&gt;

&lt;p&gt;Because the local mapping JSON can reverse every token, leaving it in plain text on a shared drive is its own risk. Using native &lt;code&gt;crypto.subtle&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Derive a 256-bit AES-GCM key from an optional user passphrase via PBKDF2-SHA256 (210,000 iterations, random 16-byte salt).&lt;/li&gt;
&lt;li&gt;Encrypt the JSON vault with a random 12-byte IV.&lt;/li&gt;
&lt;li&gt;Store the encrypted envelope locally; decryption happens only in memory during restore.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Full-sheet verification pass
&lt;/h3&gt;

&lt;p&gt;Before any file downloads, a second verification pass scans 100% of output rows and cells against the PII, commercial, and custom-term detectors. If anything slipped through a kept text column, export pauses and lists the remaining hits. In benchmarks, sanitizing and verifying 50,000 rows takes ~600 ms in V8.&lt;/p&gt;




&lt;p&gt;I built this as the free offline front-end for &lt;a href="https://tanramisu.com/" rel="noopener noreferrer"&gt;Tanramisu&lt;/a&gt;, a row-cited payout reconciliation and tax summary tool. If you want to test the sanitizer directly (there is a built-in sample sheet, no login needed), it lives at &lt;a href="https://clean.tanramisu.com/" rel="noopener noreferrer"&gt;clean.tanramisu.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>security</category>
      <category>privacy</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
