Skip to content

Bump npm_and_yarn dependencies in /dsm_client/new_frontend#143

Merged
cryptskii merged 64 commits intobeta-bilateral-hardeningfrom
main
Apr 4, 2026
Merged

Bump npm_and_yarn dependencies in /dsm_client/new_frontend#143
cryptskii merged 64 commits intobeta-bilateral-hardeningfrom
main

Conversation

@cryptskii
Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and updates across the codebase, focusing on dependency upgrades, workflow enhancements, repository metadata corrections, and minor code refactoring. The most significant changes are grouped below:

Dependency and Library Upgrades:

  • Upgraded several Rust crate dependencies in dsm_client/deterministic_state_machine/dsm/Cargo.toml, including prost (0.13→0.14), blake3 (1.5.0→1.8.4), rand (0.8.5→0.10.0), jni (0.21→0.22), and derive_more (1.0.0→2.1.1), among others. These upgrades help keep the project current, improve compatibility, and may include security or performance improvements. [1] [2] [3] [4] [5]

  • Refactored code to use the updated rand crate API, replacing deprecated RngCore and thread_rng() usage with the new Rng trait and associated methods throughout the Rust codebase (e.g., in timing_analysis.rs and genesis.rs). [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

GitHub Actions Workflow Improvements:

  • Added a new nightly security audit workflow (.github/workflows/nightly-security-audit.yml) that runs cargo audit on a schedule to proactively detect security vulnerabilities in Rust dependencies.

  • Introduced a stale issue and PR management workflow (.github/workflows/stale.yml) to automatically mark and close inactive issues and pull requests, improving repository hygiene.

  • Updated existing CI workflows to use newer versions of actions: codecov-action upgraded from v5 to v6 and upload-artifact from v4 to v7, ensuring continued support and bug fixes. [1] [2] [3]

Repository Metadata and Documentation:

  • Updated repository URLs in Cargo.toml files and Dockerfile labels to the new canonical GitHub organization/repository (deterministicstatemachine/dsm) for consistency and accuracy. [1] [2] [3]

  • Updated a documentation link in the Android app to point to the new architecture guide location.

Other Codebase Changes:

  • Removed the unused Android NFC write activity layout file (activity_nfc_write.xml).

  • Minor clarification in a code comment regarding the format of a domain separator in the bilateral transaction manager.

dependabot bot and others added 30 commits March 30, 2026 23:48
Bumps the npm_and_yarn group with 3 updates in the /dsm_client/new_frontend directory: [handlebars](https://github.com/handlebars-lang/handlebars.js), [picomatch](https://github.com/micromatch/picomatch) and [serialize-javascript](https://github.com/yahoo/serialize-javascript).


Updates `handlebars` from 4.7.8 to 4.7.9
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.7.8...v4.7.9)

Updates `picomatch` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/picomatch@2.3.1...2.3.2)

Updates `serialize-javascript` from 7.0.4 to 7.0.5
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](yahoo/serialize-javascript@v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: serialize-javascript
  dependency-version: 7.0.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Repair crypt merge conflicts and restructure frontend assets
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](actions/upload-artifact@v4...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5 to 6.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5...v6)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-plugin-react-hooks](https://github.com/facebook/react/tree/HEAD/packages/eslint-plugin-react-hooks) from 4.6.2 to 7.0.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/HEAD/packages/eslint-plugin-react-hooks)

---
updated-dependencies:
- dependency-name: eslint-plugin-react-hooks
  dependency-version: 7.0.1
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [copy-webpack-plugin](https://github.com/webpack/copy-webpack-plugin) from 13.0.1 to 14.0.0.
- [Release notes](https://github.com/webpack/copy-webpack-plugin/releases)
- [Changelog](https://github.com/webpack/copy-webpack-plugin/blob/main/CHANGELOG.md)
- [Commits](webpack/copy-webpack-plugin@v13.0.1...v14.0.0)

---
updated-dependencies:
- dependency-name: copy-webpack-plugin
  dependency-version: 14.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [axum-server](https://github.com/programatik29/axum-server) from 0.7.3 to 0.8.0.
- [Release notes](https://github.com/programatik29/axum-server/releases)
- [Changelog](https://github.com/programatik29/axum-server/blob/master/CHANGELOG.md)
- [Commits](programatik29/axum-server@v0.7.3...v0.8.0)

---
updated-dependencies:
- dependency-name: axum-server
  dependency-version: 0.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@bufbuild/protoc-gen-es](https://github.com/bufbuild/protobuf-es/tree/HEAD/packages/protoc-gen-es) from 1.10.1 to 2.11.0.
- [Release notes](https://github.com/bufbuild/protobuf-es/releases)
- [Commits](https://github.com/bufbuild/protobuf-es/commits/v2.11.0/packages/protoc-gen-es)

---
updated-dependencies:
- dependency-name: "@bufbuild/protoc-gen-es"
  dependency-version: 2.11.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [webpack-cli](https://github.com/webpack/webpack-cli) from 5.1.4 to 7.0.2.
- [Release notes](https://github.com/webpack/webpack-cli/releases)
- [Changelog](https://github.com/webpack/webpack-cli/blob/main/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-cli/compare/webpack-cli@5.1.4...webpack-cli@7.0.2)

---
updated-dependencies:
- dependency-name: webpack-cli
  dependency-version: 7.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [hostname](https://github.com/djc/hostname) from 0.3.1 to 0.4.2.
- [Release notes](https://github.com/djc/hostname/releases)
- [Commits](djc/hostname@v0.3.1...v0.4.2)

---
updated-dependencies:
- dependency-name: hostname
  dependency-version: 0.4.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rustls-native-certs](https://github.com/rustls/rustls-native-certs) from 0.7.3 to 0.8.3.
- [Release notes](https://github.com/rustls/rustls-native-certs/releases)
- [Commits](rustls/rustls-native-certs@v/0.7.3...v/0.8.3)

---
updated-dependencies:
- dependency-name: rustls-native-certs
  dependency-version: 0.8.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rcgen](https://github.com/rustls/rcgen) from 0.12.1 to 0.14.7.
- [Release notes](https://github.com/rustls/rcgen/releases)
- [Commits](rustls/rcgen@v0.12.1...v0.14.7)

---
updated-dependencies:
- dependency-name: rcgen
  dependency-version: 0.14.7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [rand](https://github.com/rust-random/rand) from 0.8.5 to 0.10.0.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.5...0.10.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [prost](https://github.com/tokio-rs/prost) from 0.13.5 to 0.14.3.
- [Release notes](https://github.com/tokio-rs/prost/releases)
- [Changelog](https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md)
- [Commits](tokio-rs/prost@v0.13.5...v0.14.3)

---
updated-dependencies:
- dependency-name: prost
  dependency-version: 0.14.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [toml](https://github.com/toml-rs/toml) from 0.8.23 to 1.1.0+spec-1.1.0.
- [Commits](toml-rs/toml@toml-v0.8.23...toml-v1.1.0)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 1.1.0+spec-1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [jni](https://github.com/jni-rs/jni-rs) from 0.21.1 to 0.22.4.
- [Release notes](https://github.com/jni-rs/jni-rs/releases)
- [Changelog](https://github.com/jni-rs/jni-rs/blob/master/CHANGELOG.md)
- [Commits](jni-rs/jni-rs@v0.21.1...v0.22.4)

---
updated-dependencies:
- dependency-name: jni
  dependency-version: 0.22.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [blake3](https://github.com/BLAKE3-team/BLAKE3) from 1.8.3 to 1.8.4.
- [Release notes](https://github.com/BLAKE3-team/BLAKE3/releases)
- [Commits](BLAKE3-team/BLAKE3@1.8.3...1.8.4)

---
updated-dependencies:
- dependency-name: blake3
  dependency-version: 1.8.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [derive_more](https://github.com/JelteF/derive_more) from 1.0.0 to 2.1.1.
- [Release notes](https://github.com/JelteF/derive_more/releases)
- [Changelog](https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md)
- [Commits](JelteF/derive_more@v1.0.0...v2.1.1)

---
updated-dependencies:
- dependency-name: derive_more
  dependency-version: 2.1.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…codecov/codecov-action-6' into chore/merge-dependabot-prs
…actions/upload-artifact-7' into chore/merge-dependabot-prs
…m_client/new_frontend/npm_and_yarn-e645cc0b70' into chore/merge-dependabot-prs
…m_client/frontend/webpack-cli-7.0.2' into chore/merge-dependabot-prs
…m_client/frontend/bufbuild/protoc-gen-es-2.11.0' into chore/merge-dependabot-prs
…m_client/frontend/copy-webpack-plugin-14.0.0' into chore/merge-dependabot-prs
…m_client/frontend/eslint-plugin-react-hooks-7.0.1' into chore/merge-dependabot-prs
…tive-certs-0.8.3' into chore/merge-dependabot-prs
…0spec-1.1.0' into chore/merge-dependabot-prs
dsmfa10 and others added 26 commits April 2, 2026 03:54
Remove stale #[ignore] from test_random_walk_verification; it only uses
StateMachine precommitment APIs (no batch manager). Rustfmt: wrap long
line in bilateral_ble_handler for cargo fmt --check.

Closes #7
Remove the re-export shim; import the screen from bitcoin/BitcoinTapTab
everywhere.
Drop JNI entry point with no Kotlin caller; NfcWriteActivity uses a
programmatic view so the XML layout was unused.
Replace internal tracker wording with neutral descriptions of the domain
tag and preimage for BLE confirm paths.
Describe signing_bytes vs full signed transaction bytes without internal
tracker labels.
Describe how receipt bytes are attached later without internal tracker labels.
Label and close inactive items after configurable quiet periods; exempt
security and high-priority labels.
Run cargo audit daily on a cron plus manual dispatch.
Replace obsolete GitHub org/repo paths in Cargo metadata, OCI labels, and
the in-app architecture doc link (use docs/book/04-architecture.md).
…-hardening

Revise BLE confirm flow, persist pending confirms
…dates

Bumps the npm_and_yarn group with 5 updates in the /dsm_client/frontend directory:

| Package | From | To |
| --- | --- | --- |
| [handlebars](https://github.com/handlebars-lang/handlebars.js) | `4.7.8` | `4.7.9` |
| [@tootallnate/once](https://github.com/TooTallNate/once) | `2.0.0` | `removed` |
| [lodash](https://github.com/lodash/lodash) | `4.17.23` | `4.18.1` |
| [picomatch](https://github.com/micromatch/picomatch) | `2.3.1` | `2.3.2` |
| [serialize-javascript](https://github.com/yahoo/serialize-javascript) | `7.0.4` | `7.0.5` |



Updates `handlebars` from 4.7.8 to 4.7.9
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.9/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.7.8...v4.7.9)

Removes `@tootallnate/once`

Updates `lodash` from 4.17.23 to 4.18.1
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.23...4.18.1)

Updates `picomatch` from 2.3.1 to 2.3.2
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](micromatch/picomatch@2.3.1...2.3.2)

Updates `serialize-javascript` from 7.0.4 to 7.0.5
- [Release notes](https://github.com/yahoo/serialize-javascript/releases)
- [Commits](yahoo/serialize-javascript@v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-version: 4.7.9
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: "@tootallnate/once"
  dependency-version: 
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.18.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: serialize-javascript
  dependency-version: 7.0.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
chore: remove dead NFC JNI export and unused layout (#22)
…_and_yarn/dsm_client/frontend/npm_and_yarn-50c292720c

chore(deps): bump the npm_and_yarn group across 1 directory with 5 updates
docs(sdk): clarify deferred proof_data on transaction persist (#19)
…omment

docs(sdk): clarify storage tip preimage uses signing_bytes (#18)
docs(sdk): clarify bilateral confirm preimage comments (#17)
refactor(frontend): consolidate BitcoinTapTab into a single module (#14)
chore: update canonical GitHub URLs to deterministicstatemachine/dsm
test(dsm): run random walk precommitment E2E in CI (#7)
chore: merge Dependabot updates and fix post-upgrade compatibility
Bumps [webpack-bundle-analyzer](https://github.com/webpack/webpack-bundle-analyzer) from 4.10.2 to 5.3.0.
- [Release notes](https://github.com/webpack/webpack-bundle-analyzer/releases)
- [Changelog](https://github.com/webpack/webpack-bundle-analyzer/blob/main/CHANGELOG.md)
- [Commits](webpack/webpack-bundle-analyzer@v4.10.2...v5.3.0)

---
updated-dependencies:
- dependency-name: webpack-bundle-analyzer
  dependency-version: 5.3.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…-hardening

Refactor bilateral offline tests for shared mode
…_and_yarn/dsm_client/frontend/webpack-bundle-analyzer-5.3.0

chore(deps-dev): bump webpack-bundle-analyzer from 4.10.2 to 5.3.0 in /dsm_client/frontend
Copilot AI review requested due to automatic review settings April 4, 2026 04:47
@cryptskii cryptskii merged commit 6555929 into beta-bilateral-hardening Apr 4, 2026
7 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates dependency versions across Rust and the React frontend, adapts code to updated RNG / library APIs, and adds/updates GitHub automation and repo metadata links.

Changes:

  • Bump Rust crate versions (e.g., prost/blake3/rand/jni/toml/rcgen) and adjust RNG usage across core/SDK/tools/storage-node.
  • Bump frontend devDependencies (webpack/jest/buf tooling) and refactor a few hooks/components for simpler state handling and D-pad navigation.
  • Add new GitHub workflows (nightly cargo audit, stale bot) and update CI action versions; refresh repository URLs/docs links; remove unused NFC UI assets/bridge code.

Reviewed changes

Copilot reviewed 60 out of 62 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
tools/vertical_validation/src/property_tests.rs Switch deterministic RNG usage and rand API in property tests.
tools/vertical_validation/Cargo.toml Bump prost/blake3/rand; replace rand_chacha with chacha20.
tools/vector_runner/Cargo.toml Bump prost to 0.14.
tools/vector_builder/Cargo.toml Bump prost to 0.14.
dsm_storage_node/tests/object_store.rs Update rand API usage in integration tests.
dsm_storage_node/src/chaos_testing.rs Make random sizing logic safer against underflow/zero span.
dsm_storage_node/src/api/genesis.rs Update OS entropy generation to new rand API.
dsm_storage_node/src/api/device_api.rs Simplify auth token generation to rand::random().
dsm_storage_node/Cargo.toml Bump server/crypto/config/protobuf deps (axum-server/blake3/rand/toml/prost/etc).
dsm_client/frontend/src/hooks/useIntroGate.ts Simplify intro gate hook to a pure boolean expression.
dsm_client/frontend/src/hooks/useDpadNav.ts Refactor focus clamping + onSelect ref handling.
dsm_client/frontend/src/components/screens/EnhancedWalletScreen.tsx Update BitcoinTapTab import path.
dsm_client/frontend/src/components/screens/DevDeTfiLaunchScreen.tsx Replace memoized action list with index-based onSelect callback.
dsm_client/frontend/src/components/screens/BleTestScreen.tsx Replace memoized action list with index-based onSelect callback.
dsm_client/frontend/src/components/screens/BitcoinTapTab.tsx Remove re-export shim (file deleted).
dsm_client/frontend/src/components/screens/tests/BitcoinTapTab.disabled.test.tsx Update import path for BitcoinTapTab.
dsm_client/frontend/src/components/qr/GenesisQrPanel.tsx Memoize QR encoding and switch QR generation to promise-based flow.
dsm_client/frontend/src/components/lock/StateboyComboInput.tsx Update onComplete ref in an effect to avoid render-time mutation.
dsm_client/frontend/src/components/DiagnosticsOverlay.tsx Rename internal render helpers to avoid component-like capitalization.
dsm_client/frontend/src/components/common/LoadingSpinner.tsx Make dot animation deterministic via event tick + external tick.
dsm_client/frontend/package.json Bump frontend devDependencies (buf, webpack, jest env, etc).
dsm_client/frontend/package-lock.json Lockfile updates for bumped frontend devDependencies.
dsm_client/deterministic_state_machine/dsm/tests/dsm_end_to_end_test.rs Re-enable a previously ignored random-walk test (comment updated).
dsm_client/deterministic_state_machine/dsm/src/utils/mod.rs Update utility OS RNG usage via new rand API.
dsm_client/deterministic_state_machine/dsm/src/crypto/sphincs.rs Update keygen entropy source to new rand API.
dsm_client/deterministic_state_machine/dsm/src/crypto/rng.rs Refactor deterministic RNG + OS RNG fallback code to new rand API.
dsm_client/deterministic_state_machine/dsm/src/crypto/pedersen.rs Update RNG trait bounds and tests to new rand API.
dsm_client/deterministic_state_machine/dsm/src/crypto/kyber.rs Switch Kyber RNG imports to compatible rand_core/rand_chacha versions.
dsm_client/deterministic_state_machine/dsm/src/core/state_machine/bilateral.rs Update entropy generation to new RNG trait usage.
dsm_client/deterministic_state_machine/dsm/src/core/identity/genesis.rs Update RNG trait usage for helper functions.
dsm_client/deterministic_state_machine/dsm/src/core/bilateral_transaction_manager.rs Clarify domain-tag comment for commitment signing.
dsm_client/deterministic_state_machine/dsm/Dockerfile Update OCI source label to new GitHub repo URL.
dsm_client/deterministic_state_machine/dsm/Cargo.toml Bump core crate deps and introduce chacha20/rand_core06 alignment deps.
dsm_client/deterministic_state_machine/dsm/benches/timing_analysis.rs Update bench randomness to new rand API.
dsm_client/deterministic_state_machine/dsm_sdk/tests/tls_transport_sdk_test.rs Update rcgen API usage for cert/key DER extraction.
dsm_client/deterministic_state_machine/dsm_sdk/tests/offline_real_protocol_ble_mock.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/tests/live_e2e.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/tests/e2e_token_create_lifecycle.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/tests/e2e_online_transfer.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/tests/e2e_faucet_contact_transfer.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/tests/bilateral_event_guarantee.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/src/security/wal_transaction_queue.rs Switch nonce RNG to rand_core06::OsRng.
dsm_client/deterministic_state_machine/dsm_sdk/src/security/offline_security.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/src/sdk/wallet_sdk.rs Clarify proof_data comment / sequencing.
dsm_client/deterministic_state_machine/dsm_sdk/src/sdk/recovery_sdk.rs Switch mnemonic entropy RNG to rand_core06::OsRng.
dsm_client/deterministic_state_machine/dsm_sdk/src/sdk/bluetooth_transport.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/src/sdk/bitcoin_tap_sdk.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/src/sdk/b0x_sdk.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/src/jni/unified_protobuf_bridge.rs Remove JNI NFC password helper (function deleted).
dsm_client/deterministic_state_machine/dsm_sdk/src/handlers/storage_routes.rs Clarify signing-bytes preimage comment.
dsm_client/deterministic_state_machine/dsm_sdk/src/handlers/bitcoin_invoke_routes.rs Switch mnemonic entropy RNG to rand_core06::OsRng.
dsm_client/deterministic_state_machine/dsm_sdk/src/crypto_performance.rs Update deterministic RNG imports and rand API usage in tests.
dsm_client/deterministic_state_machine/dsm_sdk/src/bluetooth/bilateral_ble_handler.rs Clarify bilateral signature domain-tag comment.
dsm_client/deterministic_state_machine/dsm_sdk/examples/submit_to_recipient.rs Switch OS RNG imports to rand_core06.
dsm_client/deterministic_state_machine/dsm_sdk/Cargo.toml Bump deps (prost/blake3/jni/toml/rand/rcgen/hostname) and add chacha20/rand_core06 alignment deps.
dsm_client/deterministic_state_machine/Cargo.toml Update workspace repository URL.
dsm_client/android/app/src/main/res/layout/activity_nfc_write.xml Remove unused NFC write activity layout (file deleted).
dsm_client/android/app/src/main/java/com/dsm/wallet/ui/MainActivity.kt Update architecture guide URL.
Cargo.lock Lockfile updates for bumped Rust dependencies.
.github/workflows/stale.yml Add stale issue/PR management workflow.
.github/workflows/nightly-security-audit.yml Add nightly cargo audit workflow.
.github/workflows/ci.yml Bump Codecov and upload-artifact action versions.
Files not reviewed (1)
  • dsm_client/frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (2)

dsm_client/deterministic_state_machine/dsm/src/core/state_machine/bilateral.rs:262

  • rng.next_u64() / rng.fill_bytes(...) assume an infallible RngCore-style API, but SecureRng now implements TryRng/TryCryptoRng (fallible methods). This will fail to compile unless you switch to try_next_u64 / try_fill_bytes (and handle/unwrap) or change SecureRng to implement the infallible RNG traits expected here.
        use rand::Rng;
        let mut rng = crate::crypto::rng::SecureRng;
        let seed = rng.next_u64();
        entropy.extend_from_slice(&seed.to_le_bytes());

        // Add random bytes
        let mut random_bytes = [0u8; 32];
        rng.fill_bytes(&mut random_bytes);
        entropy.extend_from_slice(&random_bytes);

dsm_client/deterministic_state_machine/dsm/src/crypto/pedersen.rs:208

  • commit_with_rng now requires R: Rng + CryptoRng, but this module’s own commit() passes crate::crypto::rng::SecureRng, which currently implements TryRng/TryCryptoRng (not rand::CryptoRng). This will break compilation unless SecureRng is updated to implement the rand traits, or the Pedersen APIs are updated to accept the new RNG abstraction.
    pub fn commit_with_rng<R: Rng + CryptoRng>(
        params: &PedersenParams,
        value: &[u8],
        rng: &mut R,
    ) -> DsmResult<(Self, BigUint)> {

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 38 to 40
// Advance on DSM activity events (transport, BLE, or explicit UI tick)
// Advance on DSM activity events (transport or explicit UI tick)
useEffect(() => {
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

There’s a duplicated/misaligned comment line (// Advance on DSM activity events ...) which looks like an accidental leftover and hurts readability. Consider removing the extra line or fixing indentation so the comment only appears once.

Copilot uses AI. Check for mistakes.
@@ -26,31 +26,29 @@ static DETERMINISTIC_RNG: OnceLock<Mutex<ChaCha20Rng>> = OnceLock::new();
/// and delegates to `random_bytes` (which respects the deterministic flag).
pub struct SecureRng;

Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

SecureRng is described as a RngCore + CryptoRng wrapper, but the implementation below only provides rand_core::TryRng / TryCryptoRng. That breaks code expecting next_u64()/fill_bytes() and any APIs that bound on rand::CryptoRng. Either implement the expected rand_core::RngCore + rand::CryptoRng traits, or update call sites and bounds to consistently use the try_* API.

Suggested change
impl rand_core::RngCore for SecureRng {
fn next_u32(&mut self) -> u32 {
let mut buf = [0u8; 4];
self.fill_bytes(&mut buf);
u32::from_le_bytes(buf)
}
fn next_u64(&mut self) -> u64 {
let mut buf = [0u8; 8];
self.fill_bytes(&mut buf);
u64::from_le_bytes(buf)
}
fn fill_bytes(&mut self, dest: &mut [u8]) {
let bytes = random_bytes(dest.len());
dest.copy_from_slice(&bytes);
}
}
impl rand::CryptoRng for SecureRng {}

Copilot uses AI. Check for mistakes.
Comment on lines +119 to +122
if let Err(e) = SysRng.try_fill_bytes(&mut bytes) {
tracing::error!("OS RNG failed while generating random bytes: {e}");
bytes.fill(0);
}
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

random_bytes() returns an all-zero buffer if the OS RNG fails. Returning predictable bytes from a crypto RNG helper can silently compromise nonces/keys; prefer propagating the error (Result) or hard-failing rather than falling back to zero entropy.

Copilot uses AI. Check for mistakes.
Comment on lines 52 to +59
pub fn random_bytes(length: usize) -> Vec<u8> {
use rand::{rngs::OsRng, RngCore};

use rand::rngs::SysRng;
use chacha20::rand_core::TryRng;
let mut bytes = vec![0u8; length];
OsRng.fill_bytes(&mut bytes);
if let Err(e) = SysRng.try_fill_bytes(&mut bytes) {
tracing::error!("OS RNG failed while generating utility random bytes: {e}");
bytes.fill(0);
}
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

On OS RNG failure this helper logs and returns an all-zero buffer, but it is documented as producing cryptographically secure randomness. Returning predictable bytes here can silently compromise callers; prefer returning Result (and propagating), or hard-failing instead of falling back to zero entropy.

Copilot uses AI. Check for mistakes.
Comment on lines +34 to +43
useEffect(() => {
if (encodedQr.hasError || !encodedQr.data) {
return;
}

let cancelled = false;

// PNG-only rendering — SVG path removed to eliminate XSS surface
void QRCode.toDataURL(encodedQr.data, {
errorCorrectionLevel: 'M',
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

When genesisHashBase32 changes, a new QR generation is kicked off but qrPngUrl is not cleared first, so the previous QR image can remain visible until the new toDataURL() promise resolves. Consider resetting qrPngUrl/error state at the start of this effect whenever encodedQr.data changes.

Copilot uses AI. Check for mistakes.
Comment on lines 58 to +91
@@ -67,17 +67,17 @@
"@typescript-eslint/parser": "^8.57.2",
"cheerio": "^1.1.0",
"clean-webpack-plugin": "^4.0.0",
"copy-webpack-plugin": "^13.0.0",
"copy-webpack-plugin": "^14.0.0",
"cross-env": "^10.1.0",
"css-loader": "^7.1.2",
"eslint": "^8.0.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-security": "^1.7.1",
"html-webpack-plugin": "^5.5.3",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-environment-jsdom": "^30.3.0",
"long": "^5.3.2",
"mini-css-extract-plugin": "^2.9.4",
"prettier": "^3.8.1",
@@ -87,15 +87,15 @@
"ts-node": "^10.9.2",
"typescript": "^5.4.0",
"webpack": "^5.105.4",
"webpack-bundle-analyzer": "^4.9.1",
"webpack-cli": "^5.1.4",
"webpack-bundle-analyzer": "^5.3.0",
"webpack-cli": "^7.0.2",
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

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

Dependency bumps here include packages that require Node >=20.x (some >=20.9.0), but this repo still declares engines.node as >=18. This mismatch can cause local installs/builds to fail or behave inconsistently; consider raising the declared Node engine requirement (and updating docs) or pinning to Node-18-compatible versions.

Copilot uses AI. Check for mistakes.
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.

3 participants