From 24359f5587a84958e40b260a1d7e4d75a15bbd96 Mon Sep 17 00:00:00 2001 From: Webber Wei Date: Thu, 8 Oct 2026 23:19:10 +0800 Subject: [PATCH 1/3] fix(ci): clear RUSTSEC vulns blocking Daily Maintenance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bump vulnerable crates so cargo audit reports 0 vulnerabilities: - rustls 0.23.40→0.23.45 - quinn-proto 0.11.14→0.11.19 - wasmtime/wasmtime-wasi 16.0→36.0.17 (port wasm_loader to preview1 API) - anyhow 1.0.102→1.0.104, event-listener 5.4.1→5.4.2 A follow-up (or same PR via workflow-scoped token) is needed for the Daily Maintenance step logic that greps the JSON key name and fails on cargo audit's non-zero exit even when reporting to the summary. --- Cargo.lock | 1029 +++++++++++------------ crates/hakimi-plugin/Cargo.toml | 4 +- crates/hakimi-plugin/src/wasm_loader.rs | 40 +- 3 files changed, 528 insertions(+), 545 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4728daf..bcc5678 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 4 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" dependencies = [ "gimli", ] @@ -25,19 +25,7 @@ checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ "cfg-if", "cipher", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.8.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", + "cpufeatures 0.2.17", ] [[package]] @@ -137,18 +125,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" - -[[package]] -name = "ar_archive_writer" -version = "0.5.2" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4087686b4b0a3427190bae57a1d9a478dbb2d40c5dc1bd6e2b6d797913bdd348" -dependencies = [ - "object 0.37.3", -] +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "arbitrary" @@ -406,15 +385,6 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bit-set" version = "0.8.0" @@ -511,6 +481,9 @@ name = "bumpalo" version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +dependencies = [ + "allocator-api2", +] [[package]] name = "bytecount" @@ -594,33 +567,33 @@ dependencies = [ [[package]] name = "cap-fs-ext" -version = "2.0.2" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e2fd9e6c6c0777d8f9f3eea6a2f5f9af2f1ba1fc6ce850ef3e2ee9c802d230" +checksum = "476f0d0003a760918ed4b1e039a59e11769030416f79c8222551d22785f7f70d" dependencies = [ "cap-primitives", "cap-std", "io-lifetimes", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "cap-net-ext" -version = "2.0.2" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c16c22d3d7fa26550c19a4fcc17aa372c210bc2b3fde12eb592485c46b7475" +checksum = "150941cefd3df4de2fea24604ba4949371576f62e527410298333f7d431a1bc6" dependencies = [ "cap-primitives", "cap-std", - "rustix 0.38.44", + "rustix 1.1.4", "smallvec", ] [[package]] name = "cap-primitives" -version = "2.0.2" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bfd51e9768cfbd52a219b2c173aac03d073a57f43e8fecb8693a144fe960e24" +checksum = "8e0bf07d379916947be6c4a07f43684153d710a2896c31f9e97781362895596c" dependencies = [ "ambient-authority", "fs-set-times", @@ -628,16 +601,17 @@ dependencies = [ "io-lifetimes", "ipnet", "maybe-owned", - "rustix 0.38.44", - "windows-sys 0.52.0", + "rustix 1.1.4", + "rustix-linux-procfs", + "windows-sys 0.59.0", "winx", ] [[package]] name = "cap-rand" -version = "2.0.2" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce977bea95e49cc352bf8253719d872d27486e56f91b5491e20a827ab2c1a16" +checksum = "6ec6a5b75f54547c579a6b117c6fdd5f04f4ab7598de747b9f440a53592b3a4a" dependencies = [ "ambient-authority", "rand 0.8.6", @@ -645,27 +619,27 @@ dependencies = [ [[package]] name = "cap-std" -version = "2.0.2" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03bce72d0a6856cd9079c9a4e3bba64ac40f5216bd49bc5fa8565fbe0ca6ad47" +checksum = "a59e59fa26472d29680ece6a9f8ee8b0551a719a33df2f5240bde065ecbddfd7" dependencies = [ "cap-primitives", "io-extras", "io-lifetimes", - "rustix 0.38.44", + "rustix 1.1.4", ] [[package]] name = "cap-time-ext" -version = "2.0.2" +version = "3.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cf94bd0ddce5f53c5b6e132cacdf43fa3386df2b45ffb9808e913dca02afe9d" +checksum = "b54c289326c70f1c697ebf0a31842a480932e5942b5fac92fcc46e87286b48e2" dependencies = [ "ambient-authority", "cap-primitives", "iana-time-zone", "once_cell", - "rustix 0.38.44", + "rustix 1.1.4", "winx", ] @@ -753,7 +727,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ "smallvec", - "target-lexicon", + "target-lexicon 0.12.16", ] [[package]] @@ -768,6 +742,17 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c35e4b699c7e15ccbe7ee35c005e4fc0a278d22238a2857e6ce2dadeda1b06" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.1", + "rand_core 0.10.1", +] + [[package]] name = "chromiumoxide" version = "0.7.0" @@ -898,6 +883,15 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" +[[package]] +name = "cobs" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" +dependencies = [ + "thiserror 2.0.18", +] + [[package]] name = "colorchoice" version = "1.0.5" @@ -1018,9 +1012,9 @@ dependencies = [ [[package]] name = "cpp_demangle" -version = "0.3.5" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeaa953eaad386a53111e47172c2fedba671e5684c8dd601a5f474f4f118710f" +checksum = "f2bb79cb74d735044c972aae58ed0aaa9a837e85b01106a54c39e42e97f62253" dependencies = [ "cfg-if", ] @@ -1034,114 +1028,152 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca28b0ae3115b884660db4118d803791fd6756b6e88f39c0f3f7859060d7566" +dependencies = [ + "libc", +] + +[[package]] +name = "cranelift-assembler-x64" +version = "0.123.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63a1c29e9acecf199b3d35d5eb1f485f4884e45f1d942cac80649234f6dad84c" +dependencies = [ + "cranelift-assembler-x64-meta", +] + +[[package]] +name = "cranelift-assembler-x64-meta" +version = "0.123.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eacdef982b80185c42ca238c54c61aaf69ba9aef98d70d8fd35068f2dd3b5a51" +dependencies = [ + "cranelift-srcgen", +] + [[package]] name = "cranelift-bforest" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c22542c0b95bd3302f7ed6839869c561f2324bac2fd5e7e99f5cfa65fdc8b92" +checksum = "fc2f135a32d00fd43a02466a4ddc835216186fbf996f4ee5b15499f16f00d0f9" dependencies = [ "cranelift-entity", ] +[[package]] +name = "cranelift-bitset" +version = "0.123.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4a598c0713d478a877d1e76b62ab794fad44d2207fe4a86c28e3af985fde202" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "cranelift-codegen" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3db903ef2e9c8a4de2ea6db5db052c7857282952f9df604aa55d169e6000d8" +checksum = "4fed4597494992a209a699c80bb7627f99b80bfc9d9ad7a4ab60c7f22dac9fb6" dependencies = [ "bumpalo", + "cranelift-assembler-x64", "cranelift-bforest", + "cranelift-bitset", "cranelift-codegen-meta", "cranelift-codegen-shared", "cranelift-control", "cranelift-entity", "cranelift-isle", "gimli", - "hashbrown 0.14.5", + "hashbrown 0.15.5", "log", + "pulley-interpreter", "regalloc2", + "rustc-hash", + "serde", "smallvec", - "target-lexicon", + "target-lexicon 0.13.5", + "wasmtime-internal-math", ] [[package]] name = "cranelift-codegen-meta" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6590feb5a1d6438f974bf6a5ac4dddf69fca14e1f07f3265d880f69e61a94463" +checksum = "85fad432ca0daf333f78b0947f8ccfcf64ad197acec6eccd5cfacb27e519a2b2" dependencies = [ + "cranelift-assembler-x64-meta", "cranelift-codegen-shared", + "cranelift-srcgen", + "heck 0.5.0", + "pulley-interpreter", ] [[package]] name = "cranelift-codegen-shared" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7239038c56fafe77fddc8788fc8533dd6c474dc5bdc5637216404f41ba807330" +checksum = "cef0917e59c255d478e6d1a45caef3fc696415ebf89a6178bdab61d486926511" [[package]] name = "cranelift-control" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7dc9c595341404d381d27a3d950160856b35b402275f0c3990cd1ad683c8053" +checksum = "64c52305d3ba73f42d7351c0d550d2c68e07b4642f06d3e58fef28b575d67cc5" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e3ee532fc4776c69bcedf7e62f9632cbb3f35776fa9a525cdade3195baa3f7" +checksum = "3899c92d0aca3922df21dea6d4b7e112c900a83b7e78ff56931541c92b640946" dependencies = [ + "cranelift-bitset", "serde", "serde_derive", ] [[package]] name = "cranelift-frontend" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a612c94d09e653662ec37681dc2d6fd2b9856e6df7147be0afc9aabb0abf19df" +checksum = "d4bda41bb65ba9c05f4782cd9878df5d3bb0901c040716a6f09258acbed375c5" dependencies = [ "cranelift-codegen", "log", "smallvec", - "target-lexicon", + "target-lexicon 0.13.5", ] [[package]] name = "cranelift-isle" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85db9830abeb1170b7d29b536ffd55af1d4d26ac8a77570b5d1aca003bf225cc" +checksum = "2319cb332b35da0fd1d39b27e746bd60b5224ecae260e393c9ef168f78d10053" [[package]] name = "cranelift-native" -version = "0.103.0" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301ef0edafeaeda5771a5d2db64ac53e1818ae3111220a185677025fe91db4a1" +checksum = "32569f4b85d0e1ba9e57cd4b7d91a739f6f960b43d041ec9a8aff949edda77bf" dependencies = [ "cranelift-codegen", "libc", - "target-lexicon", + "target-lexicon 0.13.5", ] [[package]] -name = "cranelift-wasm" -version = "0.103.0" +name = "cranelift-srcgen" +version = "0.123.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380f0abe8264e4570ac615fc31cef32a3b90a77f7eb97b08331f9dd357b1f500" -dependencies = [ - "cranelift-codegen", - "cranelift-entity", - "cranelift-frontend", - "itertools 0.10.5", - "log", - "smallvec", - "wasmparser 0.118.2", - "wasmtime-types", -] +checksum = "e89acb09bcb45f1f6fe69b4c5d5e45d9c5a8944a5882acbf9757b1ec5b6a8f94" [[package]] name = "crc" @@ -1441,15 +1473,6 @@ dependencies = [ "dirs-sys-next", ] -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys 0.3.7", -] - [[package]] name = "dirs" version = "5.0.1" @@ -1468,17 +1491,6 @@ dependencies = [ "dirs-sys 0.5.0", ] -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users 0.4.6", - "winapi", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -1674,6 +1686,18 @@ version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7" +[[package]] +name = "embedded-io" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" + +[[package]] +name = "embedded-io" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" + [[package]] name = "encode_unicode" version = "1.0.0" @@ -1745,11 +1769,10 @@ dependencies = [ [[package]] name = "event-listener" -version = "5.4.1" +version = "5.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" dependencies = [ - "concurrent-queue", "parking", "pin-project-lite", ] @@ -2230,17 +2253,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", "wasip2", "wasip3", + "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.28.1" +version = "0.32.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" dependencies = [ "fallible-iterator", "indexmap 2.14.0", @@ -2309,7 +2335,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc" dependencies = [ "heck 0.4.1", - "proc-macro-crate 2.0.2", + "proc-macro-crate 2.0.0", "proc-macro-error", "proc-macro2", "quote", @@ -2944,24 +2970,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -2971,6 +2979,7 @@ dependencies = [ "allocator-api2", "equivalent", "foldhash 0.1.5", + "serde", ] [[package]] @@ -3455,18 +3464,18 @@ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" -version = "0.10.5" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] [[package]] name = "itertools" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] @@ -3744,6 +3753,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" + [[package]] name = "libredox" version = "0.1.16" @@ -3840,10 +3855,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] -name = "mach" -version = "0.3.2" +name = "mach2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" +checksum = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44" dependencies = [ "libc", ] @@ -4305,24 +4320,15 @@ dependencies = [ "objc2-foundation", ] -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "crc32fast", - "hashbrown 0.14.5", - "indexmap 2.14.0", - "memchr", -] - [[package]] name = "object" version = "0.37.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ + "crc32fast", + "hashbrown 0.15.5", + "indexmap 2.14.0", "memchr", ] @@ -4677,6 +4683,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "postcard" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" +dependencies = [ + "cobs", + "embedded-io 0.4.0", + "embedded-io 0.6.1", + "serde", +] + [[package]] name = "potential_utf" version = "0.1.5" @@ -4729,11 +4747,10 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "2.0.2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" +checksum = "7e8366a6159044a37876a2b9817124296703c586a5c92e2c53751fa06d8d43e8" dependencies = [ - "toml_datetime 0.6.3", "toml_edit 0.20.2", ] @@ -4780,13 +4797,26 @@ dependencies = [ ] [[package]] -name = "psm" -version = "0.1.31" +name = "pulley-interpreter" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645dbe486e346d9b5de3ef16ede18c26e6c70ad97418f4874b8b1889d6e761ea" +checksum = "818d286c25f82cd1e459d3c5e4481751e2b1ca54beb8fc021271845744a5828a" dependencies = [ - "ar_archive_writer", - "cc", + "cranelift-bitset", + "log", + "pulley-macros", + "wasmtime-internal-math", +] + +[[package]] +name = "pulley-macros" +version = "36.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f08af4285be8261f18704e2d6d22df5174d250f4d79a550ad345139f3f5787e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] @@ -4830,7 +4860,7 @@ dependencies = [ "pin-project-lite", "quinn-proto", "quinn-udp", - "rustc-hash 2.1.2", + "rustc-hash", "rustls", "socket2", "thiserror 2.0.18", @@ -4841,16 +4871,17 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.14" +version = "0.11.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "434b42fec591c96ef50e21e886936e66d3cc3f737104fdb9b737c40ffb94c098" +checksum = "0e750cca55fe4f0439a15d0bb529da9651e79993e8e72c61a899a36d462befbe" dependencies = [ "bytes", - "getrandom 0.3.4", + "getrandom 0.4.2", "lru-slab", - "rand 0.9.4", + "rand 0.10.3", + "rand_pcg", "ring", - "rustc-hash 2.1.2", + "rustc-hash", "rustls", "rustls-pki-types", "slab", @@ -4922,6 +4953,17 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65c9fb96cbc91e3478eaae79a69fcd3f1ae4ad052e471fe6732fff548984b4af" +dependencies = [ + "chacha20", + "getrandom 0.4.2", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -4960,6 +5002,21 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + +[[package]] +name = "rand_pcg" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caa0f4137e1c0a72f4c651489402276c8e8e1cf081f3b0ba156d2cbeef09e86a" +dependencies = [ + "rand_core 0.10.1", +] + [[package]] name = "ratatui" version = "0.29.0" @@ -5060,14 +5117,15 @@ dependencies = [ [[package]] name = "regalloc2" -version = "0.9.3" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad156d539c879b7a24a363a2016d77961786e71f48f2e2fc8302a92abd2429a6" +checksum = "5216b1837de2149f8bc8e6d5f88a9326b63b8c836ed58ce4a0a29ec736a59734" dependencies = [ - "hashbrown 0.13.2", + "allocator-api2", + "bumpalo", + "hashbrown 0.15.5", "log", - "rustc-hash 1.1.0", - "slice-group-by", + "rustc-hash", "smallvec", ] @@ -5211,12 +5269,6 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b74b56ffa8bb2830709a538c2cbcae9aa062db0d2a42563bfb09bdaae44020eb" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[package]] name = "rustc-hash" version = "2.1.2" @@ -5240,10 +5292,8 @@ checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags 2.11.1", "errno", - "itoa", "libc", "linux-raw-sys 0.4.15", - "once_cell", "windows-sys 0.59.0", ] @@ -5260,11 +5310,21 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "rustix-linux-procfs" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fc84bf7e9aa16c4f2c758f27412dc9841341e16aa682d9c7ac308fe3ee12056" +dependencies = [ + "once_cell", + "rustix 1.1.4", +] + [[package]] name = "rustls" -version = "0.23.40" +version = "0.23.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef86cd5876211988985292b91c96a8f2d298df24e75989a43a3c73f2d4d8168b" +checksum = "0d41d731c7d2f962d1ccc364cec258de3c0e93b38c2fb3ba97ac74513048d634" dependencies = [ "log", "once_cell", @@ -5321,9 +5381,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" dependencies = [ "ring", "rustls-pki-types", @@ -5501,7 +5561,7 @@ dependencies = [ "phf 0.13.1", "phf_codegen 0.13.1", "precomputed-hash", - "rustc-hash 2.1.2", + "rustc-hash", "servo_arc", "smallvec", ] @@ -5717,7 +5777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -5728,7 +5788,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -5747,15 +5807,6 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77" -[[package]] -name = "shellexpand" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ccc8076840c4da029af4f87e4e8daeb0fca6b87bbb02e10cb60b791450e11e4" -dependencies = [ - "dirs 4.0.0", -] - [[package]] name = "shlex" version = "1.3.0" @@ -5811,17 +5862,14 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" -[[package]] -name = "slice-group-by" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7" - [[package]] name = "smallvec" version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -5881,12 +5929,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "sptr" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" - [[package]] name = "stable_deref_trait" version = "1.2.1" @@ -6055,15 +6097,15 @@ dependencies = [ "cfg-expr", "heck 0.5.0", "pkg-config", - "toml 0.8.2", + "toml 0.8.23", "version-compare", ] [[package]] name = "system-interface" -version = "0.26.1" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0682e006dd35771e392a6623ac180999a9a854b1d4a6c12fb2e804941c2b1f58" +checksum = "cc4592f674ce18521c2a81483873a49596655b179f71c5e05d10c1fe66c78745" dependencies = [ "bitflags 2.11.1", "cap-fs-ext", @@ -6071,7 +6113,7 @@ dependencies = [ "fd-lock", "io-lifetimes", "rustix 0.38.44", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winx", ] @@ -6167,6 +6209,12 @@ version = "0.12.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" +[[package]] +name = "target-lexicon" +version = "0.13.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca" + [[package]] name = "tauri" version = "2.11.5" @@ -6451,6 +6499,15 @@ dependencies = [ "new_debug_unreachable", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -6675,23 +6732,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml" -version = "0.8.2" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned 0.6.9", - "toml_datetime 0.6.3", - "toml_edit 0.20.2", + "toml_datetime 0.6.11", + "toml_edit 0.22.27", ] [[package]] @@ -6726,9 +6774,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] @@ -6758,7 +6806,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.14.0", - "toml_datetime 0.6.3", + "toml_datetime 0.6.11", "winnow 0.5.40", ] @@ -6767,12 +6815,24 @@ name = "toml_edit" version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +dependencies = [ + "indexmap 2.14.0", + "toml_datetime 0.6.11", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap 2.14.0", "serde", "serde_spanned 0.6.9", - "toml_datetime 0.6.3", - "winnow 0.5.40", + "toml_datetime 0.6.11", + "toml_write", + "winnow 0.7.15", ] [[package]] @@ -6796,6 +6856,12 @@ dependencies = [ "winnow 1.0.4", ] +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "toml_writer" version = "1.1.2+spec-1.1.0" @@ -7269,49 +7335,6 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi-cap-std-sync" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "154528979a211aa28d969846e883df75705809ed9bcc70aba61460683ea7355b" -dependencies = [ - "anyhow", - "async-trait", - "cap-fs-ext", - "cap-rand", - "cap-std", - "cap-time-ext", - "fs-set-times", - "io-extras", - "io-lifetimes", - "once_cell", - "rustix 0.38.44", - "system-interface", - "tracing", - "wasi-common", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasi-common" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d888b611fee7d273dd057dc009d2dd3132736f36710ffd65657ac83628d1e3b" -dependencies = [ - "anyhow", - "bitflags 2.11.1", - "cap-rand", - "cap-std", - "io-extras", - "log", - "rustix 0.38.44", - "thiserror 1.0.69", - "tracing", - "wasmtime", - "wiggle", - "windows-sys 0.48.0", -] - [[package]] name = "wasip2" version = "1.0.3+wasi-0.2.9" @@ -7387,11 +7410,12 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.38.1" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad2b51884de9c7f4fe2fd1043fccb8dcad4b1e29558146ee57a144d15779f3f" +checksum = "724fccfd4f3c24b7e589d333fc0429c68042897a7e8a5f8694f31792471841e7" dependencies = [ - "leb128", + "leb128fmt", + "wasmparser 0.236.1", ] [[package]] @@ -7454,23 +7478,15 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.118.2" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77f1154f1ab868e2a01d9834a805faca7bf8b50d041b4ca714d005d0dab1c50c" -dependencies = [ - "indexmap 2.14.0", - "semver", -] - -[[package]] -name = "wasmparser" -version = "0.121.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dbe55c8f9d0dbd25d9447a5a889ff90c0cc3feaa7395310d3d826b2c703eaab" +checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7" dependencies = [ "bitflags 2.11.1", + "hashbrown 0.15.5", "indexmap 2.14.0", "semver", + "serde", ] [[package]] @@ -7498,108 +7514,152 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.2.80" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e73986a6b7fdfedb7c5bf9e7eb71135486507c8fbc4c0c42cffcb6532988b7" +checksum = "2df225df06a6df15b46e3f73ca066ff92c2e023670969f7d50ce7d5e695abbb1" dependencies = [ "anyhow", - "wasmparser 0.121.2", + "termcolor", + "wasmparser 0.236.1", ] [[package]] name = "wasmtime" -version = "16.0.0" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8e539fded2495422ea3c4dfa7beeddba45904eece182cf315294009e1a323bf" +checksum = "0707f327a5821aa76c254fa661bd582d6e209c3176b6cca1d87484b2338d2dbb" dependencies = [ + "addr2line", "anyhow", "async-trait", - "bincode", + "bitflags 2.11.1", "bumpalo", + "cc", "cfg-if", "encoding_rs", "fxprof-processed-profile", + "gimli", + "hashbrown 0.15.5", "indexmap 2.14.0", + "ittapi", "libc", "log", - "object 0.32.2", + "mach2", + "memfd", + "object", "once_cell", - "paste", + "postcard", + "pulley-interpreter", "rayon", + "rustix 1.1.4", + "semver", "serde", "serde_derive", "serde_json", - "target-lexicon", - "wasm-encoder 0.38.1", - "wasmparser 0.118.2", - "wasmtime-cache", - "wasmtime-component-macro", - "wasmtime-component-util", - "wasmtime-cranelift", + "smallvec", + "target-lexicon 0.13.5", + "wasm-encoder 0.236.1", + "wasmparser 0.236.1", "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit", - "wasmtime-runtime", - "wasmtime-winch", + "wasmtime-internal-asm-macros", + "wasmtime-internal-cache", + "wasmtime-internal-component-macro", + "wasmtime-internal-component-util", + "wasmtime-internal-cranelift", + "wasmtime-internal-fiber", + "wasmtime-internal-jit-debug", + "wasmtime-internal-jit-icache-coherence", + "wasmtime-internal-math", + "wasmtime-internal-slab", + "wasmtime-internal-unwinder", + "wasmtime-internal-versioned-export-macros", + "wasmtime-internal-winch", "wat", - "windows-sys 0.48.0", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-asm-macros" -version = "16.0.0" +name = "wasmtime-environ" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "660ba9143e15a2acd921820df221b73aee256bd3ca2d208d73d8adc9587ccbb9" +checksum = "507ec711cc5dfd8abe701e24e83b47f9d3f750de8e1f0b1e756ee7d92bf7f5b3" +dependencies = [ + "anyhow", + "cpp_demangle", + "cranelift-bitset", + "cranelift-entity", + "gimli", + "indexmap 2.14.0", + "log", + "object", + "postcard", + "rustc-demangle", + "semver", + "serde", + "serde_derive", + "smallvec", + "target-lexicon 0.13.5", + "wasm-encoder 0.236.1", + "wasmparser 0.236.1", + "wasmprinter", + "wasmtime-internal-component-util", +] + +[[package]] +name = "wasmtime-internal-asm-macros" +version = "36.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbece40076808c22c752c2d84a662bafc95b533ca221f9843f286aa8fa610ffa" dependencies = [ "cfg-if", ] [[package]] -name = "wasmtime-cache" -version = "16.0.0" +name = "wasmtime-internal-cache" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3ce373743892002f9391c6741ef0cb0335b55ec899d874f311222b7e36f4594" +checksum = "d4f18f22e3bb40b06b5a5c4477524481fad05c064057c3fb757f5b751e370f4d" dependencies = [ "anyhow", - "base64 0.21.7", - "bincode", + "base64 0.22.1", "directories-next", "log", - "rustix 0.38.44", + "postcard", + "rustix 1.1.4", "serde", "serde_derive", "sha2", - "toml 0.5.11", - "windows-sys 0.48.0", - "zstd 0.11.2+zstd.1.5.2", + "toml 0.8.23", + "windows-sys 0.60.2", + "zstd", ] [[package]] -name = "wasmtime-component-macro" -version = "16.0.0" +name = "wasmtime-internal-component-macro" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12ef32643324e564e1c359e9044daa06cbf90d7e2d6c99a738d17a12959f01a5" +checksum = "58a583042faa9a8eff244df16b0aaefe536a667aa7b77a0b335fb2cd7811945b" dependencies = [ "anyhow", "proc-macro2", "quote", "syn 2.0.117", - "wasmtime-component-util", - "wasmtime-wit-bindgen", - "wit-parser 0.13.2", + "wasmtime-internal-component-util", + "wasmtime-internal-wit-bindgen", + "wit-parser 0.236.1", ] [[package]] -name = "wasmtime-component-util" -version = "16.0.0" +name = "wasmtime-internal-component-util" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c87d06c18d21a4818f354c00a85f4ebc62b2270961cd022968452b0e4dbed9d" +checksum = "fe9c293b9fdd2bfc3f0b0c86d5b47f433290cb2d8ba163725d5d3a22dc9d0482" [[package]] -name = "wasmtime-cranelift" -version = "16.0.0" +name = "wasmtime-internal-cranelift" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d648c8b4064a7911093b02237cd5569f71ca171d3a0a486bf80600b19e1cba2" +checksum = "a04aa5a123ad96e88ac5522afa3b27012338755f1d589f628e2d7a509181a9b2" dependencies = [ "anyhow", "cfg-if", @@ -7608,181 +7668,134 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-native", - "cranelift-wasm", "gimli", + "itertools 0.14.0", "log", - "object 0.32.2", - "target-lexicon", - "thiserror 1.0.69", - "wasmparser 0.118.2", - "wasmtime-cranelift-shared", + "object", + "pulley-interpreter", + "smallvec", + "target-lexicon 0.13.5", + "thiserror 2.0.18", + "wasmparser 0.236.1", "wasmtime-environ", - "wasmtime-versioned-export-macros", + "wasmtime-internal-math", + "wasmtime-internal-versioned-export-macros", ] [[package]] -name = "wasmtime-cranelift-shared" -version = "16.0.0" +name = "wasmtime-internal-fiber" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290a89027688782da8ff60b12bb95695494b1874e0d0ba2ba387d23dace6d70c" +checksum = "821e764d43c160cf0989c55d63245856164bac8a09d345d2a0e9402fba68a3e5" dependencies = [ "anyhow", - "cranelift-codegen", - "cranelift-control", - "cranelift-native", - "gimli", - "object 0.32.2", - "target-lexicon", - "wasmtime-environ", + "cc", + "cfg-if", + "libc", + "rustix 1.1.4", + "wasmtime-internal-asm-macros", + "wasmtime-internal-versioned-export-macros", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-environ" -version = "16.0.0" +name = "wasmtime-internal-jit-debug" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61eb64fb3e0da883e2df4a13a81d6282e072336e6cb6295021d0f7ab2e352754" +checksum = "b254d438db151a17ead4af0bfce573d7e5d914e6a09a9aad5656118069962f1e" dependencies = [ - "anyhow", - "cranelift-entity", - "gimli", - "indexmap 2.14.0", - "log", - "object 0.32.2", - "serde", - "serde_derive", - "target-lexicon", - "thiserror 1.0.69", - "wasm-encoder 0.38.1", - "wasmparser 0.118.2", - "wasmprinter", - "wasmtime-component-util", - "wasmtime-types", + "cc", + "object", + "rustix 1.1.4", + "wasmtime-internal-versioned-export-macros", ] [[package]] -name = "wasmtime-fiber" -version = "16.0.0" +name = "wasmtime-internal-jit-icache-coherence" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecf1d3a838b0956b71ad3f8cb80069a228339775bf02dd35d86a5a68bbe443" +checksum = "4dfd0235391231863be126ac8c5ba090f40edd0a180b1efdf2726db779b73b47" dependencies = [ "anyhow", - "cc", "cfg-if", - "rustix 0.38.44", - "wasmtime-asm-macros", - "wasmtime-versioned-export-macros", - "windows-sys 0.48.0", + "libc", + "windows-sys 0.60.2", ] [[package]] -name = "wasmtime-jit" -version = "16.0.0" +name = "wasmtime-internal-math" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f485336add49267d8859e8f8084d2d4b9a4b1564496b6f30ba5b168d50c10ceb" +checksum = "de8ec43fe6dc7791284839da3f90d60dd786b15accd4c81ca266c6b47eb9889b" dependencies = [ - "addr2line", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli", - "ittapi", - "log", - "object 0.32.2", - "rustc-demangle", - "rustix 0.38.44", - "serde", - "serde_derive", - "target-lexicon", - "wasmtime-environ", - "wasmtime-jit-debug", - "wasmtime-jit-icache-coherence", - "wasmtime-runtime", - "windows-sys 0.48.0", + "libm", ] [[package]] -name = "wasmtime-jit-debug" -version = "16.0.0" +name = "wasmtime-internal-slab" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e119affec40edb2fab9044f188759a00c2df9c3017278d047012a2de1efb4f" -dependencies = [ - "object 0.32.2", - "once_cell", - "rustix 0.38.44", - "wasmtime-versioned-export-macros", -] +checksum = "37364facf71c53d353d56dea526c673944fb717b3855f78e4719300c236fc9ba" [[package]] -name = "wasmtime-jit-icache-coherence" -version = "16.0.0" +name = "wasmtime-internal-unwinder" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b6d197fcc34ad32ed440e1f9552fd57d1f377d9699d31dee1b5b457322c1f8a" +checksum = "73f2bd3b57e612324beb282419fb7acc6eecab344aacb3008df02d5b95563e70" dependencies = [ + "anyhow", "cfg-if", - "libc", - "windows-sys 0.48.0", + "cranelift-codegen", + "log", + "object", ] [[package]] -name = "wasmtime-runtime" -version = "16.0.0" +name = "wasmtime-internal-versioned-export-macros" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "794b2bb19b99ef8322ff0dd9fe1ba7e19c41036dfb260b3f99ecce128c42ff92" +checksum = "a02767c4f7542de2d03c22ffcd7b3c31f3ae9008eee00e3e360716a2b0e7d4db" dependencies = [ - "anyhow", - "cc", - "cfg-if", - "encoding_rs", - "indexmap 2.14.0", - "libc", - "log", - "mach", - "memfd", - "memoffset", - "paste", - "psm", - "rustix 0.38.44", - "sptr", - "wasm-encoder 0.38.1", - "wasmtime-asm-macros", - "wasmtime-environ", - "wasmtime-fiber", - "wasmtime-jit-debug", - "wasmtime-versioned-export-macros", - "wasmtime-wmemcheck", - "windows-sys 0.48.0", + "proc-macro2", + "quote", + "syn 2.0.117", ] [[package]] -name = "wasmtime-types" -version = "16.0.0" +name = "wasmtime-internal-winch" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d995db8bb56f2cd8d2dc0ed5ffab94ffb435283b0fe6747f80f7aab40b2d06a1" +checksum = "55f1ac82513b94889c337d33818f9a712baa1acc37cb1271eca821bc81a174c0" dependencies = [ - "cranelift-entity", - "serde", - "serde_derive", - "thiserror 1.0.69", - "wasmparser 0.118.2", + "anyhow", + "cranelift-codegen", + "gimli", + "object", + "target-lexicon 0.13.5", + "wasmparser 0.236.1", + "wasmtime-environ", + "wasmtime-internal-cranelift", + "winch-codegen", ] [[package]] -name = "wasmtime-versioned-export-macros" -version = "16.0.0" +name = "wasmtime-internal-wit-bindgen" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c5565959287c21dd0f4277ae3518dd2ae62679f655ee2dbc4396e19d210db" +checksum = "7efd9fdb552b818ff9f81b4cc4c03a4d8a7454c168949e546a1d59416b57998d" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", + "anyhow", + "bitflags 2.11.1", + "heck 0.5.0", + "indexmap 2.14.0", + "wit-parser 0.236.1", ] [[package]] name = "wasmtime-wasi" -version = "16.0.0" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd8370078149d49a3a47e93741553fd79b700421464b6a27ca32718192ab130" +checksum = "76a1f97dca4c475ddc6fc397808ae4d8ca275f34dfa344ccf965ff5caed5b0d4" dependencies = [ "anyhow", "async-trait", @@ -7797,57 +7810,33 @@ dependencies = [ "futures", "io-extras", "io-lifetimes", - "libc", - "log", - "once_cell", - "rustix 0.38.44", + "rustix 1.1.4", + "rustix-linux-procfs", "system-interface", - "thiserror 1.0.69", + "thiserror 2.0.18", "tokio", "tracing", "url", - "wasi-cap-std-sync", - "wasi-common", "wasmtime", + "wasmtime-wasi-io", "wiggle", - "windows-sys 0.48.0", -] - -[[package]] -name = "wasmtime-winch" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c6f945ff9bad96e0a69973d74f193c19f627c8adbf250e7cb73ae7564b6cc8a" -dependencies = [ - "anyhow", - "cranelift-codegen", - "gimli", - "object 0.32.2", - "target-lexicon", - "wasmparser 0.118.2", - "wasmtime-cranelift-shared", - "wasmtime-environ", - "winch-codegen", + "windows-sys 0.60.2", + "winx", ] [[package]] -name = "wasmtime-wit-bindgen" -version = "16.0.0" +name = "wasmtime-wasi-io" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f328b2d4a690270324756e886ed5be3a4da4c00be0eea48253f4595ad068062b" +checksum = "8680fbbdaee331ae1fbbe290f067419c487dc7769b755b165e1a94c4fe70b690" dependencies = [ "anyhow", - "heck 0.4.1", - "indexmap 2.14.0", - "wit-parser 0.13.2", + "async-trait", + "bytes", + "futures", + "wasmtime", ] -[[package]] -name = "wasmtime-wmemcheck" -version = "16.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67761d8f8c0b3c13a5d34356274b10a40baba67fe9cfabbfc379a8b414e45de2" - [[package]] name = "wast" version = "35.0.2" @@ -8014,14 +8003,14 @@ dependencies = [ [[package]] name = "wiggle" -version = "16.0.0" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0afb26cd3269289bb314a361ff0a6685e5ce793b62181a9fe3f81ace15051697" +checksum = "f7dfd80af8f40b70e9dda694f911f7303cec22c140ca58c5f7dab7fb34be812f" dependencies = [ "anyhow", "async-trait", "bitflags 2.11.1", - "thiserror 1.0.69", + "thiserror 2.0.18", "tracing", "wasmtime", "wiggle-macro", @@ -8029,24 +8018,23 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "16.0.0" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cef2868fed7584d2b552fa317104858ded80021d23b073b2d682d3c932a027bd" +checksum = "50d31b1cae37b6dee518e8374ccdee731bf67e3041d3b50f592093ab69c2fb16" dependencies = [ "anyhow", - "heck 0.4.1", + "heck 0.5.0", "proc-macro2", "quote", - "shellexpand", "syn 2.0.117", "witx", ] [[package]] name = "wiggle-macro" -version = "16.0.0" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31ae1ec11a17ea481539ee9a5719a278c9790d974060fbf71db4b2c05378780b" +checksum = "859d73197d6c88c07a081544c4e8c27850133b7358a5b6c8a77127e40f41957f" dependencies = [ "proc-macro2", "quote", @@ -8087,18 +8075,22 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.14.0" +version = "36.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e58c236a6abdd9ab454552b4f29e16cfa837a86897c1503313b2e62e7609ec" +checksum = "e730e5bdbaaaf5c7a97960928c0f0e9963fe509bdae3a6c4c60a2526de326a16" dependencies = [ "anyhow", + "cranelift-assembler-x64", "cranelift-codegen", "gimli", "regalloc2", "smallvec", - "target-lexicon", - "wasmparser 0.118.2", + "target-lexicon 0.13.5", + "thiserror 2.0.18", + "wasmparser 0.236.1", "wasmtime-environ", + "wasmtime-internal-cranelift", + "wasmtime-internal-math", ] [[package]] @@ -8584,6 +8576,9 @@ name = "winnow" version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945" +dependencies = [ + "memchr", +] [[package]] name = "winnow" @@ -8708,9 +8703,9 @@ dependencies = [ [[package]] name = "wit-parser" -version = "0.13.2" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "316b36a9f0005f5aa4b03c39bc3728d045df136f8c13a73b7db4510dec725e08" +checksum = "16e4833a20cd6e85d6abfea0e63a399472d6f88c6262957c17f546879a80ba15" dependencies = [ "anyhow", "id-arena", @@ -8721,6 +8716,7 @@ dependencies = [ "serde_derive", "serde_json", "unicode-xid", + "wasmparser 0.236.1", ] [[package]] @@ -9048,7 +9044,7 @@ dependencies = [ "xz2", "zeroize", "zopfli", - "zstd 0.13.3", + "zstd", ] [[package]] @@ -9069,32 +9065,13 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - [[package]] name = "zstd" version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e91ee311a569c327171651566e07972200e76fcfe2242a4fa446149a3881c08a" dependencies = [ - "zstd-safe 7.2.4", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", + "zstd-safe", ] [[package]] diff --git a/crates/hakimi-plugin/Cargo.toml b/crates/hakimi-plugin/Cargo.toml index 022fbfc..8c20d2e 100644 --- a/crates/hakimi-plugin/Cargo.toml +++ b/crates/hakimi-plugin/Cargo.toml @@ -30,8 +30,8 @@ anyhow = "1.0" chrono = "0.4" # WASM runtime (optional feature) -wasmtime = { version = "16.0", optional = true } -wasmtime-wasi = { version = "16.0", optional = true } +wasmtime = { version = "36.0.17", optional = true } +wasmtime-wasi = { version = "36.0.17", optional = true } [dev-dependencies] tokio-test = "0.4" diff --git a/crates/hakimi-plugin/src/wasm_loader.rs b/crates/hakimi-plugin/src/wasm_loader.rs index aff4641..3a64e7f 100644 --- a/crates/hakimi-plugin/src/wasm_loader.rs +++ b/crates/hakimi-plugin/src/wasm_loader.rs @@ -8,7 +8,8 @@ use std::path::Path; use std::sync::Arc; use tokio::sync::RwLock; use wasmtime::*; -use wasmtime_wasi::{WasiCtx, WasiCtxBuilder}; +use wasmtime_wasi::preview1::{self, WasiP1Ctx}; +use wasmtime_wasi::{DirPerms, FilePerms, WasiCtxBuilder}; /// WASM 插件沙箱配置 #[derive(Debug, Clone)] @@ -43,7 +44,7 @@ impl Default for WasmSandboxConfig { /// WASM 插件实例存储状态 struct WasmState { - wasi: WasiCtx, + wasi: WasiP1Ctx, max_memory: usize, } @@ -124,7 +125,7 @@ impl WasmPluginLoader { // 创建链接器并添加 WASI 导入 let mut linker = Linker::new(&self.engine); - wasmtime_wasi::add_to_linker(&mut linker, |s: &mut WasmState| &mut s.wasi) + preview1::add_to_linker_sync(&mut linker, |s: &mut WasmState| &mut s.wasi) .map_err(|e| PluginError::LoadError(format!("Failed to add WASI linker: {}", e)))?; // 添加自定义宿主函数 @@ -159,27 +160,32 @@ impl WasmPluginLoader { } /// 创建 WASI 上下文 - fn create_wasi_context(&self) -> PluginResult { + fn create_wasi_context(&self) -> PluginResult { let mut builder = WasiCtxBuilder::new(); // 继承标准流 builder.inherit_stdio(); + if self.config.allow_network { + builder.inherit_network(); + } + // 配置预打开目录 - for (guest_path, host_path) in &self.config.preopened_dirs { - // 使用 wasmtime_wasi::Dir 来打开目录 - let dir = - wasmtime_wasi::Dir::open_ambient_dir(host_path, wasmtime_wasi::ambient_authority()) + if self.config.allow_filesystem { + let (dir_perms, file_perms) = (DirPerms::all(), FilePerms::all()); + for (guest_path, host_path) in &self.config.preopened_dirs { + builder + .preopened_dir(host_path, guest_path, dir_perms, file_perms) .map_err(|e| { - PluginError::LoadError(format!("Failed to open dir {}: {}", host_path, e)) + PluginError::LoadError(format!( + "Failed to preopen dir {} -> {}: {}", + host_path, guest_path, e + )) })?; - - builder - .preopened_dir(dir, guest_path) - .map_err(|e| PluginError::LoadError(format!("Failed to preopen dir: {}", e)))?; + } } - Ok(builder.build()) + Ok(builder.build_p1()) } /// 添加宿主函数到链接器 @@ -428,9 +434,9 @@ impl ResourceLimiter for WasmState { fn table_growing( &mut self, - _current: u32, - desired: u32, - _maximum: Option, + _current: usize, + desired: usize, + _maximum: Option, ) -> anyhow::Result { // 限制表大小 Ok(desired <= 10000) From 8b9b91a7f7bed017a274696ed1a514d879862f8a Mon Sep 17 00:00:00 2001 From: Webber Wei Date: Thu, 8 Oct 2026 23:19:54 +0800 Subject: [PATCH 2/3] chore(ci): add correct cargo-audit security scan script The Daily Maintenance workflow currently greps for the JSON key "vulnerabilities" (always present) and can fail on cargo audit's exit code while writing the summary. This adds scripts/ci-security-audit.sh that counts via jq and fails only when vulnerability count > 0 after ignores, plus an intended workflow snippet under docs/ci/ for a follow-up that updates .github/workflows/daily-maintenance.yml (requires a token with the `workflow` scope). --- ...aily-maintenance-security-scan.yml.snippet | 8 + docs/ci/daily-maintenance.yml.intended | 211 ++++++++++++++++++ scripts/ci-security-audit.sh | 40 ++++ 3 files changed, 259 insertions(+) create mode 100644 docs/ci/daily-maintenance-security-scan.yml.snippet create mode 100644 docs/ci/daily-maintenance.yml.intended create mode 100755 scripts/ci-security-audit.sh diff --git a/docs/ci/daily-maintenance-security-scan.yml.snippet b/docs/ci/daily-maintenance-security-scan.yml.snippet new file mode 100644 index 0000000..d2739cd --- /dev/null +++ b/docs/ci/daily-maintenance-security-scan.yml.snippet @@ -0,0 +1,8 @@ +# Replace the "安全漏洞扫描" step in +# .github/workflows/daily-maintenance.yml with: +# +# NOTE: Pushing changes under .github/workflows/ requires a GitHub token +# with the `workflow` scope (current gh OAuth token only has repo/gist/read:org). + + - name: 安全漏洞扫描 + run: bash scripts/ci-security-audit.sh diff --git a/docs/ci/daily-maintenance.yml.intended b/docs/ci/daily-maintenance.yml.intended new file mode 100644 index 0000000..6156fca --- /dev/null +++ b/docs/ci/daily-maintenance.yml.intended @@ -0,0 +1,211 @@ +name: Daily Maintenance + +on: + schedule: + # 每天 UTC 02:00 (北京时间 10:00) + - cron: '0 2 * * *' + workflow_dispatch: # 允许手动触发 + +jobs: + health-check: + name: 系统健康检查 + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - name: Cache dependencies + uses: Swatinem/rust-cache@v2 + + - name: 运行完整测试套件 + run: | + cargo test --all --verbose + echo "✅ 所有测试通过" >> $GITHUB_STEP_SUMMARY + + - name: 检查依赖更新 + run: | + cargo install cargo-outdated || true + cargo outdated --root-deps-only > outdated.txt || true + if [ -s outdated.txt ]; then + echo "## 📦 依赖更新可用" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + cat outdated.txt >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + fi + + - name: 安全漏洞扫描 + run: | + set -euo pipefail + cargo install cargo-audit --locked || cargo install cargo-audit || true + # Ensure jq is available for reliable JSON counting + sudo apt-get update -qq && sudo apt-get install -y -qq jq >/dev/null + + cargo audit --json > audit.json || true + # Count real vulnerabilities (after audit.toml ignores), not mere key presence + count="$(jq -r '.vulnerabilities.count // (.vulnerabilities.list | length) // 0' audit.json)" + echo "Vulnerability count (after ignores): $count" + + { + echo "## 🔐 安全漏洞扫描" + echo "" + if [ "$count" -gt 0 ]; then + echo "### ⚠️ 发现 $count 个安全漏洞" + else + echo "### ✅ 无未忽略的安全漏洞" + fi + echo "" + echo '```' + # Human-readable report; do not fail the shell on cargo audit's exit code here + cargo audit 2>&1 || true + echo '```' + } >> "$GITHUB_STEP_SUMMARY" + + if [ "$count" -gt 0 ]; then + echo "Failing step: $count vulnerability(ies) remain after ignores" + exit 1 + fi + + - name: 生成测试覆盖率报告 + if: always() + run: | + cargo install cargo-tarpaulin || true + cargo tarpaulin --out Xml --timeout 300 || true + + - name: Upload coverage to Codecov + if: always() + uses: codecov/codecov-action@v3 + with: + files: ./cobertura.xml + fail_ci_if_error: false + + auto-optimization: + name: 自动代码优化 + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Rust + uses: dtolnay/rust-toolchain@nightly + with: + components: rustfmt, clippy + + - name: 运行 Clippy 自动修复 + run: | + cargo clippy --fix --allow-dirty --allow-staged --all-targets || true + + - name: 运行 rustfmt + run: | + cargo +nightly fmt + + - name: 检查死代码 + run: | + cargo install cargo-udeps || true + cargo +nightly udeps --all-targets > udeps.txt || true + if [ -s udeps.txt ]; then + echo "## 🧹 发现未使用依赖" >> udeps_report.md + cat udeps.txt >> udeps_report.md + fi + + - name: 提交优化 + id: commit + run: | + git config --local user.email "github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + + if ! git diff --quiet; then + git add -A + git commit -m "chore: auto optimization from daily maintenance" + echo "has_changes=true" >> $GITHUB_OUTPUT + else + echo "has_changes=false" >> $GITHUB_OUTPUT + echo "✅ 代码已是最优状态" >> $GITHUB_STEP_SUMMARY + fi + + - name: 创建 Pull Request + if: steps.commit.outputs.has_changes == 'true' + uses: peter-evans/create-pull-request@v5 + with: + token: ${{ secrets.GITHUB_TOKEN }} + branch: auto-optimization-${{ github.run_number }} + title: "chore: 自动代码优化 (${{ github.run_number }})" + body: | + ## 🤖 自动优化报告 + + 本 PR 由 Daily Maintenance workflow 自动生成。 + + ### 变更内容 + - 运行 clippy --fix 修复 lint 问题 + - 运行 rustfmt 格式化代码 + - 检查未使用依赖 + + ### 测试结果 + 所有测试已通过(见 workflow 日志)。 + + ### 审查建议 + - 技术性修复(格式化、简单 lint)可直接合并 + - 逻辑变更需人工审查 + + --- + *Workflow Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}* + labels: | + automated + maintenance + draft: false + + roadmap-update: + name: 更新路线图进度 + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # 获取完整历史 + + - name: 统计任务进度 + run: | + total=$(grep -c "^- \[ \]" EVOLUTION_ROADMAP.md || echo 0) + completed=$(grep -c "^- \[x\]" EVOLUTION_ROADMAP.md || echo 0) + + if [ "$total" -gt 0 ]; then + progress=$((completed * 100 / total)) + echo "## 📊 每日进度报告" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "- 已完成: $completed / $total ($progress%)" >> $GITHUB_STEP_SUMMARY + echo "- 剩余任务: $((total - completed))" >> $GITHUB_STEP_SUMMARY + fi + + - name: 检查最近提交 + run: | + echo "## 📝 最近 5 次提交" >> $GITHUB_STEP_SUMMARY + git log --oneline -5 >> $GITHUB_STEP_SUMMARY + + - name: 生成每日总结 + run: | + date=$(date +'%Y-%m-%d') + echo "# 每日总结 - $date" > daily_summary.md + echo "" >> daily_summary.md + echo "## 任务进度" >> daily_summary.md + grep -E "^- \[[x ]\]" EVOLUTION_ROADMAP.md | head -20 >> daily_summary.md || true + echo "" >> daily_summary.md + echo "## 最近活动" >> daily_summary.md + git log --since="24 hours ago" --pretty=format:"- %s (%an)" >> daily_summary.md || true + + - name: 发布总结到 Discussions + if: github.event_name == 'schedule' + run: | + echo "💡 每日总结已生成,可手动发布到 Discussions" + cat daily_summary.md diff --git a/scripts/ci-security-audit.sh b/scripts/ci-security-audit.sh new file mode 100755 index 0000000..56dbd62 --- /dev/null +++ b/scripts/ci-security-audit.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Correct Daily Maintenance security-scan step. +# Prefer calling this from .github/workflows/daily-maintenance.yml once a +# token with the `workflow` scope can update that file. +set -euo pipefail + +cargo install cargo-audit --locked 2>/dev/null || cargo install cargo-audit || true + +if ! command -v jq >/dev/null 2>&1; then + if command -v apt-get >/dev/null 2>&1; then + sudo apt-get update -qq && sudo apt-get install -y -qq jq >/dev/null + else + echo "jq is required to count cargo-audit vulnerabilities" >&2 + exit 1 + fi +fi + +cargo audit --json > audit.json || true +count="$(jq -r '.vulnerabilities.count // (.vulnerabilities.list | length) // 0' audit.json)" +echo "Vulnerability count (after ignores): $count" + +summary_target="${GITHUB_STEP_SUMMARY:-/dev/stdout}" +{ + echo "## 🔐 安全漏洞扫描" + echo "" + if [ "$count" -gt 0 ]; then + echo "### ⚠️ 发现 $count 个安全漏洞" + else + echo "### ✅ 无未忽略的安全漏洞" + fi + echo "" + echo '```' + cargo audit 2>&1 || true + echo '```' +} >> "$summary_target" + +if [ "$count" -gt 0 ]; then + echo "Failing: $count vulnerability(ies) remain after ignores" >&2 + exit 1 +fi From a76dbc4c314aff9eaf4d342c3b479fe046d74381 Mon Sep 17 00:00:00 2001 From: Webber Wei Date: Thu, 8 Oct 2026 23:20:05 +0800 Subject: [PATCH 3/3] docs(ci): correct intended Daily Maintenance workflow snippet --- ...aily-maintenance-security-scan.yml.snippet | 12 +++++-- docs/ci/daily-maintenance.yml.intended | 31 +------------------ 2 files changed, 10 insertions(+), 33 deletions(-) diff --git a/docs/ci/daily-maintenance-security-scan.yml.snippet b/docs/ci/daily-maintenance-security-scan.yml.snippet index d2739cd..4ba22c6 100644 --- a/docs/ci/daily-maintenance-security-scan.yml.snippet +++ b/docs/ci/daily-maintenance-security-scan.yml.snippet @@ -1,8 +1,14 @@ # Replace the "安全漏洞扫描" step in -# .github/workflows/daily-maintenance.yml with: +# .github/workflows/daily-maintenance.yml with the following. # -# NOTE: Pushing changes under .github/workflows/ requires a GitHub token -# with the `workflow` scope (current gh OAuth token only has repo/gist/read:org). +# Applying this under .github/workflows/ requires a GitHub token with the +# `workflow` scope. Until then, dependency bumps alone make cargo audit +# exit 0, so the existing step should pass; this fix prevents false +# failures when advisories reappear. +# +# gh auth refresh -s workflow +# cp docs/ci/daily-maintenance.yml.intended .github/workflows/daily-maintenance.yml +# git add .github/workflows/daily-maintenance.yml && git commit && git push - name: 安全漏洞扫描 run: bash scripts/ci-security-audit.sh diff --git a/docs/ci/daily-maintenance.yml.intended b/docs/ci/daily-maintenance.yml.intended index 6156fca..dcad908 100644 --- a/docs/ci/daily-maintenance.yml.intended +++ b/docs/ci/daily-maintenance.yml.intended @@ -40,36 +40,7 @@ jobs: fi - name: 安全漏洞扫描 - run: | - set -euo pipefail - cargo install cargo-audit --locked || cargo install cargo-audit || true - # Ensure jq is available for reliable JSON counting - sudo apt-get update -qq && sudo apt-get install -y -qq jq >/dev/null - - cargo audit --json > audit.json || true - # Count real vulnerabilities (after audit.toml ignores), not mere key presence - count="$(jq -r '.vulnerabilities.count // (.vulnerabilities.list | length) // 0' audit.json)" - echo "Vulnerability count (after ignores): $count" - - { - echo "## 🔐 安全漏洞扫描" - echo "" - if [ "$count" -gt 0 ]; then - echo "### ⚠️ 发现 $count 个安全漏洞" - else - echo "### ✅ 无未忽略的安全漏洞" - fi - echo "" - echo '```' - # Human-readable report; do not fail the shell on cargo audit's exit code here - cargo audit 2>&1 || true - echo '```' - } >> "$GITHUB_STEP_SUMMARY" - - if [ "$count" -gt 0 ]; then - echo "Failing step: $count vulnerability(ies) remain after ignores" - exit 1 - fi + run: bash scripts/ci-security-audit.sh - name: 生成测试覆盖率报告 if: always()