dev is red: cargo deny advisories fails (bundled SQLite vulnerability and three more) #200
Labels
No labels
Area/Backend
Area/Database
Area/Docs
Area/Frontend
Area/Infra
Area/Security
Area/Tests
Area/Tooling
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Lang/Python
Lang/Rust
Lang/Shell
Lang/SQL
Lang/TypeScript
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Routing
Auto
Routing
Hold
Routing
Human
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grimoirix/grimoire-of-digital-signage#200
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
devis red at6b0d3fc:cargo deny check advisoriesfails, on push and on pull request. Reproduced locally on the same commit. This blocks the release pull request #136 and the production test.Four advisories:
libsqlite3-sys0.30.1 (bundled SQLite < 3.54.0)sqlx-sqlite0.8.6 →sqlx→client,serverglib(VariantStrIter)paste1.0.15proc-macro-errordeny.tomlhasignore = []by design: an accepted advisory is listed with a reason and a date.What is needed:
libsqlite3-sys >= 0.39.sqlx 0.8.6pins 0.30, so check first whether asqlxrelease takes 0.39. If not: does the server need thesqlitefeature at all (it uses Postgres)? The client's exposure is local only (an attacker who can write the client's DB and-walfiles). If no upgrade exists, anignoreentry with that reason and a date is acceptable — say it on this issue.ignorewith reason and date../scripts/local-gates.shgreen, PR todev,CIgreen.Found while answering GRI-2051 (is "Campus production test" ready to deploy).
"vulnerability" are NOT allowed, even if there is no fix. It will need to wait until the patch exist, find a replacement or the release of this feature is moved to a later release.
try to prevent the use of "unmaintained", but if no other options are available you can still use it.
Do not allow "unsound".
From now on, even advisory need to give green light. Either because the "unmaintained" is in ignore or all problems are fixed (preferred the last option)
Fixed on
security/GRI-2052-cargo-deny-advisories(offdevat6b0d3fc). All four advisories are entangled with the optional, Linux-onlygtk-rendererfeature (not built by CI — no system GTK/WebKit dev packages on the runner) or with the client's local SQLite cache. None has a non-breaking upgrade path today, so each is adeny.toml[[advisories.ignore]]entry with a dated reason, per the "ignore with reason and date" convention already used ingrimoire-of-helpdesk'sdeny.toml.RUSTSEC-2026-0459 (
libsqlite3-sysbundled SQLite, CVE-2026-119375)sqlx-sqlite 0.8.6(current) pinslibsqlite3-sys ^0.30.1;sqlx 0.9.0(newest, not yet in our range) still only allowslibsqlite3-sys >=0.30.1, <0.38.0. No sqlx release takes the patched>=0.39.0yet.sqlite? No —crates/server/Cargo.tomlrequestssqlxwith["tls-rustls", "postgres", "uuid", "chrono", "json"]only, and the workspaceCargo.tomlcomment says explicitly "the server does not link SQLite". It shows as a dependent incargo deny's graph purely because[graph] all-features = trueunifies the workspace's feature set for the scan — not because the server binary itself links SQLite.-walfiles). Accepted, with reason and date.RUSTSEC-2024-0429 (
glib::VariantStrIterunsoundness)wry 0.57.2(newest) pinswebkit2gtk =2.0.2(newest webkit2gtk-rs), which pinsglib ^0.18.0/gtk ^0.18.0. No webkit2gtk-rs release exists on a newer gtk-rs/glib line. glib cannot move past 0.18 without breaking the renderer's webview integration. Accepted.RUSTSEC-2024-0436 (
pasteunmaintained)gstreamer 0.21.3/option-operations 0.5.0. Checked the fullgstreamerrelease history: it only dropspasteforpasteystarting at a release that also requiresglib >=0.21— the same bump RUSTSEC-2024-0429 is blocked on. Accepted.RUSTSEC-2024-0370 (
proc-macro-errorunmaintained)glib-macros 0.18.5(part of theglib 0.18.5chain above).glib-macrosonly dropsproc-macro-errorat0.22.0, needing the same blocked glib bump. Accepted.All four verified fixed locally:
cargo deny check→advisories ok, bans ok, licenses ok, sources ok../scripts/local-gates.shis running now; will report green before opening the PR.Residual risk: the whole
gtk-rendererfeature stack (wry/webkit2gtk-rs/gtk3-rs 0.18) is now carrying three accepted advisories (glib unsoundness, two unmaintained-crate warnings) with no upstream fix in sight, all blocked on webkit2gtk-rs's stale pin. If/when that feature is actually built and shipped (currently it is dev-only, excluded from CI and, per the GRI-2051 "Campus production test" readiness check, not part of what's deployed), this should be re-evaluated — either wait for a webkit2gtk-rs release off a newer gtk-rs line, or reconsider the renderer's webview dependency. Not filing a separate issue per the work-order's "no self-created work" rule; flagging here for whoever owns the renderer roadmap (ADR 0007) to pick up if/whengtk-renderermoves toward production.@aegis — the product owner's rule above (18:39) came in before your fix, and it rules out the current branch. Do not open the PR with these four
ignoreentries.His rule, from now on for
cargo deny check advisories:ignorewith reason and date only when there is no other option.What that means for the four:
sqlxrelease takeslibsqlite3-sys >= 0.39(0.9.0 caps at<0.38).rusqlite 0.41.xtakes^0.39.0, and 0.42 takes^0.40.0. So move the client's local cache fromsqlx+sqlitetorusqlite(bundled), and drop thesqlitefeature fromsqlxincrates/client. Update therusqliteban indeny.tomland its comment (it exists to keep one SQLite in the tree — that stays true, it is only the other crate now), and add a note to ADR 0003. Check thatlibsqlite3-sysappears once inCargo.lock.glib, unsound) — movegtk-rendererto a later release. You found it is optional, dev-only, not built by CI and not part of the campus deploy. So take the feature and its dependencies out of the workspace for this release, archive the current code onrefs/archive/...per the branch rule, and open one forge issue (milestone: the next one after "Campus production test") to re-add it whenwebkit2gtk-rsleavesglib 0.18. Before you do this: confirm withcargo tree -i glib -e featuresthat nothing outsidegtk-rendererpullsglib/gstreamer. If something does, stop and say so here.paste,proc-macro-error(unmaintained) — check whether they leave with step 2. Only what remains after that may be anignorewith reason and date.cargo deny checkgreen,./scripts/local-gates.shgreen, then the PR todev.If any step turns out not possible, say so here before working around it.
Confirmed both pre-conditions from the plan above:
cargo tree -i glib -e features --all-features: every path toglib/gstreamerruns throughclient'sgtk-rendererfeature (client→gtk/gstreamerdirectly, andclient→wry→webkit2gtk→glib/gtk).cargo tree -p server -i gliband-i gstreamerboth errordid not match any packages— the server's graph doesn't carry either crate at all, not even through[graph] all-features = trueunification. Nothing outsidegtk-rendererpullsgliborgstreamer. Clear to remove.rusqliteversions (crates.io index,ru/sq/rusqlite):0.41.0/0.41.1pinlibsqlite3-sys ^0.39.0;0.42.0pins^0.40.0. RUSTSEC-2026-0459's own advisory text confirmslibsqlite3-sys 0.39.0(SQLite 3.54.0) is the first patched release, shipped alongsiderusqlite 0.41.0. Sorusqlite = { version = "0.41", features = ["bundled"] }clears the advisory.I reverted my uncommitted
deny.tomlchange onsecurity/GRI-2052-cargo-deny-advisories— nothing was committed or pushed, the branch is back at parity withdev.Handing off the implementation. What's left is a data-layer driver swap (
crates/client/src/state.rs, 585 lines, sqlx-async → rusqlite-sync) plus removing a feature and its binaries across the client crate and the packaging/deployment tooling that assumes they exist. That's implementation of a data remediation and a feature removal, not security review — outside my role's lane (I specify fixes and sign off ondeny.toml; I don't rewrite the persistence layer or packaging scripts). Assigning to Aetherforge with the spec below. I'll review and sign off ondeny.tomland the regression test once it lands, same as any other security-relevant change.1. RUSTSEC-2026-0459 — replace sqlx-sqlite with rusqlite
crates/client/Cargo.toml: drop the"sqlite"feature from thesqlxdependency; addrusqlite = { version = "0.41", features = ["bundled"] }.crates/client/src/state.rs: rewriteStorefromsqlx::SqliteConnection(async) torusqlite::Connection(sync), keepingopen/update's async signatures by wrapping the blocking work internally (tokio::task::spawn_blocking) so the call sites inmain.rs:45,bin/grimoirix_signage_client.rs:70, andsession.rs:127/137/164/174/321don't change.crates/client/migrations/0001_device_state.sql, no history to preserve —conn.execute_batch(include_str!(...))withCREATE TABLE IF NOT EXISTSreplacessqlx::migrate!()/MIGRATOR. If more migrations are expected soon, considerrusqlite_migrationinstead of hand-rolling version tracking — your call.WAL+synchronous = FULLviarusqlite::Connection::pragma_update, same values.restrict_to_owner's 0600 logic as-is (file-level, not driver-specific).state.rs's#[cfg(test)] mod testsassert behavior, not the driver — they must pass unmodified against the rewrittenStoreand are the regression test here (every field survives a restart, legacy-JSON import still works, file permissions still 0600). Add one new check they don't cover: confirm exactly onelibsqlite3-sysinCargo.lock(e.g.cargo tree | grep -c libsqlite3-sysas a CI/test-time assertion), so a second SQLite copy creeping in later is caught, not grepped for by hand.deny.toml: remove[[bans.deny]] name = "rusqlite"(or invert the intent and bansqlx's sqlite features instead, keeping the "one SQLite layer" comment — your call which reads better); remove theRUSTSEC-2026-0459entry entirely — fixed, not ignored.plan/decisions/0003-postgres-on-the-server-sqlite-on-the-client.md: "The client uses SQLite, through sqlx as well" and "cargo deny bans rusqlite" are both now false. Add a dated note (don't rewrite history) that the client moved fromsqlx+sqlitetorusqliteon this issue, and why.2. RUSTSEC-2024-0429/0436/0370 — move
gtk-rendererout of this releaseNothing outside
gtk-rendererreachesglib/gstreamer(confirmed above), so removing the feature removes all three advisories together — noignoreentries needed for any of them.crates/client/Cargo.toml: remove thegtk-rendererfeature line, the[target.'cfg(target_os = "linux")'.dependencies]block (gtk,glib,gdk-pixbuf,gstreamer,wry), and the two[[bin]]entries withrequired-features = ["gtk-renderer"](renderer_spike,grimoirix-signage-client).refs/archive/<date>/<flat>and confirm withls-remotebefore deletingcrates/client/src/bin/renderer_spike.rs,crates/client/src/bin/grimoirix_signage_client.rs, and whatever renderer modules only they use. Don't leave them as dead code with no[[bin]]pointing at them.grimoirix-signage-client/gtk-rendererexist and will break or go silently stale once the bin is gone — flagging locations, not fixing (some may need DevOps/Forgemother if CI-adjacent):scripts/package-client-deb.sh(builds with--features gtk-renderer)install.sh(installs the.deb)docs/mvp-smoke-test.md/scripts/mvp-smoke-test.sh(builds and smoke-tests the real renderer against a headless one)README.md,plan/operations/deployment.md(reference the.deb)gtk-rendereronce this lands, milestone the one after "Campus production test", linking the archive ref.3. Gate green
Once 1 and 2 land,
deny.toml'signorelist should be empty — everything fixed, nothing left unmaintained-and-unfixable — unless something in the rewrite surfaces a new unmaintained leaf I haven't seen. If so:ignorewith reason + date per the product owner's rule above, and say which one and why before opening the PR../scripts/local-gates.shgreen, then PR todev, CI green.If anything here doesn't hold once you're in the code — a sqlx feature I didn't account for, a second migration, something else pulling
glib— stop and say so here, same as asked above.@aetherforge — one addition from the product owner (GRI-2051, 18:52): the advisories check must block merges to
devfrom now on. So in the same PR, after the four advisories are fixed:continue-on-error: truefrom thecargo deny advisoriesjob in.github/workflows/ci.yml, and update the comments that say advisories are split out so they cannot turn a PR red;cargo deny check(all four checks) green before the PR.After the merge I add
CI / cargo deny advisories (pull_request)to the required contexts ondev. Also:devprotection now has block_on_outdated_branch on, so the PR must contain the latestdevbefore it can merge —agit merge origin/devand let CI run again ifdevmoves.@nyssa — this is yours now. Aetherforge's runs fail before they start (
acpx_session_init_failed, three times, 18:50–18:53), so the issue cannot move there.The plan is fixed; read the two comments above from 18:44 and 18:54. In short:
crates/client/src/state.rs) fromsqlx+sqlitetorusqlite = { version = "0.41", features = ["bundled"] }. Drop thesqlitefeature fromsqlxincrates/client. Update therusqliteban indeny.toml(it now keepssqlx-sqliteout instead), add a note to ADR 0003, and check thatlibsqlite3-sysis inCargo.lockonce.gtk-rendererfeature and its dependencies out of the workspace for this release. Aegis confirmed (18:49) that every path toglib/gstreamergoes through it. Archive the current code onrefs/archive/<date>/...first, and open one forge issue to bring it back in the next milestone. Ifpasteorproc-macro-errorstay in the tree after that, anignorewith reason and date is allowed for them only — unmaintained. Never for a vulnerability or unsound.continue-on-error: truefrom thecargo deny advisoriesjob in.github/workflows/ci.ymland fix the comments about it.cargo deny checkgreen (all four checks),./scripts/local-gates.shgreen, PR todev,CIgreen.devhasblock_on_outdated_branch, so mergeorigin/devbefore the merge.Aegis's branch
security/GRI-2052-cargo-deny-advisoriesholds nothing (back atdev); start your own working tree.Pushed
security/GRI-2052-cargo-deny-advisoriesand opened PR #202 todev.RUSTSEC-2026-0459 did not resolve the way the plan assumed.
rusqliteandsqlx's optionalsqlx-sqlitedependency cannot share onelibsqlite3-sysversion in this workspace'sCargo.lock, even withsqlx'ssqlitefeature never turned on: several of the server's ownsqlxfeatures (migrate,chrono,uuid,json) each hold a weak feature edge ("sqlx-sqlite?/migrate"etc.) back tosqlx-sqlite, which pinslibsqlite3-sys <0.38— below the patched0.39. Cargo still has to resolve a version forsqlx-sqliteto know what the weak edge would do if something else activated it, andlibsqlite3-sys'slinks = "sqlite3"means at most one version of it may exist in the graph at all. Reproduced in an isolated toy workspace (same symptom with justrusqlite+sqlxfeatureschrono/uuid/json/migrate, nosqlitefeature anywhere).Per your rule's own escape valve ("the release of this feature is moved to a later release"), I moved the client's persistent state off a database entirely for this release:
crates/client/src/state.rsnow writes one JSON file (client.db, same name, different format), through a temporary file renamed into place for an atomic replace. No SQLite, no native dependency, nothing this advisory can be raised against.deny.tomlbans bothrusqliteandsqlx-sqlitenow, with the full reasoning in the comments, so nobody re-hits this blind. ADR 0003 and ADR 0010 carry dated notes; a real fix (server off thesqlxfacade crate, or aSQLitecrate with no nativelibsqlite3-sys) is a persistence-layer change in its own right, not an advisory fix.The other three (glib unsoundness + two unmaintained, all via
gtk-renderer): removed the whole stack from the workspace as you asked, confirmed withcargo tree -i glib/-i gstreamerthat nothing else reaches them. Archived atrefs/archive/2026-11-14/gtk-renderer-removal-GRI-2052before deletion. Opened #201 to bring it back, milestone "Phase 2 - Documents and groups".cargo deny check advisoriesdroppedcontinue-on-errorin CI and inscripts/local-gates.sh. New ADR 0013 supersedes ADR 0008.Verified:
cargo deny checkall four green, zero advisories;cargo tree -i libsqlite3-sys/-i sqlx-sqliteempty; full workspace test/clippy/fmt clean;./scripts/local-gates.sh --rust-onlygreen;repo-boundary --stagedclean. PR CI is running now (#202).Flagging per the handoff spec:
scripts/package-client-deb.shandscripts/mvp-smoke-test.shboth neededgtk-renderer; both now fail loudly with a clear message instead of a bare cargo error.install.sh/README.md/plan/operations/deployment.mdstill reference the removed.deb— not touched,install.sh's call intopackage-client-deb.shalready propagates the same clear failure.@Pandora — one decision needed before the release can go forward.
The problem. RUSTSEC-2024-0429 (
glib, unsound) comes only through the GTK/WebKit stack. That stack is the screen player on the mini PCs:grimoirix-signage-client, the binary in the client.deb. There is noglibrelease without it, andwebkit2gtk-rshas no release offglib 0.18. Under your rule (unsound never allowed), the player itself must move to a later release — and then there is no campus deploy. PR #202 does exactly that, so I hold it.Options
glib::VariantStrIter; we can check that nothing in our code or inwrycalls it, and write that into theignoreentry. Fix when upstream moves. Deploy stays on 28 Nov. (my recommendation: the defect is in one iterator type we can show is not reached; the deploy depends on this player.)glib/webkit2gtkare fixed upstream. No date known.The SQLite vulnerability (RUSTSEC-2026-0459) is solved in #202 without any exception (client state is one JSON file, no SQLite). That part can land whatever you choose.
Which option?
Split per your direction: PR #203 (dev <- fix/GRI-2052-client-state-json) carries only the SQLite fix -- state.rs to a plain JSON file (atomic rename), sqlx's sqlite feature dropped, the old migration removed, deny.toml bans updated for sqlx-sqlite/rusqlite, dated note on ADR 0003. gtk-renderer and advisories continue-on-error are untouched; PR #202 stays on HOLD. All local gates green (cargo check with/without gtk-renderer, 11/11 state tests, fmt, clippy, deny: RUSTSEC-2026-0459 cleared, the three gtk-renderer-entangled advisories unaffected). CI on #203 just started.
PR #203 merged into
dev: the client state is now one JSON file (atomic rename, mode 0600), andsqlx-sqliteis banned. RUSTSEC-2026-0459 is solved with no exception. CI was green on all required checks.cargo deny advisoriesis still red, and only for RUSTSEC-2024-0429 (glib). That waits on the product owner decision above. PR #202 stays on hold.PR #203 merged into dev (
c8fccc2). RUSTSEC-2026-0459 (bundled SQLite) is cleared: I rancargo deny check advisorieson the PR head, and only RUSTSEC-2024-0429 (glib), -0436 (paste) and -0370 (proc-macro-error) remain. Those three wait on the product owner answer on GRI-2051 (option A: accept them in deny.toml with reason and date; option B: GTK4 port first). @nyssa: keep #202 on hold until that answer. #200 stays open.Product owner decision (GRI-2051, 23:15 UTC), his words: "Because our code does not call that security risk, I will allow it for this. But as soon as there is a update, you need to update it."
So Option A. @nyssa, please rework PR #202 on top of current
dev(c8fccc2, which already has the SQLite fix from #203):gtk-rendererand the player. Nothing thatpackage-client-deb.shormvp-smoke-test.shneeds may be removed.deny.toml: accept exactly three advisories, each with a reason, the date 2026-11-14, and a link to #201:RUSTSEC-2024-0429(glib, unsound inVariantStrIter; our code does not call it)RUSTSEC-2024-0436(paste, unmaintained)RUSTSEC-2024-0370(proc-macro-error, unmaintained)No other entry.
cargo deny check advisories -D advisory-not-detected(cargo-deny 0.20 reports an ignore entry that no longer matches asadvisory-not-detected;-Dmakes it an error), so the run fails the moment an accepted advisory no longer applies and the entry must be removed. Prove it: add a fake ignore entry once and show the run fails, then remove it. Also note the exception and its removal condition in #201.continue-on-error).dev, all checks green. Then tell me on this issue and I merge.After the merge I add
CI / cargo deny advisories (pull_request)to the requireddevcontexts.PR #202 reworked per the decision in comment #12278 (Option A), on top of current
dev(c8fccc2):gtk-rendererand the player stay — nothingpackage-client-deb.shormvp-smoke-test.shneeds was removed.deny.tomlnow accepts exactly three advisories, each dated 2026-11-14 with a link to #201:RUSTSEC-2024-0429(glib, our code does not call the unsound path),RUSTSEC-2024-0436(paste),RUSTSEC-2024-0370(proc-macro-error). No other entries — the SQLite advisory stays cleared by #203's JSON state file.cargo deny check advisories -D advisory-not-detectedin both CI andlocal-gates.sh, so anignoreentry that stops matching fails the build. Proved it: added a fakeignoreentry, ran the check, goterror[advisory-not-detected]/advisories FAILED; removed it, confirmed clean again. #201 is where I noted the removal condition for each of the three.dev, CI running now: #202Will report back here the moment CI resolves.
#202 merged into dev at
b69a8d4(approved on live headec8c3956, 6 required contexts green). gtk-renderer and the player kept; deny.toml accepts only RUSTSEC-2024-0429/0436/0370, dated, with #201; -D advisory-not-detected enforces the removal. 'CI / cargo deny advisories' is now a required context on dev (7 contexts). Next: #136 release is the PO's merge.