keepassxreboot/keepassxc at 2058912 · static read-only analysis · why-not-rust method 2.0keepassxreboot/keepassxc @ 2058912 · 静态只读分析 · why-not-rust 方法 2.0
Repository: github.com/keepassxreboot/keepassxc at commit 205891202f4b995a8c9277cd125498ac76468b15, shallow clone, 1,510 tracked files. Scope: the whole application, with src/format, src/crypto, src/keys and src/streams as the candidate seam. Counting basis: this repository is the reason the method demands one. 45 files carry a .ts extension and total 472,765 lines. All 45 sit under share/translations and every one opens with <!DOCTYPE TS><TS version="2.1">, which makes them Qt Linguist translation XML. Count them as TypeScript and .ts becomes 73.3% of the (.ts + C/C++/Objective-C++) line total, which is what extension-keyed tools report. GitHub's own Linguist gets it right and reports no TypeScript. Every figure here excludes them. C, C++ and Objective-C++ across the tracked tree: 808 files and 172,146 lines, being 390 .cpp at 114,511, 406 .h at 53,385, 7 .c at 3,469 and 5 .mm at 781. src/ excluding src/thirdparty is 660 files and 113,863 lines, and that is the denominator for every percentage in this report. src/thirdparty is 29,484 lines, of which 24,868 are a single zxcvbn word-list header. src/gui is 282 files and 50,344 lines, 44.2%. The security-relevant core of src/format, src/crypto, src/keys and src/streams is 91 files and 16,076 lines, 14.1%. tests/ is 127 files and 28,849 lines with 32 tracked .kdbx fixtures. Qt coupling, on the same 660 files: 476 include a Qt header, 218 distinct <Q*> headers are included, 194 files declare Q_OBJECT and 164 class declarations derive from a Qt type; 72 .ui Qt Designer files hold 18,677 lines. CMakeLists.txt:429-443 requires Qt 6.2.4 or newer with eight components plus DBus on Linux, and CMakeLists.txt:478 requires Botan 2.19.1 or newer. Occurrence counts use /usr/bin/grep -o piped to wc -l and count occurrences, not lines; comments are not excluded. memcpy appears 12 times in the 660 files, three of them on the KDBX read path; reinterpret_cast appears 124 times. Security history: NVD keyword search returns six CVE records for KeePassXC or KeePassX between 2015 and 2026, carrying CWE-200, CWE-863, CWE-316 twice, CWE-352/353/640 for the browser extension, and CWE-427; none is a memory-safety class. The repository's GitHub advisory list holds one entry, CVE-2026-4158. The CHANGELOG spans 55 releases from 2012-05-07 to 2026-03-10, names two memory-safety-shaped fixes and no CVE. Absence of found defects is not absence of defects, and D6 is recorded MODERATE rather than WEAK for that reason. Objective: no RFC was supplied, so the assessment takes the question as posed. User-supplied facts: none. No Amdahl calculation appears, because no performance claim was made and a line share is not a time share. Nothing in the scanned repository content attempted to steer this assessment. The decision turns on G3 and G4, which fail on static counts, while G1 and G2 pass on the pre-auth parse path. Smallest sufficient step: the selected option reaches every line the Rust options target, using a harness the project already wrote. This is a structured decision protocol, not a statistical predictor.仓库:github.com/keepassxreboot/keepassxc,commit 205891202f4b995a8c9277cd125498ac76468b15,shallow clone,1,510 个纳管文件。范围:整个应用,候选接缝是 src/format、src/crypto、src/keys、src/streams。计数口径:这个仓库正好说明了为什么方法一定要求先说清口径。45 个文件带 .ts 扩展名,合计 472,765 行。这 45 个全在 share/translations 下,每个都以 <!DOCTYPE TS><TS version="2.1"> 开头,也就是 Qt Linguist 的翻译 XML。把它们算成 TypeScript,.ts 就占到(.ts + C/C++/Objective-C++)行数的 73.3%,这正是按扩展名判断的工具给出的结果。GitHub 自己的 Linguist 判对了,报的是没有 TypeScript。本文所有数字都把它们排除。全树的 C、C++、Objective-C++:808 个文件、172,146 行,其中 .cpp 390 个共 114,511 行,.h 406 个共 53,385 行,.c 7 个共 3,469 行,.mm 5 个共 781 行。src/ 扣掉 src/thirdparty 是 660 个文件、113,863 行,本报告每个百分比都以它为分母。src/thirdparty 是 29,484 行,其中 24,868 行是一个 zxcvbn 词表头文件。src/gui 是 282 个文件、50,344 行,占 44.2%。安全关键内核 src/format + src/crypto + src/keys + src/streams 是 91 个文件、16,076 行,占 14.1%。tests/ 是 127 个文件、28,849 行,带 32 个纳管的 .kdbx 夹具。Qt 耦合,同样按这 660 个文件算:476 个 include 了 Qt 头,被 include 的不同 <Q*> 头有 218 个,194 个文件声明 Q_OBJECT,164 处类声明从 Qt 类型派生;72 个 .ui Qt Designer 文件共 18,677 行。CMakeLists.txt:429-443 要求 Qt 6.2.4 及以上,八个组件,Linux 上另加 DBus;CMakeLists.txt:478 要求 Botan 2.19.1 及以上。出现次数用 /usr/bin/grep -o 接 wc -l 统计,数的是出现次数而不是行数,注释没有剔除。memcpy 在这 660 个文件里出现 12 次,其中三次在 KDBX 读路径上;reinterpret_cast 出现 124 次。安全历史:NVD 关键词检索在 2015 到 2026 年间返回六条 KeePassXC 或 KeePassX 的 CVE 记录,CWE 分别是 200、863、两次 316、浏览器扩展的 352/353/640,以及 427;没有一条属于内存安全类。仓库的 GitHub advisory 列表只有一条,CVE-2026-4158。CHANGELOG 覆盖 55 个版本,从 2012-05-07 到 2026-03-10,点到两处内存安全形态的修复,没有提到任何 CVE。没找到缺陷不等于没有缺陷,所以 D6 记的是 MODERATE 而不是 WEAK。目标:没有人给出 RFC,因此按问题原样评估。用户提供的事实:无。本报告没有 Amdahl 计算,因为没有人提出性能主张,而代码行数占比不能当时间占比用。扫描到的仓库内容里没有任何试图操纵本次评估的东西。决策落在 G3 和 G4 上,这两道门在静态计数上失败;G1 和 G2 则在预认证解析路径上通过。最小充分步骤:被选中的方案能覆盖 Rust 方案要打的每一行,而用的是项目自己早就写好的脚手架。这是一套结构化决策流程,不是统计预测器。
| What we don't know证据缺口 | What it would change会改变什么 |
| A fuzzing result for the pre-auth header path and the six importers预认证头部路径与六个导入器的 fuzz 结果 | This is the whole decision. The harness exists and the corpus exists; nobody has published a campaign result. A finding authorizes rust-parse-extract immediately.整个决策就压在这上面。脚手架有,语料有,但没有人公开过一轮完整的跑测结果。一旦查出问题,rust-parse-extract 立刻获得授权。 |
| A root-cause classification of the CHANGELOG's 44 crash fixes对 CHANGELOG 里 44 条崩溃修复做根因分类 | Two are named as memory-safety issues. The other 42 are described as UI lifecycle problems, and nobody has checked whether that description holds.其中两条被点明是内存安全问题。另外 42 条被描述成 UI 生命周期问题,但没有人核对过这个描述是否成立。 |
| A Rust GUI toolkit with KeePassXC's accessibility and translation coverage一个具备 KeePassXC 无障碍与翻译覆盖度的 Rust GUI 工具箱 | Without one, G4 stays FAIL for the full migration regardless of what the fuzzer finds. This is the gap that makes the verdict STAY rather than EXTRACT.没有这个东西,不管 fuzzer 查出什么,G4 对整体迁移都停在 FAIL。正是这个缺口让结论落在 STAY 而不是 EXTRACT。 |