Skip to content

chore(deps): document ttf-parser migration decision (RUSTSEC-2026-0192)#900

Merged
yfedoseev merged 3 commits into
mainfrom
fix/issue-852-ttfparser-skrifa
Jul 19, 2026
Merged

chore(deps): document ttf-parser migration decision (RUSTSEC-2026-0192)#900
yfedoseev merged 3 commits into
mainfrom
fix/issue-852-ttfparser-skrifa

Conversation

@yfedoseev

Copy link
Copy Markdown
Owner

Addresses #852 via its sanctioned "documented decision to keep waiting" acceptance path.

Why not migrate now

ttf-parser (RUSTSEC-2026-0192, informational/unmaintained) cannot be removed by a dependency bump. It reaches the tree three independent ways:

  1. Directly — ~29 call sites across truetype_parser, truetype_cmap, font_dict, text_rasterizer: embedded-font cmap, glyph outlines, metrics, and name records (core font parsing + the render outline path). (The issue's "transitive-only, cmap-only" framing was inaccurate — corrected here.)
  2. fontdb (system-fonts) → ttf-parser — latest fontdb 0.23.0 (dormant, RazrFalcon) still depends on it; no skrifa/fontations release exists.
  3. imageproc (ml) → ab_glyph → owned_ttf_parser → ttf-parser — latest ab_glyph 0.2.32 / imageproc 0.27.0 have no fontations backend.

Verified against crates.io/docs/rustsec: no combination of upgraded fontdb/ab_glyph/imageproc removes ttf-parser. Fully clearing the advisory requires porting our direct usage to skrifa and replacing fontdb + ab_glyph with fontations-based crates — a large, multi-crate migration touching core font-parsing and render paths, with real regression risk that is disproportionate while the advisory is informational-only (no CVE, no memory-safety/RCE implication).

The fontations successor (skrifa/read-fonts) is already in our tree (via subsetter, and via harfrust once #851 lands), so the eventual migration has a foothold.

Change (docs-only, no code)

  • Rewrote the osv-scanner.toml RUSTSEC-2026-0192 justification to reflect the real (three-path) situation and the explicit decision; extended ignoreUntil to 2026-12-31.
  • Corrected the inaccurate ttf-parser comment in Cargo.toml and pointed it at the rationale.

Acceptance (#852)

  • Documented decision to keep waiting (the acceptance alternative), with evidence
  • ttf-parser out of the tree — deferred; upstream-gated (fontdb + ab_glyph), tracked by this decision

Related: #851 (rustybuzz → harfrust) is the companion shaping migration.

https://claude.ai/code/session_01QXMiKnxkmFs3tCQNz1vMc5

ttf-parser is flagged unmaintained (RUSTSEC-2026-0192, informational). This
records the evidence-based decision to keep waiting rather than migrate now,
and corrects the suppression's inaccurate "cmap only" justification.

Findings:
- ttf-parser is a DIRECT dependency (~29 call sites: cmap, glyph outlines,
  metrics, name records — core font parsing + the render outline path), not
  transitive-only.
- It also reaches the tree via fontdb (system-fonts) and via
  imageproc -> ab_glyph -> owned_ttf_parser (ml). No upgrade of fontdb 0.23,
  ab_glyph 0.2.32, or imageproc 0.27 removes it — none has a fontations
  (skrifa/read-fonts) backend.
- Fully clearing the advisory therefore requires porting our direct usage to
  skrifa AND replacing fontdb + ab_glyph with fontations-based crates — a
  large, multi-crate migration with real regression risk, disproportionate
  while the advisory is informational-only.

Extend the review horizon and re-evaluate when fontdb/ab_glyph ship a
fontations backend, or when the standalone font-stack migration is scheduled.

Refs #852

Claude-Session: https://claude.ai/code/session_01QXMiKnxkmFs3tCQNz1vMc5
The ttf-parser/skrifa dep-swap left 3 spaces before the subsetter comment;
taplo's TOML format check requires a single space. No dependency change.

Claude-Session: https://claude.ai/code/session_01VfT1dvLWaMNh4SpaXV8kcp
@yfedoseev
yfedoseev merged commit 90da637 into main Jul 19, 2026
236 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant