Skip to content

install: Authenticate first release before execution - #327

Draft
BenWestgate wants to merge 1 commit into
206-authenticated-updatesfrom
325-authenticated-bootstrap
Draft

BenWestgate wants to merge 1 commit into
206-authenticated-updatesfrom
325-authenticated-bootstrap

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

What

Replace the mutable first-install bootstrap with a fail-closed procedure that:

  • requires both the release-key fingerprint and exact release tag from an independent trusted channel;
  • fetches mutable repository content only as inert data to obtain the candidate public key;
  • imports that key in an isolated GnuPG home and rejects any fingerprint mismatch;
  • fetches only the independently selected tag, requires an annotated tag whose signed name matches, and verifies its signature with that key;
  • extracts and executes only the verified tag archive.

Why

A mutable default-branch clone is not authenticated installation media. Selecting the tag independently also prevents a delivery path from rolling first install back by suppressing newer signed tags.

Closes #325.

Merge prerequisite

This is intentionally draft. Merge only after #223 lands, the first signed v* release is published, and both its tag name and release-key fingerprint are available through an independent trusted channel. Until then the procedure correctly fails without executing downloaded CipherStick code.

@BenWestgate
BenWestgate force-pushed the 325-authenticated-bootstrap branch from d7a5a97 to 1befadb Compare October 6, 2026 13:08

Copy link
Copy Markdown
Owner Author

@codex review

Please review exact head 1befadb5ae18efacc23776e924d2bade4ec610cd. Focus on the first-install trust bootstrap: no downloaded CipherStick code may execute before the independently supplied fingerprint and exact tag are bound to an annotated tag signature, and a delivery attacker should not be able to substitute or roll back the selected release.

@chatgpt-codex-connector

This comment has been minimized.

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T04:38:25.656352Z 1befadb Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 1befadb5ae

ℹ️ 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 README.md
1. Until the first signed release exists, bootstrap from GitHub with `git clone https://github.com/BenWestgate/Bails.git && Bails/b`.
- This mutable checkout is **not authenticated installation media**. Independently obtain and check the release-key fingerprint `89E6 BEF5 A4F5 1B71 CA8F AA35 A9AC CFC9 F87C B111` before relying on that key for future signed updates; see the [release authentication procedure](docs/RELEASES.md).
- Once a signed release exists, use authenticated release media instead of the mutable bootstrap.
1. Obtain the CipherStick release-key fingerprint and exact release tag through an **independent trusted channel**, not this GitHub repository or this page.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update the clone skip target after inserting this step

For users installing by cloning, line 73 still says to skip to step 7. Adding this numbered item moves “Follow the CipherStick installer instructions” from step 7 to step 8, so cloned users are now directed into the authenticated initial-install procedure they were supposed to bypass, unnecessarily requiring a release fingerprint and tag and reinstalling CipherStick. Update the earlier skip instruction to step 8.

Useful? React with 👍 / 👎.

Comment thread docs/RELEASES.md
Comment on lines +34 to +36
[[ "$expected_fingerprint" =~ ^[0-9A-F]{40}$ ]] || {
echo 'Expected a 40-hex OpenPGP fingerprint.' >&2
exit 1

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Execute the install block in a child shell

When a user follows the instruction to open a terminal and pastes this block directly, this exit 1 executes in the interactive shell rather than an installer subprocess. A mistyped fingerprint or tag, a signature mismatch, or any command failure under set -e therefore terminates the user's Tails shell instead of leaving the prompt available to read the failure and retry; wrap the procedure in a child Bash process or standalone script.

Useful? React with 👍 / 👎.

Comment thread docs/RELEASES.md
Do not use values printed on this GitHub page as the trust source for the first
install.

On Tails, open a terminal and run the following. The commands fetch repository

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Authenticate the bootstrap verifier before execution

When the GitHub repository or page is the compromised delivery path this procedure is intended to defend against, the user still obtains and executes this verification shell code from that same unauthenticated page before anything has been verified. An attacker can simply replace the comparison or archive commands and execute mutable content, so independently obtaining only the fingerprint and tag does not secure the first execution; the verifier itself must also be supplied or authenticated through the trusted channel.

Useful? React with 👍 / 👎.

@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.

AI-assisted current-head security review: Concept ACK 1befadb (draft). The bootstrap compares the independently obtained key fingerprint, checks an annotated tag's signed name and verifies it before executing archive content. Human review still needs an independently distributed trust root, a published signed release, and a clean-Tails install test.

This branch has not been deployed

No deployments
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