Skip to content

Persist hash verification and unlocked volumes; fix recents and Office previews - #171

Merged
switch-nz merged 1 commit into
mainfrom
fix-persistence-and-office-preview
Oct 1, 2026
Merged

switch-nz merged 1 commit into
mainfrom
fix-persistence-and-office-preview

Conversation

@switch-nz

Copy link
Copy Markdown
Owner

What

  • Hash verification now persists: the badge is drawn from the verification recorded in the case, so it survives reloading the case or switching exhibits.
  • Recent cases: setting an examiner name files the open case under that name, and the Cases view refreshes. Previously a case opened before a name was set stayed under "unattributed" and vanished from the named examiner's list.
  • Unlocked BitLocker/LUKS volumes stay unlocked when the case is reopened. The case keeps the FVEK / master key, re-verifies it on reopen (BitLocker must decrypt to a filesystem header; LUKS must match the header digest), and logs volume.unlock.restored. Locking a volume or removing its evidence drops the key.
  • Office previews: .docx/.xlsx/.pptx (and macro/template/OpenDocument variants) open as documents instead of archive listings. Word/Excel/PowerPoint write [Content_Types].xml first, so the first-entry sniff never matched; they are now recognised from later entries or the extension.

Security note

The case file now holds volume decryption keys, so anyone who can read a case can read its unlocked volumes without the password or recovery key. Passwords and recovery keys themselves are never stored.

Tests

New: tests/test_recents_whoami.py (live-server test) and three kept-key tests in tests/test_bitlocker.py. The test_b*, test_c* and test_l* files pass (198 tests). The web changes (web/app.js) have no JS test harness and were only syntax-checked plus a hand check of the zip-detection pattern; not exercised in the UI.

🤖 Generated with Claude Code

… Office previews

- Hash verification: the badge is now drawn from the verification recorded in
  the case, so it survives reloading the case or switching exhibits.
- Recent cases: setting an examiner name files the open case under that name,
  and the Cases view refreshes.
- Unlocked volumes: the case keeps the BitLocker FVEK / LUKS master key, checks
  it again on reopen, and restores the volume unlocked. Locking a volume or
  removing its evidence drops the key. The case file therefore holds
  decryption keys.
- Office previews: OOXML files whose first zip entry is [Content_Types].xml
  (Word, Excel, PowerPoint) are recognised from later entries, or from the
  file extension, and open as documents rather than archives.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@switch-nz
switch-nz merged commit 59bddb0 into main Oct 1, 2026
32 checks passed
@switch-nz
switch-nz deleted the fix-persistence-and-office-preview branch October 1, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant