Repository Public
1{2 "id": "QYV-APP-004",3 "title": "The auto-lock policy can be set to never",4 "severity": "medium",5 "cvss_vector": "CVSS:3.1/AV:P/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N",6 "cvss_score": 4.0,7 "cwe": "CWE-613",8 "masvs": "MASVS-AUTH-2",9 "area": "wallet",10 "location": "Sources/QyvoraWallet/WalletService.swift:416",11 "tool": "manual-review",12 "rule": "",13 "status": "fixed",14 "fix_commit": "3f71ca9",15 "regression_test": "QyvoraWalletTests.AutoLockTests.neverAndLongDelaysAreRefusedAndOldProfilesAreBounded",16 "description": "Root cause: `setAutoLockPolicy` only checks that a delay is at least five seconds; `.never` and arbitrarily long delays are accepted. Impact: a user can disable the only time-based protection of an unlocked vault.",17 "recommendation": "Remove `.never` for a full wallet (keep it for watch-only), cap the delay (15 minutes is the Coinspect reference), and always lock when the application has been in the background beyond the delay.",18 "evidence": "public func setAutoLockPolicy",19 "fingerprint": "08f6da20af41",20 "frameworks": [21 "WSC-3.4"22 ],23 "reported": "2026-12-04",24 "owner": "integrator",25 "fixed": "2026-12-04",26 "resolution_note": "Fixed: `setAutoLockPolicy` refuses `.never` and any delay above `WalletService.maximumAutoLockDelay` (900 s, the Coinspect reference) with `invalidInput`; a profile written by an earlier build with 'never' or a longer delay is bounded when it is loaded and applied (never becomes 5 minutes, a longer delay 15 minutes); a longer delay than the current one needs a fresh authentication. The settings no longer offer 'After 1 hour' and 'Never'. Verification: package tests on M4M64c (Swift 6.3.3, release) and on the laptop (Swift 6.4, release); application target compiled for iphoneos on M3U96a. Residual risk: A watch-only wallet has no vault and no auto-lock. `AutoLockPolicy.never` still exists in QyvoraVault (stored format, Quantum Shield input); the wallet service never applies it.",27 "verification": "package tests on M4M64c (Swift 6.3.3, release) and on the laptop (Swift 6.4, release); application target compiled for iphoneos on M3U96a.",28 "residual_risk": "A watch-only wallet has no vault and no auto-lock. `AutoLockPolicy.never` still exists in QyvoraVault (stored format, Quantum Shield input); the wallet service never applies it."29}30