BestWallet (BestMoneroWalletApp) — Security Audit Summary
Written by ShehabAhmed-Gui
A supplied security audit summary of the BestMoneroWalletApp repository, covering security-conscious engineering choices and practical recommendations.
Quick Answer
The report describes positive findings around reproducible builds, build hardening, cryptographic primitives and vulnerability disclosure, alongside recommendations for bundled components, updates, secret handling and automated testing.
Executive summary
BestWallet demonstrates strong, security-conscious engineering: reproducible Guix builds and attestation, explicit compiler/linker hardening flags, use of vetted cryptographic primitives (Argon2 for seed/passphrase derivation), and a clear vulnerability disclosure process. Overall this repo shows a mature approach to supply-chain and runtime security. The recommendations below are practical follow-ups to keep the project in an excellent security posture.
Scope
Repository: https://github.com/BestWalletTeam/BestMoneroWalletApp
Files and areas reviewed (representative):
User & project docs: README.md, docs/guides/change-password.md, SECURITY.md
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/README.md
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/docs/guides/change-password.md
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/SECURITY.md
Build system & hardening: top-level CMakeLists.txt, src/CMakeLists.txt
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/CMakeLists.txt
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/CMakeLists.txt
Reproducible build tooling: contrib/guix/README.md
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/contrib/guix/README.md
Packaging notes (macOS): contrib/macdeploy/README.md
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/contrib/macdeploy/README.md
Wallet library: src/libwalletqt/Wallet.cpp, Wallet.h, WalletManager
https://github.com/BestWalletTeam/BestMoneroWalletApp/tree/main/src/libwalletqt
Seed/KDF & crypto code: src/monero_seed/argon2/* and core.h
https://github.com/BestWalletTeam/BestMoneroWalletApp/tree/main/src/monero_seed
Password UI & handling: src/widgets/PasswordSetWidget.{cpp,h,ui}
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/widgets/PasswordSetWidget.cpp
Network node handling: src/utils/nodes.h
https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/utils/nodes.h
Tor embedding and optional components (CMake options reference)
see CMake sections referencing src/assets/tor and TOR_BUNDLED in CMakeLists.txt
Methodology
I inspected top-level docs, the main build files (CMake), the Guix reproducible-build documentation, and representative source files in the src tree to validate design choices and security-relevant patterns. I focused on supply-chain controls, cryptographic primitives, handling of secrets, runtime hardening, and update/packaging pathways.
Positive findings (what the project does well)
Reproducible, auditable builds
Guix build tooling and attestation are provided so independent builders can reproduce release binaries and attest results (contrib/guix/README.md).
Clear vulnerability disclosure policy
SECURITY.md instructs reporters to use GitHub Security Advisories and explains what to include.
Compiler/linker hardening
Top-level CMake config sets multiple hardening flags (stack protector, relro/now, noexecstack where supported, -fcf-protection when available), which reduce exploitability of memory-corruption vulnerabilities.
See CMake security flags: https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/CMakeLists.txt#L263-L336
Use of strong memory-hard KDF
Argon2 is included/used for seed/passphrase derivation (src/monero_seed/argon2), a modern choice over weaker KDFs.
Upstream reuse of Monero core
The project uses Monero as a submodule for wallet2 — this reduces reimplementation risk and leverages upstream-reviewed consensus/crypto code.
Thoughtful documentation and user guidance
README and docs explicitly warn users about seed handling and that re-encryption does not securely delete prior disk bytes (docs/guides/change-password.md).
Configurable/opt-in subsystems
Optional features (Tor embedding, update checks, swap API, hardware device support) can be enabled or disabled at build time using CMake options, allowing packagers to choose minimal attack surfaces.
Potential concerns and prioritized recommendations (friendly, non-alarming)
Keep bundled third-party binaries (Tor) up to date and record provenance
Context: CMake supports embedding an in-tree Tor binary (src/assets/tor) when TOR_BUNDLED is ON.
Reference: https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/CMakeLists.txt#L146-L156 and TOR embedding block L157-L236
Action: For builds that embed Tor, document the exact Tor version and release provenance in release notes and consider defaulting to external Tor for general builds. Ensure attestation includes the Tor binary provenance.
Ensure update mechanism validates signatures and key distribution (when CHECK_UPDATES is enabled)
Context: update-checking is a build-time option (CHECK_UPDATES). Updaters must verify signatures to avoid supply-chain substitution.
Reference: src/CMakeLists.txt CHECK_UPDATES option lines (search for CHECK_UPDATES)
Action: Enforce signature verification of updater payloads (OpenPGP/GPG detached signatures or equivalent) and document key pinning or trust bootstrapping in the release process.
Track and maintain in-tree cryptographic code (Argon2)
Context: Argon2 source is present in-tree (src/monero_seed/argon2). In-tree copies must be kept in sync with upstream fixes and CVEs.
Reference: https://github.com/BestWalletTeam/BestMoneroWalletApp/tree/main/src/monero_seed/argon2
Action: Add a periodic task or CI job to check upstream tags for Argon2 updates and apply fixes; document why code is vendored and how it’ll be updated.
Secure memory handling / wiping of secrets
Context: GUI password fields (QLineEdit) and wallet re-encryption can leave sensitive data in memory or on disk. The repo notes that re-encryption does not scrub old files.
Reference: docs/guides/change-password.md and PasswordSetWidget code
Action: Ensure secret material is explicitly zeroed after use where possible and document the behavior. Confirm FLAG_clear_internal_memory in Argon2 is enabled and that critical buffers are wiped.
File permissions and secure deletion guidance for users
Action: Ensure wallet files are created with restrictive permissions by default and add a short guide explaining secure backup and secure migration/erase procedures for users who need strong guarantees.
CI automation: static analysis, dependency scanning, fuzzing
Action: Add or document CI jobs running static analysis (clang-tidy/cppcheck), SCA dependency scans, sanitizers (ASan/UBSan), and optional fuzzing for parsers/serializers to catch regressions early.
How to verify and reproduce the secure build (commands)
Typical quick build (from README):
Code
git clone https://github.com/BestWalletTeam/BestMoneroWalletApp.git
cd BestMoneroWalletApp
git submodule update --init --recursive
mkdir build && cd build
cmake .. && cmake --build . -j $(nproc)
Guix reproducible-release flow (contrib/guix):
Code
# follow contrib/guix/README.md for Guix install & usage
make build
make attest # produce attestation signatures
git submodule update --recursive
make verify # verify signatures against signatures repo
Suggested (non-alarming) website wording — short version
"Security is a top priority for BestWallet. We publish reproducible, bootstrappable builds (Guix), apply modern build hardening flags, use vetted cryptographic primitives (Argon2), and maintain a private vulnerability disclosure policy (SECURITY.md). We encourage users to verify releases and follow standard wallet safety practices such as writing down and protecting seed words."
Suggested website wording — longer paragraph you can paste
"We take security seriously. BestWallet uses reproducible Guix-based builds and attestation so independent builders can verify release binaries. Our build system applies modern compiler and linker hardening flags to make exploitation of low-level bugs more difficult. For seed/passphrase derivation we use the Argon2 memory-hard KDF and we rely on Monero upstream for consensus and cryptographic primitives. We maintain a private security disclosure process (see SECURITY.md), and we recommend users verify release signatures, securely store their seed, and keep bundled components (e.g., Tor if embedded) up to date. For full technical details and how to reproduce releases, see our docs and contrib/guix/README.md."
Files reviewed (direct links you can publish)
README.md — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/README.md
SECURITY.md — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/SECURITY.md
Top-level CMakeLists.txt (security flags and Tor embedding) — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/CMakeLists.txt
src/CMakeLists.txt (build layout, CHECK_UPDATES, TOR handling) — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/CMakeLists.txt
Guix reproducible build docs — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/contrib/guix/README.md
Mac deploy notes — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/contrib/macdeploy/README.md
Password UI widget — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/widgets/PasswordSetWidget.cpp
Password handling docs — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/docs/guides/change-password.md
Argon2 KDF sources — https://github.com/BestWalletTeam/BestMoneroWalletApp/tree/main/src/monero_seed/argon2
libwalletqt sources — https://github.com/BestWalletTeam/BestMoneroWalletApp/tree/main/src/libwalletqt
Node handling code — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/utils/nodes.h
OpenPGP build notes — https://github.com/BestWalletTeam/BestMoneroWalletApp/blob/main/src/openpgp/CMakeLists.txt
Sources
Related reading
Key takeaways
- Read the scope and methodology alongside the positive findings; this is a representative source review, not proof that every component or release was tested.
- The recommendations remain recommendations: this page does not claim they have been implemented or independently validated.
- Keep recovery information offline, verify available release artifacts and use current project documentation when building or installing the wallet.
