Skip to content

persistent-setup: warn instead of forcing reboot on weak passphrases - #292

Merged
BenWestgate merged 3 commits into
masterfrom
claude/project-thread-2cbysl
Oct 1, 2026
Merged

BenWestgate merged 3 commits into
masterfrom
claude/project-thread-2cbysl

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Requested by Ben · project thread

Before: if keepassxc-cli estimate scored the existing Persistent Storage passphrase under 50 bits, persistent-setup showed a warning with only a "Restart Now" button and rebooted. A 5-word BIP39-style passphrase (49.9 bits) hit this and could not get past setup.

After: that warning offers "Continue Anyway" next to "Restart Now", with Restart as the default. Scores of 65 bits and up still pass silently, and the 50–65-bit warning is unchanged.

This is the "make the <50-bit case a warning rather than a forced reboot" half of the fix ACKed on #243, chosen over #289's approach of removing the check.

The other half, scoring the passphrase with its spaces, was tried in the first commit and reverted after review. The separators added about 30 bits: correct horse battery staple went from 47 to 70 bits and passed. Spaces are stripped again before scoring, as on master. Random phrases from KeePassXC's EFF large wordlist still score well with spaces stripped (40 samples each):

words min median under 65
5 62.6 75.1 1/40
6 75.4 90.6 0/40
7 90.6 108.3 0/40

How: the <50-bit zenity --warning becomes a --question that breaks out of the loop on Continue, matching the existing 50–65-bit dialog.

Checks: bash -n and shellcheck clean. Not run in a Tails VM.

🤖 Generated with Claude Code

https://claude.ai/code/session_019JziKN4UP3pEXBVsdSYJDQ

Stripping spaces before keepassxc-cli estimate scored random-word
passphrases as one concatenated token, so a five-word passphrase could
fall below 50 bits and force a reboot. Keep the spaces, and let the
lowest-score warning continue instead of rebooting unconditionally.

Refs #243.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019JziKN4UP3pEXBVsdSYJDQ
@BenWestgate BenWestgate self-assigned this Sep 30, 2026

BenWestgate commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner Author

github-advanced-security failed, but not because of this diff. The Copilot autofind agent stopped before it analyzed anything, with CAPIError: 400 The requested model is not supported, because its configured model claude-opus-5 was rejected by the Copilot API. This PR has no fix for that, since the model is chosen in the repo's GitHub Advanced Security / Copilot settings. Shellcheck and CodeQL pass on this head. I tried to re-run the job, but GitHub returned 403 This workflow run cannot be retried.


Generated by Claude Code

@BenWestgate
BenWestgate marked this pull request as ready for review September 30, 2026 23:08

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 53b9fcf792

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread bails/.local/bin/persistent-setup Outdated
Scoring the passphrase with its spaces credited each separator as
entropy, so four common words passed as 70 bits. Strip spaces again;
random EFF-list passphrases of 6+ words still score above 65 bits, and
the weakest case now warns instead of forcing a reboot.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019JziKN4UP3pEXBVsdSYJDQ
@chatgpt-codex-connector

This comment has been minimized.

@BenWestgate BenWestgate changed the title persistent-setup: score passphrases with their spaces persistent-setup: warn instead of forcing reboot on weak passphrases Sep 30, 2026
@BenWestgate

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: f04f4b1899

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

LGTM

@BenWestgate
BenWestgate merged commit 65cc9fd into master Oct 1, 2026
4 of 5 checks passed
@BenWestgate
BenWestgate deleted the claude/project-thread-2cbysl branch October 1, 2026 07:20
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.

2 participants