Repository navigation
Description
Summary
Security preflight (Linux) in Build & Test (ubuntu-latest) fails on a cargo-audit vulnerability in tract-nnef 0.21.10, plus several unmaintained/unsound warnings. It runs scripts/security_preflight.sh --strict, so the finding is a hard gate.
Why this has not been noticed
This step had not actually executed on recent master. The job aborts at an earlier step, Run TUI library tests (Linux only), which has failed on every push since 5c70ac4c3 (that is #654). Because Security preflight runs after it in the same job, the audit failure was masked by the test failure.
Fixing #654 in #656 lets the job reach the audit step, which then fails. Verified on run 30435943571: every test step passes and Security preflight is the only failing step. For contrast, on the last master run (30413583952) that step is skipped.
So this is not a new regression, and it is not caused by #656. It is a pre-existing dependency issue that was hidden behind an unrelated red gate.
The finding
One error-level advisory:
Crate: tract-nnef Version: 0.21.10 error: 1 vulnerability found!
Warning-level (unmaintained/unsound): bincode, paste, rustybuzz, ttf-parser, anyhow 1.0.100 (RUSTSEC-2026-0190), lru 0.12.5 (RUSTSEC-2026-0002), memmap2 0.8.0 (RUSTSEC-2026-0186), rand 0.8.5 (RUSTSEC-2026-0097).
Why I am not fixing it
This needs a maintainer decision rather than an agent's guess:
- Bump
tract-nnef, which may pull a breakingtractAPI change wherever it is used. - Add a scoped ignore to the audit config, accepting the risk with a documented rationale.
- Drop or feature-gate the dependency if the functionality is optional.
Choosing between those depends on how the crate is used and what risk is acceptable, and the several warning-level advisories deserve a deliberate pass too. Picking one unilaterally would be the wrong call.
Suggestion
Whatever the resolution, it is worth considering whether Security preflight should run in a job that is not gated behind the full test suite. A failure that can only surface once an unrelated test passes is a blind spot, and this issue is a concrete instance of it.
--- — Jcode agent (automated triage), on behalf of @1jehuang
Activity
1jehuang commentedon Jul 29, 2026
Investigated whether the
tract-nnefadvisory has a safe patch-level fix. It does not, and the reason is worth recording so nobody repeats the attempt.There are two advisories on
tract-nnef 0.21.10:>=0.21.16, <0.22.0, so in principle reachable without leaving the0.21line.quick-xml, nottract. Separate item.The
0.21.16/0.21.17bump is blocked by a hard version conflict:That is an exact pin. The lockfile currently resolves
half 2.7.1, required vianaga->vello_shaders->vello->jcode-desktop2. Socargo update -p tract-onnx --precise 0.21.17fails withfailed to select a version for half, and pinninghalfback to2.4.1fails againstnaga's requirement. Both directions are dead ends whilejcode-desktop2depends onvello 0.9.That leaves the real options as:
tract 0.23.x(0.23.4is current), which drops thehalfpin. This is a major-version move acrosstract-onnx/tract-hirand needsjcode-embeddingchecked against API changes.jcode-embeddingdoes not load a bundled model.load_from_dircallsdownload_modelwhenmodel.onnxis absent, fetching fromhuggingface.co/sentence-transformers/all-MiniLM-L6-v2over the network, then parses it withtract_onnx::onnx().model_for_path(...). So the parser does run over a downloaded artifact. The fetch is HTTPS from a fixed URL rather than user-supplied input, which limits it considerably, but it is not the "only parses bytes we shipped" case that would make an ignore obviously safe.tractat all.Given that, option 1 is more clearly the right answer than I initially thought, with option 2 defensible only as a short-term unblock with the download path noted. Either way the
vello/halfinteraction means this is a real dependency decision rather than a mechanical bump, so I have not implemented it.Lockfile left untouched; this was investigation only.
--- — Jcode agent (automated triage), on behalf of @1jehuang
1jehuang commentedon Jul 29, 2026
Update: #663 restores the rest of CI, so this advisory is now the only remaining failure on the Linux job.
That confirms the sequencing you described. On #663 every test step passes (including the TUI
--libgate red since5c70ac4c3),Quality Guardrailsis green for the first time, and macOS/Windows are green.Security preflightthen reports exactly one error-level finding:Everything else in that scan is warning-level (
bincode,paste,rustybuzz, and the rest already indocs/SECURITY_DEPENDENCIES.md).I deliberately did not touch it. This is labeled
autonomous: no, and the earlier investigation established the0.21.16bump is blocked bytract-data's exacthalf =2.4.1pin againstnaga'shalf ^2.5via the desktop2 GPU stack. Choosing between thetract 0.23major bump, a scoped ignore, and feature-gating the embedding stack is a real dependency decision, especially given the earlier finding thatjcode-embeddingparses a downloaded ONNX artifact rather than a bundled one.Also worth acting on separately: this issue's own suggestion that
Security preflightshould not sit behind the full test suite. #663 fixed two more gates that were failing invisibly for the same structural reason, including a warning-budget check that had been passing vacuously becausergis not installed on the runner and the script's fallback turned "command not found" into "zero warnings". Ordering-dependent gates keep hiding real findings here.--- — Jcode agent (automated triage), on behalf of @1jehuang
1jehuang commentedon Jul 30, 2026
Update: I revisited the tract 0.23 option and it is far cheaper than the earlier analysis suggested. PR: #666 (stacked on #663).
Your dependency analysis was correct and I re-confirmed it:
tract-data 0.21.16/0.21.17pinhalf =2.4.1exactly againstnaga/vello'shalf ^2.5, so the in-line fix really is unreachable. What changed is the cost of option 1. It is three compiler-directed renames, not a migration:SimplePlan<TypedFact, Box<dyn TypedOp>, Graph<..>>becomesArc<RunnableModel<TypedFact, Box<dyn TypedOp>>>(0.23 dropped the third type parameter, andinto_runnablereturns theArcalias directly)TValue::to_array_viewbecomesto_plain_array_view, 2 call sitesjcode-embeddingis the only consumer, so the diff is 3 files includingCargo.lock.scripts/security_preflight.sh --strictnow passes, andcargo tree -i tract-nnefshows 0.23.4.I chose this over the scoped ignore for the reason recorded earlier in this issue:
load_from_dirdownloadsmodel.onnxfrom huggingface.co and parses the fetched artifact, so the vulnerable NNEF parser runs over data retrieved at runtime, which is not the "only parses bytes we shipped" case that makes an ignore obviously safe.On verification, and its limit. A major bump of an inference dependency can compile perfectly and still produce garbage embeddings, so the compile is not the interesting evidence. The local MiniLM model happens to be present on this machine, which means
minilm_related_beats_unrelated_if_presentactually ran rather than taking its skip path, and its cosine-similarity assertion against the real model still holds. The--ignoredlatency probe also runs real inference end to end.The limit: that test silently skips when the model is absent, including on CI. So the embedding-quality evidence comes from my machine, not the pipeline. That is the same "gate that looks green because it never ran" pattern #663 found in the warning budget, and it is worth making the model a CI fixture separately.
This stays your call, which is why I said so in the PR: if you would rather ship a scoped ignore and schedule the upgrade deliberately, #666 can simply be closed. But the option that looked expensive turned out not to be.
--- — Jcode agent (automated triage), on behalf of @1jehuang
9 remaining items
ci: run the embedding numeric cohort, and fail if it silently skips
fix(deps): move jcode-embedding to tract 0.23 to clear RUSTSEC-2026-0217
test(embedding): pin MiniLM's numeric output so an engine upgrade can…
ci: run the embedding numeric cohort, and fail if it silently skips
fix(deps): move jcode-embedding to tract 0.23 to clear RUSTSEC-2026-0217
test(embedding): pin MiniLM's numeric output so an engine upgrade can…
ci: run the embedding numeric cohort, and fail if it silently skips
fix(deps): move jcode-embedding to tract 0.23 to clear RUSTSEC-2026-0217
test(embedding): pin MiniLM's numeric output so an engine upgrade can…
ci: run the embedding numeric cohort, and fail if it silently skips
fix(deps): move jcode-embedding to tract 0.23 to clear RUSTSEC-2026-0217
test(embedding): pin MiniLM's numeric output so an engine upgrade can…
ci: run the embedding numeric cohort, and fail if it silently skips
fix(deps): move jcode-embedding to tract 0.23 to clear RUSTSEC-2026-0217
fix(deps): move jcode-embedding to tract 0.23 to clear RUSTSEC-2026-0217