Skip to content

fix(web): default demo to public output — private-key material opt-in (#18) - #22

Merged
Amperstrand merged 1 commit into
mainfrom
fix/demo-public-output-default
Nov 20, 2026
Merged

Amperstrand merged 1 commit into
mainfrom
fix/demo-public-output-default

Conversation

@Amperstrand

Copy link
Copy Markdown
Owner

Closes #18

Finding (tracker pr-review-audit#58): the browser demo pre-checked getPrivateKey, so a plain Derive click immediately rendered age_private_key and raw_entropy in the page — accidental-disclosure risk inconsistent with the API's public-only default.

Fix: the checkbox now defaults off (index.html); web/app.ts already reads .checked, so a plain click derives public output only. Opt-in unchanged for users who explicitly want key material.

  • Vitest suite covers both getPrivateKey: false (default path) and : true (test/index.spec.ts:59-84) — no test pinned the checkbox pre-check.
  • No API/CLI behavior change.

…#18)

A plain Derive click rendered age_private_key + raw_entropy by default;
the checkbox now defaults off so private material requires an explicit
opt-in, matching the API's public-only default.
@Amperstrand
Amperstrand merged commit fde76b8 into main Nov 20, 2026
2 checks passed
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.

browser demo pre-checks private-key output

1 participant