Skip to content

Merge to master - #172

Merged
cedelavergne-ledger merged 32 commits into
masterfrom
develop
Aug 11, 2026
Merged

Merge to master#172
cedelavergne-ledger merged 32 commits into
masterfrom
develop

Conversation

@cedelavergne-ledger

Copy link
Copy Markdown
Contributor

Description

Checklist

  • App update process has been followed
  • Target branch is develop
  • Application version has been bumped

github-actions Bot and others added 30 commits May 29, 2026 16:06
Found while building the web UI:
- restore(): write the salutation as an ASCII digit instead of bytes.fromhex()
  on the odd-length "1"/"2" (which raises).
- _decode_tlv(): use elif for the 1-byte / 2-byte long-length forms so the
  second branch no longer re-evaluates the reassigned length.
- backup.py: also verify PW2 (0x82), required to read/write the private DOs
  0x0101/0x0103.
- restore(): stop writing the read-only signature counter (DO 0x93).
A browser-based backup/restore tool for the OpenPGP app, served at
https://ledgerhq.github.io/app-openpgp/wui/ and linked from the docs.

- Stack: Vite + React 18, Ledger's lumen design system (Tailwind), pnpm
  (exact version pinning).
- Talks to the device over WebHID (the generic HID APDU interface) — the same
  channel pytools/backup.py uses; no firmware change required.
- Backup (get_all -> version-1 JSON, native save dialog), restore (PUT DATA
  sequence + optional deterministic key regeneration from the seed), factory
  reset, key-slot selection; PIN dialogs and recovery hints, with graceful
  handling of the device-side crash that can occur during key regeneration.
- APDU framing / TLV / data-object layer ported from pytools, covered by
  Vitest. A "?mock" dev preview opens the connected screen without a device.
- Co-hosted on the existing GitHub Pages workflow (builds clients/wui into
  doc/html/build/wui/); pnpm-lock.yaml is excluded from the codespell and
  large-file pre-commit hooks.
B2CA-2702: Add web UI tol for backup & Restore
Fix node version to generate page for Backup WebUI
Bumps the npm_and_yarn group with 1 update in the /clients/wui directory: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.5.15 to 8.5.23
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](postcss/postcss@8.5.15...8.5.23)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.23
  dependency-type: direct:development
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
…/wui/npm_and_yarn-6b7f7a8c69

Bump postcss from 8.5.15 to 8.5.23 in /clients/wui in the npm_and_yarn group across 1 directory
…owngrade

READ_ASYM_KEY now requires the stored key size to exactly match the attribute-declared size.
This closes the path where a PW3-authorized attribute downgrade (e.g. RSA-4096 → RSA-2048)
let an unauthenticated READ_ASYM_KEY reinterpret private-exponent bytes as a public modulus.

PUT DATA for algorithm attributes (0xC1/0xC2/0xC3) now atomically erases the owning gpg_key_t
before writing the new attributes, matching the behaviour already implemented in the UX template path.
This ensures stale key material can never coexist with mismatched attributes.
…ong PIN ID

pin_confirm_cb was calling gpg_pin_set_verified with the live io_p2,
which could be overwritten by a new APDU arriving while the confirmation
screen was displayed. A host could send a VERIFY for PW3 (Admin) just
before the user tapped 'Yes' on a User-82 confirmation, resulting in
Admin being marked verified without entering the admin PIN.

The fix has two layers:
1. Snapshot: io_p2 is captured in ux_pinconfirm_p2 at the moment the UI is drawn.
   All callbacks use this snapshot instead of the live io_p2.
2. Guard: gpg_dispatch rejects any APDU received while ui_pending is set
   with SWO_CONDITIONS_NOT_SATISFIED, so no command can complete behind a pending prompt.
   ui_pending is set at draw time and cleared at the start of each UI callback.
Replace sizeof(field_expression) checks with named constants so sizeof
is never applied to expressions containing pointer dereferences or variable reads.
Update gpg_types.h struct definition to use the same constants.
cedelavergne-ledger and others added 2 commits August 11, 2026 17:19
Fixes cross-user cache disclosure and parse-time crash in undici's
cache interceptor (transitive dep via jsdom and vitest).
@github-actions

Copy link
Copy Markdown
Contributor

Code coverage report

Code Coverage

Per-file coverage
Package Line Rate Branch Rate Health
src 25% 9%
Summary 25% (56 / 227) 9% (9 / 101)

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.19%. Comparing base (32aeb94) to head (aab2c1f).
⚠️ Report is 15 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
+ Coverage   35.57%   40.19%   +4.61%     
==========================================
  Files           4        1       -3     
  Lines         253      209      -44     
  Branches       49       49              
==========================================
- Hits           90       84       -6     
+ Misses        163      118      -45     
- Partials        0        7       +7     
Flag Coverage Δ
unittests 40.19% <ø> (+4.61%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cedelavergne-ledger
cedelavergne-ledger merged commit 76531c3 into master Aug 11, 2026
163 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.

2 participants