mirror of
https://github.com/luxwallet/ios.git
synced 2026-10-30 20:33:27 +00:00
1.4 KiB
1.4 KiB
Crypto Wallet Review Guidelines
Consumed by automated code review (CodeRabbit) and by human reviewers.
1. Secret material
Secret material = mnemonic phrases, BIP-39 seeds, private keys, extended private keys, signing keys, passphrases, PINs.
- MUST NOT appear in logs, analytics, crash reports, telemetry.
- MUST NOT be written to clipboard automatically or from background business logic.
- Clipboard copy is allowed only as an explicit user action from a sensitive-data screen, ideally with a confirmation step and routed through the app's centralized clipboard helper.
- MUST NOT be persisted in
UserDefaults, plist, or plain files. - Acceptable storage only: Keychain (
SecItemAdd) withkSecAttrAccessibleWhenUnlockedThisDeviceOnlyor stricter.
2. Randomness
Cryptographic randomness MUST use:
SecRandomCopyBytesorCryptoKit.
arc4random, Int.random, and Double.random are prohibited in any code
path deriving nonces, salts, IVs, or private keys.
3. iOS architecture (project conventions)
- Modal presentation through
Coordinator.sharedonly. No direct.sheet/.fullScreenCover/ UIKitpresentin SwiftUI views. - Mutations of
@PublishedfromTask { ... }go through@MainActormethods. - Push navigation via
NavigationPath+navigationDestination(for:). .xcodeproj/project.pbxproj,.xcconfig,.entitlements,Info.plist— edited only through Xcode, not by hand.