返回 CodeWhale
dependency-maintenance.md
根目录 / docs / dependency-maintenance.md
1 # Dependency maintenance
2
3 Reviewed against the 0.9.13 Core dependency graph on September 8, 2026.
4 This records maintenance decisions, not a security clearance or release test.
5
6 The terminal Markdown renderer uses Syntect's embedded syntax and theme dumps
7 with the existing fancy-regex backend. It does not load external syntax YAML,
8 theme plists, or emit Syntect HTML. Selecting those features explicitly removes
9 the unused `yaml-rust`, `plist`, and `quick-xml` dependency path. The embedded
10 YAML language grammar remains available for highlighting YAML code blocks.
11
12 `derivative`, `fxhash`, `paste`, and `ttf-parser` are absent from the Core lockfile.
13 Their obsolete advisory exceptions are removed so a future reintroduction is
14 visible to the advisory checks. No `cargo-audit` advisory is ignored.
15
16 The longest-standing `cargo-deny` maintenance exception is
17 [RUSTSEC-2025-0141](https://rustsec.org/advisories/RUSTSEC-2025-0141.html)
18 for `bincode` 1.3.3. Syntect 5.3.0 requires it to deserialize its compiled-in
19 syntax and theme assets and for its parser's internal lazy-context encoding.
20 Codewhale does not pass arbitrary external dump files to these loaders. The
21 maintenance warning remains visible in `cargo-audit`; the lack of an identified
22 exploit in this advisory does not guarantee safety.
23
24 Revisit the exception when upgrading or replacing Syntect, or before adding
25 external dump, grammar, or theme loading. Remove it when the dependency leaves
26 the graph. A replacement must preserve embedded language/theme coverage,
27 multiline highlighting and error recovery, and pass the existing Markdown
28 renderer tests with a resolver-verified lockfile. Adding ignores for new
29 advisories requires a separate assessment.
30
31 Two further exceptions were assessed for the 0.10.3 freeze on November 17, 2026.
32 [RUSTSEC-2026-0543](https://rustsec.org/advisories/RUSTSEC-2026-0543.html)
33 marks `chrono` 0.4.45 unmaintained. It is a workspace dependency used directly
34 by about 20 Core crates, and no patched release exists, so removing it is a
35 cross-crate migration rather than a freeze change.
36 [RUSTSEC-2026-0542](https://rustsec.org/advisories/RUSTSEC-2026-0542.html)
37 marks `humantime` 2.4.0 unmaintained only because it wraps `chrono`. It is
38 reached solely through `cucumber` 0.23.0, a development dependency of
39 `codewhale-tui` that requires it, and is not part of any shipped binary.
40 Both advisories are maintenance notices, not vulnerabilities. Remove both
41 ignores when Core migrates from `chrono` to `jiff` or `time` and `cucumber` no
42 longer pulls `humantime`; review them by February 15, 2027 either way.
43
44 Nine `unsound` advisories against `heapless` 0.8.0 were assessed on November
45 19, 2026:
46 [RUSTSEC-2026-0574](https://rustsec.org/advisories/RUSTSEC-2026-0574.html)
47 (`FindMutView::pop`),
48 [RUSTSEC-2026-0575](https://rustsec.org/advisories/RUSTSEC-2026-0575.html)
49 (`Spsc::peek` ordering),
50 [RUSTSEC-2026-0576](https://rustsec.org/advisories/RUSTSEC-2026-0576.html)
51 (`IndexMap::truncate`),
52 [RUSTSEC-2026-0577](https://rustsec.org/advisories/RUSTSEC-2026-0577.html)
53 (panicking `Drop`),
54 [RUSTSEC-2026-0578](https://rustsec.org/advisories/RUSTSEC-2026-0578.html)
55 (`SortedLinkedList::zeroize`),
56 [RUSTSEC-2026-0579](https://rustsec.org/advisories/RUSTSEC-2026-0579.html)
57 (`Deque` `TryFrom`),
58 [RUSTSEC-2026-0580](https://rustsec.org/advisories/RUSTSEC-2026-0580.html)
59 (treiber stack race),
60 [RUSTSEC-2026-0581](https://rustsec.org/advisories/RUSTSEC-2026-0581.html)
61 (`Deque::make_contiguous`), and
62 [RUSTSEC-2026-0582](https://rustsec.org/advisories/RUSTSEC-2026-0582.html)
63 (`IndexMap::insert`).
64 `heapless` reaches the graph only as a non-optional dependency edge of
65 `faster-hex` 0.10.1 via `gix-hash` 0.28.1 and `gix` 0.90.0 — the latest
66 `gix` releases — which Codewhale uses for git object-id hex encoding.
67 `gix-hash` builds `faster-hex` with its `std` (and therefore `alloc`) feature,
68 so the crate's only `heapless` use — `heapless::{String, Vec}` behind
69 `cfg(not(feature = "alloc"))` — is compiled out, and none of the flagged
70 collection APIs (`IndexMap`, `Spsc`, `Deque`, `SortedLinkedList`, the treiber
71 stack, `FindMutView`) is invoked. No fix exists in a compatible range: 0.8.0 is
72 the sole 0.8.x release and the advisories fix in 0.9.4, `faster-hex` requires
73 `^0.8`, and although `faster-hex` 1.0.0 makes `heapless` optional, `gix-hash`
74 requires `^0.10.1`. Remove the ignores when `gix` moves to a `faster-hex`
75 release that drops the `heapless` edge, or when a patched 0.8.x ships; review
76 by February 15, 2027 either way.
77
78 The Apps desktop lockfile and its platform dependencies are a separate graph;
79 this Core cleanup does not resolve their maintenance or GLib qualification work.
80
81 Automatic Git review and workspace polling require the runtime configuration
82 override interface introduced in [Git 2.31](https://github.com/git/git/blob/master/Documentation/RelNotes/2.31.0.adoc). The shared read authority probes the
83 resolved absolute executable once per process and pins subsequent commands to
84 that executable even if PATH changes. It refuses automatic reads if the executable
85 cannot honor those overrides; explicit user Git writes retain their existing behavior.
86 The porcelain-v1 display fallback does not waive this safety requirement.
87 The absolute path fixes executable search selection; it does not authenticate an
88 executable replaced at that path by the same local user.
89
90 Local fixtures cover native modern Git and an emulated executable that ignores
91 runtime overrides. They do not qualify a real older-Git installation, partial
92 clones, or all platform-specific Git behavior.
93
94 ## VS Code extension packager
95
96 The VS Code extension's packaging toolchain uses `@vscode/vsce` →
97 `@azure/identity` → `@azure/msal-node`. MSAL Node versions before 7.1.0 are
98 affected by [GHSA-xcx6-jx8p-x3h5](https://github.com/AzureAD/microsoft-authentication-library-for-js/security/advisories/GHSA-xcx6-jx8p-x3h5).
99 The extension manifest overrides Azure Identity's MSAL Node dependency to
100 `^7.1.2`; its lockfile resolves 7.1.2. Keep the override until Azure Identity
101 requires a patched version itself.
102
103 `npm run audit:dependencies -- --report <path>` audits the complete lockfile
104 and keeps the raw report. Every reported vulnerability blocks the check.
105 Incomplete reports, count mismatches and critical findings also fail. There
106 is no advisory exception.
107
108 After changing this dependency, materialize the lockfile with `npm ci`, run
109 the extension's existing `npm test` checks and build a local package with
110 `npm run package`. Packaging uses `vsce package --no-dependencies`, which
111 excludes development dependencies from the VSIX. A local package build does
112 not establish that a publishing authentication flow works; verify that flow
113 only when publication is separately authorized.
114
114 lines MARKDOWN