Skip to content

docs: Define trusted-computer boundary - #59

Draft
BenWestgate wants to merge 3 commits into
20-security-audit-docsfrom
codex/4-security-boundary-docs
Draft

BenWestgate wants to merge 3 commits into
20-security-audit-docsfrom
codex/4-security-boundary-docs

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

What

  • define the trusted-computer boundary consistently in SECURITY.md, the security model, invariants, and user guide;
  • make invariant 6 distinguish accidental disclosure from commands whose purpose is to display recovery/export material;
  • warn that shell command text can be retained even when prompted or redirected stdin keeps secrets out of argv;
  • update the shared CLI safety footer and its exact-help regression.

Why

The earlier invariant literally said secrets stay out of ordinary output even though create, secret, share, correct, and xprv intentionally display secret-bearing material. The documentation also used “trusted computer” without one operational definition. This makes the normative contract literal without changing secret-handling channels.

Review stack

Base: #23 (20-security-audit-docs). Current head: ede98a8.

The reviewed policy change was replayed after the restore/security stack settled. One conflict in docs/security/invariants.md was resolved by retaining both current requirements: intentional recovery/export commands may display their intended material, while wallet setup still transfers the master xprv only through child stdin and private descriptors remain only in Python memory/child stdin. The two follow-up commits retain their stable patch IDs. All prior review threads remain resolved.

Validation

  • tests/test_generic_hrp.py: 12 passed normally and 12 under python -O;
  • full stacked suite: 950 passed normally and 950 under python -O;
  • Ruff check and format check passed;
  • strict mypy passed for 21 source files;
  • workflow YAML parsed successfully;
  • git diff --check passed.

Fixes #4.

Disclosure: AI tools assisted with the mechanical restack and conflict analysis; the contribution still requires responsible human review before integration.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@BenWestgate BenWestgate added area: cli Command-line interface behavior. area: security Security invariants, hardening, and security-sensitive boundaries. documentation Improvements or additions to documentation gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review. labels Sep 25, 2026

@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-generated review (Claude), posted at the maintainer's request.

ACK b06aedb, nits only.

  • Invariant 6 now matches what create/secret/share/correct/xprv actually do.
  • Nit: the trusted-computer definition is written out three times (SECURITY.md, model.md, guide.md). Consider one definition in model.md and links elsewhere so they can't drift.

Comment thread src/codex32/_cli_parser.py Outdated

Copy link
Copy Markdown
Owner Author

On the “trusted computer” duplication nit: keep the short operational definition in all three places. SECURITY.md is the security-policy entry point and must stand alone; docs/security/model.md is the normative design rationale; docs/user/guide.md is the user-facing instruction. Cross-linking only to the model would make the security policy and user guide weaker when read in isolation. The wording is deliberately the same contract in each location; future drift is reviewable as a literal text diff. No code change warranted.

Copy link
Copy Markdown
Owner Author

Release-gate sequencing note: review/merge #57 before final review of this docs PR. #57 and #59 both touch docs/security/invariants.md, docs/security/model.md, and docs/user/guide.md; #57 owns the release-critical verify-before-mutate behavior/contract, while #59 is the trusted-computer/output-boundary clarification. After #57 lands, refresh #59 once against the integrated reviewability-v1 text and preserve its already-resolved 80-column CLI-help fix. This is a sequencing dependency, not a new defect in #59.

@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-generated review, posted at the maintainer's request.

ACK 580b8f8.

Copy link
Copy Markdown
Owner Author

Agent release-gate review at exact head 580b8f8: the trusted-computer definition, intentional-vs-accidental output boundary, and shell/stdin guidance are consistent across SECURITY.md, the normative model/invariants, user guide, CLI help, and regression text. The repeated short definition is appropriate because each entry point must stand alone. Exact-head run 36471154686 succeeded. No remaining code/documentation blocker found; review after #57 so restore-boundary wording settles first.

Make the secret-output invariant literal about intentional recovery/export output, define the trusted-computer boundary consistently, and warn that shell command text can be retained even when stdin is safe from argv exposure.

Update the shared CLI safety footer and its exact-help regression.

Validation: focused help regression; Ruff check/format; strict mypy for the parser; git diff --check. The full generic-HRP module still reaches the pre-existing bip32 test dependency tracked by #3/#6 and fixed by #7.

fixes #4
@BenWestgate
BenWestgate force-pushed the codex/4-security-boundary-docs branch from 580b8f8 to ede98a8 Compare October 2, 2026 01:06
@BenWestgate
BenWestgate changed the base branch from reviewability-v1 to 20-security-audit-docs October 2, 2026 01:06

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

Codex current-head re-review: ACK ede98a8.

The security documentation now defines “trusted computer” consistently, distinguishes intentional recovery/export output from accidental secret disclosure, and warns that shell command text can persist even when stdin keeps secrets out of argv. The CLI footer matches that contract and the one prior help-text nit is resolved. Exact-head Python-package run 643 and Bitcoin Core wallet-fixture run 30 succeeded.

No code or security-contract blocker found; ready for human integration review after #23.

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

area: cli Command-line interface behavior. area: security Security invariants, hardening, and security-sensitive boundaries. documentation Improvements or additions to documentation gate: adversarial review Resolve, merge, or explicitly defer before the next full adversarial review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant