Repository navigation
Ship a working download, verify the password, and make the docs true - #3
Merged
Merged
Conversation
The website's three download buttons pointed at release assets that were never published -- cipherbox-windows-x64.zip and friends all returned 404. The only artefact that actually exists is CipherBox.exe. Site: make that executable the primary path. The hero and the download section link straight to it, with the SmartScreen warning and checksum verification explained next to the button. macOS, Linux and the pip/source install move into a collapsed secondary block, and the usage section leads with double-clicking rather than `python main.py`. Release workflow: publish the Windows binary under the fixed name CipherBox.exe alongside the archives, so the URL the site links to keeps resolving for future releases. Install residue: a config file left behind by an interrupted setup, an old test run or a previous build holds no usable salt. It used to count as an existing install, sending the user to a password prompt where nothing works and a dead-end "Please reinstall" -- which cannot help, because the residue lives in ~/.cipherbox, not in the install. Such a config is now detected and removed, and setup runs again. A config carrying a real salt is never touched; deleting that would make encrypted files unreadable forever. Config writes are atomic and created at 0600, so an interrupted write no longer leaves a half-written file or a stray temp file behind. Build residue: add a .gitignore for build/, dist/ and __pycache__, wipe them in CI before building, and fail the build if dist/ holds anything other than the single expected binary. Drop test_imports.py and five stale session documents left over from earlier development. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqnhxYTPs7xFgk5GCBdTYd
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Five follow-ups from reviewing the tool end to end. Password verification. verify_password() was named for a check it never did: it derived a key and opened the main window, so any password got in and the mistake only surfaced later as "Wrong password or corrupted file" on the user's own files -- which reads like the file is damaged. Setup now stores a token encrypted with the derived key, and login rejects a password whose key cannot decrypt it. Configs written before this keep working: the password is unverifiable there, so the token is backfilled after a decryption proves the key rather than guessed at login. Large files. The site promised multi-GB support the implementation cannot deliver. Files are not streamed -- the original bytes, the payload built around them and Fernet's base64 ciphertext all sit in memory at once, which measures at roughly 9x the file size from 8 MB to 96 MB. A 1 GB file needs several GB and dies with a MemoryError. The app now warns before starting on anything above 256 MB, naming each file and its estimated cost, and the site, README, GUIDE and QUICKSTART carry measured numbers instead of the old invented benchmark table. Secure deletion. The three overwrite passes were never flushed, so the OS was free to cache and collapse them and the original bytes could survive untouched. Each pass is now flushed and fsync'd, and written in 4 MB chunks rather than allocating a buffer the size of the file. The docs no longer imply this defeats recovery on an SSD -- wear levelling puts the old blocks out of reach of any file API, and full-disk encryption is the real answer. Dead documentation. QUICKSTART and GUIDE told users to run install.bat and install.sh, neither of which exists in the repo. Both now describe the real paths: the executable first, source second. GUIDE's file tree matches the repo again, and each document says who it is for. Also: LISENCE renamed to LICENSE and titled so GitHub detects MIT, and a tests workflow runs the suite on Linux, Windows and macOS against Python 3.10 and 3.12 -- with PYTHONIOENCODING set, since the suite's check marks otherwise crash on a Windows runner's legacy code page. Test suite grows from 9 to 12 cases, numbering itself now rather than by hand. Verified against the real GUI under Xvfb: setup, relaunch, residue recovery, the large-file warning and an encrypt round-trip. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UqnhxYTPs7xFgk5GCBdTYd
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Started as two reported problems, grew to cover what reviewing the tool end to end turned up. Two commits: the reported fixes, then the follow-ups.
Part 1 — the two reported problems
The download buttons were dead
The site linked to
cipherbox-windows-x64.zip,cipherbox-macos-arm64.zipandcipherbox-linux-x64.tar.gzunderreleases/latest/download/. All three returned 404 — the release workflow that would produce them has never run, and the only published artefact is a hand-uploadedCipherBox.exe.The executable is now the primary path: hero and download section link straight to it, with the SmartScreen warning and
certutilverification explained beside the button. macOS, Linux and thepip/source install moved into a collapsed secondary block. The release workflow now also publishes the Windows binary under the fixed nameCipherBox.exe, so that URL keeps resolving for future releases.Old residue could lock you out of a fresh install
~/.cipherbox/config.jsoncounted as an existing install purely because the file existed. A config from an interrupted setup or an old test run holds no usable salt, so the app skipped setup, showed a password prompt where nothing could ever work, and dead-ended on "Configuration error. Please reinstall." — advice that cannot help, since the residue lives in the home directory, not the install.Such a config is now detected and cleared, and setup runs again with a visible reason. A config carrying a real salt is never touched — deleting that would make encrypted files unreadable forever. Writes are atomic at
0600, so an interrupted write leaves neither a half-written config nor a stray temp file. Plus a.gitignore, a CI clean step that fails the build ifdist/holds anything but the expected binary, and the removal oftest_imports.pyand five stale session documents.Part 2 — follow-ups
verify_password()never verified anythingIt derived a key and opened the main window:
So a typo got you in, and surfaced later as "Wrong password or corrupted file" against your own files — which reads like the file is damaged, not the password wrong. Setup now stores a token encrypted with the derived key; login rejects a password whose key cannot decrypt it.
Older configs keep working: the password is genuinely unverifiable there, so the token is backfilled after a successful decryption proves the key, never guessed at login.
The multi-GB claim was not true
Files are not streamed. The original bytes, the payload built around them and Fernet's base64 ciphertext all sit in memory at once. Measured:
A 1 GB file needs several GB and dies with a
MemoryError. The app now warns before starting on anything above 256 MB, naming each file and its estimated cost. The site, README, GUIDE and QUICKSTART carry measured numbers — GUIDE's old benchmark table claimed a 1 GB file encrypts in 30 seconds and that key derivation takes 1.5 s (actually ~124 ms here).Secure deletion did not reach the disk
The three overwrite passes were never flushed, so the OS was free to cache and collapse them — the original bytes could survive untouched. Each pass is now flushed and
fsync'd, and written in 4 MB chunks rather than allocating a buffer the size of the file.The docs no longer imply this defeats recovery on flash storage: wear levelling writes each pass to a fresh block and leaves the original unreachable through any file API. Full-disk encryption is the dependable answer, and the README now says so.
The docs pointed at files that do not exist
QUICKSTART and GUIDE told users to double-click
install.bator run./install.sh. Neither exists in the repo — the documented installation path simply could not be followed. Both now describe the real ones, executable first. GUIDE's file tree matches the repo again, and each document states who it is for.Smaller
LISENCE→LICENSE, titled so GitHub detects MIT (three site links updated). Newtests.ymlruns the suite on Linux, Windows and macOS against Python 3.10 and 3.12 — withPYTHONIOENCODING: utf-8, since the suite's check marks otherwise crash on a Windows runner's legacy code page (verified: it exits 1 without it).Verification
big.bin — 512 MB, needs about 4,608 MB of RAM), and an encrypt round-trip through the app's own worker.dist/, app modules bundled, zero test modules.Important
The
.exethe site links to is still the May build and does not contain these fixes. It needs av*tag after merge to trigger the release workflow — that also produces the macOS and Linux binaries, which have never been built. Until then those platforms point at the releases page and the source install rather than at a link that would 404.