From 57ed5756c462998babc6f89c8b545239f0964edd Mon Sep 17 00:00:00 2001 From: poli0981 <127664709+poli0981@users.noreply.github.com> Date: Tue, 20 Oct 2026 13:37:19 +0700 Subject: [PATCH] ci: unblock cargo audit on zbus 5, redact pip 26's finished progress bar, hold rfd at 0.16 (#84) Three things have kept CI red since 2026-10-18; none touches the shipped program. - **cargo audit** (required on every PR, and the daily Security scan) fails on RUSTSEC-2026-0370/0371/0372: zvariant, zbus_names and zvariant_derive were folded into zbus 6 on 2026-10-16 and marked unmaintained the same day. zbus reaches the tree only through tauri-plugin-opener and tauri-plugin-single-instance, for D-Bus on Linux; `cargo tree -i zbus --target x86_64-pc-windows-msvc` prints nothing. Every release of both plugins, the 3.0 alphas included, still requires zbus ^5.9, so there is no update to take. Ignored individually in .cargo/audit.toml with that reason and a removal condition. `cargo audit --deny warnings` is clean locally. - **The Monday fixture-drift job** failed on pip/build-backend-failure/stdout.txt: pip 26 ends a finished bar with the bare elapsed time, not `eta 0:00:00`, so `_is_progress` let the transfer rate through (15.1 MB/s committed, 75.1 MB/s on the next runner). The rule now keys on a trailing time token. Old vs new over every committed fixture line: exactly this one line changes verdict. The fixture is restored to `` in binary mode, 7 CRLF before and after; its blob is again b349d1f, the pre-pip-26 bytes. - **rfd**: Dependabot's 0.17.2 bump (#83) adds a second rfd to the binary, because tauri-plugin-dialog 2.8.3 requires ^0.16 and src-tauri depends on rfd only because the plugin already compiles it. dependabot.yml now ignores rfd >= 0.17 until the plugin moves. Co-authored-by: Claude Opus 5.5 --- .cargo/audit.toml | 16 ++++++++++++++-- .github/dependabot.yml | 7 +++++++ .../pip/build-backend-failure/stdout.txt | 2 +- docs/SECURITY.md | 2 +- spikes/capture.py | 11 ++++++++--- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 1efeaee..a39d4f3 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -8,8 +8,9 @@ # individually rather than switched off as a class, so a new one still fails CI and has to be # looked at rather than silently absorbed. # -# Review obligation: when Tauri drops GTK3, or a `unic-*` dependent moves on, delete the -# corresponding lines. A stale ignore is how a real advisory eventually gets waved through. +# Review obligation: when Tauri drops GTK3, its plugins move to zbus 6, or a `unic-*` dependent +# moves on, delete the corresponding lines. A stale ignore is how a real advisory eventually gets +# waved through. [advisories] ignore = [ @@ -33,6 +34,17 @@ ignore = [ # PipDock's as this file used to say (`cargo tree -i proc-macro-error --target all`). "RUSTSEC-2024-0370", # proc-macro-error — unmaintained + # --- zbus 5's D-Bus stack (Linux only) ----------------------------------- + # zbus 6 (2026-10-16) folded these three crates into itself, and the advisories were filed the + # same day. zbus reaches the tree only through tauri-plugin-opener and + # tauri-plugin-single-instance, which use D-Bus on Linux alone: `cargo tree -i zbus --target + # x86_64-pc-windows-msvc` prints nothing. Every release of both plugins — 2.x and the 3.0 + # alphas alike — still requires zbus ^5.9, so there is no update to take. Delete these lines + # when the plugins move to zbus 6, or at P2-1 with the GTK3 block above. + "RUSTSEC-2026-0370", # zvariant — unmaintained, merged into zbus 6 + "RUSTSEC-2026-0371", # zbus_names — unmaintained, merged into zbus 6 + "RUSTSEC-2026-0372", # zvariant_derive — unmaintained, merged into zbus 6 + # --- unic-* Unicode tables ---------------------------------------------- # Superseded upstream but functionally frozen data tables, reached transitively. Nothing here # parses untrusted input on PipDock's behalf. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 605e8d7..4ce52cd 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -33,6 +33,13 @@ updates: cooldown: default-days: 3 semver-major-days: 14 + ignore: + # src-tauri takes rfd only because tauri-plugin-dialog already compiles it (the comment on + # the dependency says so). tauri-plugin-dialog 2.8.3 requires rfd ^0.16, so a 0.17 bump adds + # a second rfd to the Windows binary instead of updating the one there. Remove once + # tauri-plugin-dialog moves to 0.17, and bump both together. + - dependency-name: rfd + versions: ['>=0.17.0'] groups: # First, so a Tauri crate never lands in the catch-all group below. tauri: diff --git a/crates/pipdock-core/tests/fixtures/pip/build-backend-failure/stdout.txt b/crates/pipdock-core/tests/fixtures/pip/build-backend-failure/stdout.txt index 7e336ed..b349d1f 100644 --- a/crates/pipdock-core/tests/fixtures/pip/build-backend-failure/stdout.txt +++ b/crates/pipdock-core/tests/fixtures/pip/build-backend-failure/stdout.txt @@ -1,6 +1,6 @@ Collecting numpy==1.19.5 Downloading numpy-1.19.5.zip (7.3 MB) - ---------------------------------------- 7.3/7.3 MB 15.1 MB/s 0:00:00 + Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started diff --git a/docs/SECURITY.md b/docs/SECURITY.md index 22ee776..e60a000 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -76,7 +76,7 @@ pip-audit runs **from a venv of its own** in freeze-file mode: `Engine::freeze` ## 7. Supply chain of PipDock itself - CI: `cargo audit` (RustSec) + `npm audit --audit-level=high` gate every PR, and since 1.4.0 run again **every day against `main`** (`security-scan.yml`). A PR gate fires only when something changes, so an advisory published against a dependency already merged waited for the next PR to trip over it — which is how `main` went red on 2026-09-23 with no PR open to say so — and, because the failure notifier matched no workflow at all, with nobody told. Dependabot keeps the Rust, npm, Actions and Code Health pins and the Rust toolchain current (see RELEASE-CI.md §2). - - The `cargo audit` gate is on **vulnerabilities** and is never relaxed. `.cargo/audit.toml` ignores a fixed list of *informational* advisories — unmaintained/unsound — on transitive crates PipDock cannot influence, chiefly Tauri's archived GTK3 bindings, which a Windows-only build never compiles. They are listed individually with justification so a **new** advisory still fails CI. Adding macOS/Linux builds (P2-1) is the point at which that block must be re-examined rather than extended. + - The `cargo audit` gate is on **vulnerabilities** and is never relaxed. `.cargo/audit.toml` ignores a fixed list of *informational* advisories — unmaintained/unsound — on transitive crates PipDock cannot influence, chiefly Tauri's archived GTK3 bindings and, since 2026-10-20, zbus 5's `zvariant`/`zbus_names`/`zvariant_derive` (folded into zbus 6, which no Tauri plugin requires yet) — both stacks a Windows-only build never compiles. They are listed individually with justification so a **new** advisory still fails CI. Adding macOS/Linux builds (P2-1) is the point at which that block must be re-examined rather than extended. - **That "still fails CI" has been true only since 1.4.0.** Informational advisories — unmaintained, unsound, yanked — are cargo-audit *warnings*, and `rustsec/audit-check@v2`, which ran the gate until then, let warnings through; on a pull request it failed only on *critical*, which is how September's advisories passed every PR. The gate is now a prebuilt `cargo-audit` (installed by `taiki-e/install-action`, pinned by commit) run with `--deny warnings`. - `npm audit` installs with `npm ci --ignore-scripts`: it reads the lockfile and builds nothing, so no package's install script has a reason to run. - **`cargo deny`** checks licences, sources and bans on every PR (`deny.toml`, since 1.4.0). Its licence allowlist — each entry GPL-3.0-compatible — turns THIRD-PARTY-NOTICES' "all bundled licenses are GPL-3.0-compatible" from a sentence into a test for every crate the Windows target resolves, transitive ones included; widening the list is a licensing decision, not a CI fix. Only crates.io may supply a crate — no git dependency, no other registry — and wildcard version requirements are refused. Advisories stay `cargo audit`'s, so there is one ignore list rather than two to keep in step. The npm half of the build has no equivalent licence check. diff --git a/spikes/capture.py b/spikes/capture.py index dcd3d7b..81228ec 100644 --- a/spikes/capture.py +++ b/spikes/capture.py @@ -343,12 +343,17 @@ _ABS_PATH = re.compile( def _is_progress(line: str) -> bool: - """A pip progress-bar line: dashes, a space, anything, then `eta `.""" + """A pip progress-bar line: dashes, a space, anything, then a time in digits and colons. + + pip 25 ended a finished bar with `eta 0:00:00`; pip 26 ends it with the bare elapsed time + (`7.3/7.3 MB 15.1 MB/s 0:00:00`). Keying on `eta ` let pip 26's bars through with their + transfer rate, and the next Monday's drift job failed on a faster runner. + """ body = line.strip(" \t") if not body.startswith("-") or body.lstrip("-")[:1] not in (" ", "\t"): return False - _, sep, tail = body.rpartition("eta ") - return bool(sep) and tail != "" and all(c in "0123456789:" for c in tail) + tail = body.rsplit(None, 1)[-1] + return ":" in tail and all(c in "0123456789:" for c in tail) def redact(text: str, work: Path) -> str: