Skip to content

Build unpassword: zero-knowledge password removal for Google Workspace - #1

Merged
t11z merged 3 commits into
mainfrom
claude/wonderful-thompson-yv2gmd
Oct 6, 2026
Merged

t11z merged 3 commits into
mainfrom
claude/wonderful-thompson-yv2gmd

Conversation

@t11z

@t11z t11z commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

What

unpassword removes the password protection of PDF, DOCX/XLSX/PPTX and ZIP files whose password the user already knows, so the files can be archived under the user's own protection. The PR delivers four parts:

  • Static web app (web/, Vite + TypeScript, no UI framework, no backend), served at /app/:
    • Local mode: drag & drop, then download.
    • Drive mode: "Open with" or the Picker. The result is saved next to the original, with an option to trash the encrypted original.
  • Gmail launcher add-on (gmail-addon/, Apps Script): lists password-protected attachments, copies the still-encrypted attachment to Drive and opens the web app. It never decrypts anything.
  • Documentation site (site/, GitHub Pages): the reference for the Google Workspace Marketplace listing. It contains a landing page and the privacy policy, terms, security model, setup guide, support page, imprint and the brand assets.
  • Design (design/): the vendored Nullthrone Design System with self-hosted fonts, and the new unpassword mark.

Zero-knowledge

  • Decryption runs only in a dedicated Web Worker in the browser. There is no server.
  • The app's CSP limits connect-src to its own origin and Google's API hosts. The documentation pages have script-src 'none' and load nothing from third parties.
  • No Google Fonts request: Jost, Public Sans and JetBrains Mono are served from the site.
  • In local mode, no Google script is loaded.
  • OAuth scope is drive.file only. The token is kept in memory.
  • ESLint forbids localStorage, sessionStorage and IndexedDB. Buffers are overwritten after use (best effort).

Not a cracking tool

  • Exactly one typed password per attempt. There are no candidate lists; zip.js's candidate API is explicitly banned by a test.
  • Per-file rate limit: 2 free failures, then 5 s, 10 s, 20 s and so on, with a lock after 10 failures.
  • PDF policy (src/core/pdf/policy.ts, table-tested):
    • With the open password, permission restrictions are kept: the file is re-encrypted with AES-256, an empty open password and a random, discarded owner password. The result is verified.
    • Full decryption only with the owner password.
  • DRM, certificate-based protection, sheet protection and legacy Office formats are refused.
  • Static guardrail tests check for: guessing features, hash export, and network endpoints other than Google.

Formats

Format Implementation
PDF RC4/AES-128/AES-256 qpdf 12.2 (WASM). The password is passed as bytes in a fixed set of encodings of the same input, because qpdf-wasm does not transcode non-ASCII for R≤4
OOXML Agile / Standard Own implementation per MS-OFFCRYPTO (cfb + @noble/*), with an HMAC integrity check. A mismatch is reported as a warning
ZIP ZipCrypto / WinZip AES zip.js core API with CRC/MAC verification of every entry; zip-bomb limits

Site and Marketplace

https://nullthrone.github.io/unpassword/ serves the following pages. The setup guide (docs/SETUP.md §5) maps every listing field to its URL.

Page Path
Landing page /
Web app /app/
Privacy policy /privacy/
Terms of service /terms/
Support /support/
Security model /security/
Setup guide /setup/
Imprint /imprint/
Icons, banner and screenshots /marketplace/
  • The policy pages are rendered from docs/*.md, so the repository and the policy URLs cannot diverge.
  • scripts/render-brand-assets.mjs renders the icons (16–128), the banner (220×140), the social card and three 1280×800 screenshots from the mark and the app.
  • The Pages workflow builds the app and the site and publishes SHA256SUMS.txt over every file.

Tests

  • web: npm test runs 63 unit tests. npm run test:e2e runs 8 Playwright tests, including a network assertion: no host outside the app origin and Google is contacted, and the password never appears in a URL or request body.
  • site: node check.mjs checks that every page has a CSP and a title, that no page contains a script or external resource, and that internal links and anchors resolve.
  • scripts/crosscheck.py checks the outputs independently with pikepdf, msoffcrypto-tool and Python zipfile.
  • node --test gmail-addon/detect.test.mjs tests the add-on's detection logic.

Not testable here

These steps need a real GCP project, Marketplace SDK or clasp and are documented in docs/SETUP.md:

  • GCP project, OAuth client and API key
  • Marketplace SDK and the Drive UI integration
  • clasp deployment of the add-on
  • a manual run against the real Google services

Two assumptions are still unconfirmed:

  • the drive.file grant between the add-on and the web app when both are in the same project
  • the CSP details needed by the real Picker

The legal texts (terms, privacy, imprint) are drafts and need a legal review.

🤖 Generated with Claude Code

https://claude.ai/code/session_019AALVgpSE45DWgj4sdEeJs

claude added 2 commits October 6, 2026 05:51
Static web app that removes known passwords from PDF, OOXML and ZIP
files entirely in the browser, plus a Gmail launcher add-on.

- core: qpdf (WASM) for PDF with a permission policy that keeps owner
  restrictions unless the owner password is supplied; ECMA-376 Agile and
  Standard decryption with HMAC integrity check; zip.js for ZipCrypto
  and WinZip AES with CRC verification of every entry
- guardrails: one typed password per attempt, per-file rate limiting
  (lock after 10 failures), static tests against guessing features,
  persistence and non-Google endpoints
- Google: GIS token flow with drive.file only, Picker, Drive "Open with",
  direct REST upload; Gmail add-on copies only the encrypted attachment
- CSP restricts network access to the app origin and Google APIs
- tests: Vitest unit tests with fixtures, Playwright E2E incl. network
  leak assertions and mocked Drive, cross-check against pikepdf,
  msoffcrypto-tool and zipfile
- docs: security model, privacy policy, deployment setup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AALVgpSE45DWgj4sdEeJs
Resolve README conflict: keep the expanded README and carry over the
updated description (Office, PDF files and compressed archives, for
archiving purposes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AALVgpSE45DWgj4sdEeJs
@t11z t11z self-assigned this Oct 6, 2026
@t11z t11z added the enhancement New feature or request label Oct 6, 2026
- site/: static GitHub Pages site without JavaScript (CSP script-src
  'none'), rendered from docs/*.md plus a landing page; serves as the
  Google Workspace Marketplace reference (privacy, terms, support,
  imprint, brand assets). The web app moves to /app/.
- design/: vendored Nullthrone Design System tokens with self-hosted
  fonts (no Google Fonts request) and the new unpassword mark with
  PNG renderings, Marketplace banner, social card and screenshots
  (scripts/render-brand-assets.mjs).
- web/: app restyled on the design tokens (brand band, square
  controls, brass call to action, footer links to the policies);
  logic unchanged.
- docs/: TERMS, SUPPORT, IMPRINT; PRIVACY gains controller, hosting,
  legal bases and data subject rights; SETUP maps every Marketplace
  field to its URL.
- Gmail add-on and Drive "Open with" point to /app/; Pages workflow
  builds app and site and hashes every published file; CI checks the
  site (CSP, no external resources, no broken links).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019AALVgpSE45DWgj4sdEeJs
@t11z
t11z merged commit 8a7750a into main Oct 6, 2026
3 checks passed
Comment thread README.md
@@ -1,2 +1,105 @@
# unpassword

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants