From 4359b12e3ce482fa0def98815855510bbc37e004 Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Mon, 12 Jan 2026 19:51:28 +0100 Subject: [PATCH 01/10] implement sbom cli Signed-off-by: Ruben Romero Montes Assisted by: Cursor --- .gitignore | 4 + Cargo.lock | 2070 ++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 19 + LICENSE | 190 ++++ README.md | 300 ++++++ src/api/client.rs | 97 ++ src/api/mod.rs | 4 + src/api/sbom.rs | 397 ++++++++ src/auth.rs | 69 ++ src/cli.rs | 17 + src/commands/mod.rs | 23 + src/commands/sbom.rs | 360 ++++++++ src/config.rs | 36 + src/main.rs | 56 ++ 14 files changed, 3642 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 src/api/client.rs create mode 100644 src/api/mod.rs create mode 100644 src/api/sbom.rs create mode 100644 src/auth.rs create mode 100644 src/cli.rs create mode 100644 src/commands/mod.rs create mode 100644 src/commands/sbom.rs create mode 100644 src/config.rs create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..2da936e32 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/target +.env + +duplicates.json diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 000000000..315dd1fb3 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2070 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anstream" +version = "0.6.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" + +[[package]] +name = "anstyle-parse" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys 0.61.2", +] + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "aws-lc-rs" +version = "1.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a88aab2464f1f25453baa7a07c84c5b7684e274054ba06817f382357f77a288" +dependencies = [ + "aws-lc-sys", + "zeroize", +] + +[[package]] +name = "aws-lc-sys" +version = "0.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b45afffdee1e7c9126814751f88dddc747f41d91da16c9551a0f1e8a11e788a1" +dependencies = [ + "cc", + "cmake", + "dunce", + "fs_extra", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" + +[[package]] +name = "bumpalo" +version = "3.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" + +[[package]] +name = "bytes" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" + +[[package]] +name = "cc" +version = "1.2.52" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" +dependencies = [ + "find-msvc-tools", + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "clap" +version = "4.5.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.5.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.5.49" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" + +[[package]] +name = "cmake" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" +dependencies = [ + "cc", +] + +[[package]] +name = "colorchoice" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" + +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "console" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width", + "windows-sys 0.61.2", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "dotenvy" +version = "0.15.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" + +[[package]] +name = "dunce" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" + +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "find-msvc-tools" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" + +[[package]] +name = "fnv" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" + +[[package]] +name = "form_urlencoded" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "fs_extra" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-executor" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-macro" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "r-efi", + "wasip2", + "wasm-bindgen", +] + +[[package]] +name = "h2" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "http" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" +dependencies = [ + "bytes", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" +dependencies = [ + "bytes", + "futures-core", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" + +[[package]] +name = "hyper" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" +dependencies = [ + "atomic-waker", + "bytes", + "futures-channel", + "futures-core", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "pin-utils", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +dependencies = [ + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +dependencies = [ + "base64", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", + "pin-project-lite", + "socket2", + "system-configuration", + "tokio", + "tower-service", + "tracing", + "windows-registry", +] + +[[package]] +name = "icu_collections" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" +dependencies = [ + "displaydoc", + "potential_utf", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locale_core" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_normalizer" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" +dependencies = [ + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" + +[[package]] +name = "icu_properties" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" +dependencies = [ + "icu_collections", + "icu_locale_core", + "icu_properties_data", + "icu_provider", + "zerotrie", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" + +[[package]] +name = "icu_provider" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" +dependencies = [ + "displaydoc", + "icu_locale_core", + "writeable", + "yoke", + "zerofrom", + "zerotrie", + "zerovec", +] + +[[package]] +name = "idna" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "indicatif" +version = "0.18.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" +dependencies = [ + "console", + "portable-atomic", + "unicode-width", + "unit-prefix", + "web-time", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + +[[package]] +name = "jobserver" +version = "0.1.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" +dependencies = [ + "getrandom 0.3.4", + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.180" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" + +[[package]] +name = "litemap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" + +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.61.2", +] + +[[package]] +name = "once_cell" +version = "1.21.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "openssl-probe" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f50d9b3dabb09ecd771ad0aa242ca6894994c130308ca3d7684634df8037391" + +[[package]] +name = "percent-encoding" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "portable-atomic" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" + +[[package]] +name = "potential_utf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" +dependencies = [ + "zerovec", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.105" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quinn" +version = "0.11.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" +dependencies = [ + "aws-lc-rs", + "bytes", + "getrandom 0.3.4", + "lru-slab", + "rand", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.60.2", +] + +[[package]] +name = "quote" +version = "1.0.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + +[[package]] +name = "rand" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +dependencies = [ + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f1b3bc831f92381018fd9c6350b917c7b21f1eed35a65a51900e0e55a3d7afa" +dependencies = [ + "getrandom 0.3.4", +] + +[[package]] +name = "reqwest" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "js-sys", + "log", + "mime", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-rustls", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.17", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + +[[package]] +name = "rustls" +version = "0.23.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" +dependencies = [ + "aws-lc-rs", + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-native-certs" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" +dependencies = [ + "openssl-probe", + "rustls-pki-types", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pki-types" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +dependencies = [ + "web-time", + "zeroize", +] + +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + +[[package]] +name = "rustls-webpki" +version = "0.103.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +dependencies = [ + "aws-lc-rs", + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" + +[[package]] +name = "ryu" +version = "1.0.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "security-framework" +version = "3.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" +dependencies = [ + "bitflags", + "core-foundation 0.10.1", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +dependencies = [ + "libc", + "windows-sys 0.60.2", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation 0.9.4", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "thiserror" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" +dependencies = [ + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +dependencies = [ + "thiserror-impl 2.0.17", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.69" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tinystr" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tokio" +version = "1.49.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +dependencies = [ + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.61.2", +] + +[[package]] +name = "tokio-macros" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "trustify-cli" +version = "0.1.0" +dependencies = [ + "clap", + "dotenvy", + "futures", + "indicatif", + "reqwest", + "serde", + "serde_json", + "thiserror 2.0.17", + "tokio", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-ident" +version = "1.0.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" + +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + +[[package]] +name = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", + "serde", +] + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "wasip2" +version = "1.0.1+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasm-bindgen" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +dependencies = [ + "bumpalo", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "web-sys" +version = "0.3.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" +dependencies = [ + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-result" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.5", +] + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" +dependencies = [ + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_i686_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" + +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + +[[package]] +name = "writeable" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" + +[[package]] +name = "yoke" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" +dependencies = [ + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerocopy" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.8.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" + +[[package]] +name = "zerotrie" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", +] + +[[package]] +name = "zerovec" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "zmij" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac93432f5b761b22864c774aac244fa5c0fd877678a4c37ebf6cf42208f9c9ec" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 000000000..e81b1bb6c --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "trustify-cli" +version = "0.1.0" +edition = "2021" + +[[bin]] +name = "trustify" +path = "src/main.rs" + +[dependencies] +clap = { version = "4.5", features = ["derive", "env"] } +dotenvy = "0.15.7" +futures = "0.3.31" +indicatif = "0.18.3" +reqwest = { version = "0.13.1", features = ["blocking", "form", "json", "query"] } +serde = { version = "1.0.228", features = ["derive"] } +serde_json = "1.0.149" +thiserror = "2.0.17" +tokio = { version = "1.49.0", features = ["rt-multi-thread", "macros", "sync"] } diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..b38499aae --- /dev/null +++ b/LICENSE @@ -0,0 +1,190 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to the Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + Copyright 2024 The Trustify CLI Authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 000000000..7448c32e5 --- /dev/null +++ b/README.md @@ -0,0 +1,300 @@ +# Trustify CLI + +A command-line interface for interacting with the [Trustify](https://github.com/trustification/trustify) Software Supply-Chain Security API. + +## Features + +- 🔐 OAuth2 authentication (client credentials) +- 📦 SBOM management (list, get, delete) +- 🔍 Duplicate detection and cleanup +- ⚡ Concurrent operations for fast bulk processing +- 🌍 Environment variable and `.env` file support + +## Installation + +### From Source + +```bash +# Clone the repository +git clone https://github.com/ruromero/trustify-cli.git +cd trustify-cli + +# Build +cargo build --release + +# The binary will be at ./target/release/trustify +``` + +## Configuration + +The CLI can be configured using command-line arguments, environment variables, or a `.env` file. + +### Configuration Options + +| CLI Argument | Environment Variable | Required | Description | +|--------------|---------------------|----------|-------------| +| `-u, --url` | `TRUSTIFY_URL` | ✅ Yes | Trustify API URL | +| `--sso-url` | `TRUSTIFY_SSO_URL` | No | SSO/Keycloak URL for authentication | +| `--client-id` | `TRUSTIFY_CLIENT_ID` | No | OAuth2 Client ID | +| `--client-secret` | `TRUSTIFY_CLIENT_SECRET` | No | OAuth2 Client Secret | + +### Using Environment Variables + +```bash +export TRUSTIFY_URL=http://localhost:8080 +export TRUSTIFY_SSO_URL=http://sso.example.com/realms/trustify +export TRUSTIFY_CLIENT_ID=my-client +export TRUSTIFY_CLIENT_SECRET=my-secret + +trustify sbom list +``` + +### Using a `.env` File + +Create a `.env` file in your working directory: + +```env +TRUSTIFY_URL=http://localhost:8080 +TRUSTIFY_SSO_URL=http://sso.example.com/realms/trustify +TRUSTIFY_CLIENT_ID=my-client +TRUSTIFY_CLIENT_SECRET=my-secret +``` + +Then simply run: + +```bash +trustify sbom list +``` + +### Configuration Priority + +1. **CLI arguments** (highest priority) +2. **Shell environment variables** +3. **`.env` file** (lowest priority) + +## Authentication + +When `--sso-url`, `--client-id`, and `--client-secret` are all provided, the CLI automatically obtains an OAuth2 token using the client credentials grant before making API requests. + +The SSO URL should point to your Keycloak realm. The CLI automatically appends `/protocol/openid-connect/token` if needed. + +```bash +# Full authentication example +trustify -u http://localhost:8080 \ + --sso-url http://sso.example.com/realms/trustify \ + --client-id my-client \ + --client-secret my-secret \ + sbom list +``` + +## Commands + +### Global Options + +``` +-u, --url Trustify API URL (required) + --sso-url SSO URL for authentication + --client-id OAuth2 Client ID + --client-secret OAuth2 Client Secret +-h, --help Print help +-V, --version Print version +``` + +--- + +### `sbom get ` + +Get an SBOM by its ID. Returns the full JSON document. + +```bash +trustify -u http://localhost:8080 sbom get abc123 +``` + +**Output:** Raw JSON of the SBOM + +--- + +### `sbom list` + +List SBOMs with optional filtering, pagination, and output formatting. + +```bash +trustify -u http://localhost:8080 sbom list [OPTIONS] +``` + +**Options:** + +| Option | Description | +|--------|-------------| +| `--query ` | Query filter (e.g., `name=my-app`) | +| `--limit ` | Maximum number of results | +| `--offset ` | Skip first N results | +| `--sort ` | Sort order (e.g., `name:asc`, `published:desc`) | +| `--format ` | Output format: `id`, `name`, `short`, `full` (default: `full`) | + +**Format Options:** + +| Format | Fields Included | +|--------|-----------------| +| `id` | Just the ID (one per line) | +| `name` | `id`, `name`, `document_id` | +| `short` | `id`, `name`, `document_id`, `ingested`, `published`, `size` | +| `full` | Complete JSON document | + +**Examples:** + +```bash +# List all SBOMs (full JSON) +trustify -u http://localhost:8080 sbom list + +# List with query filter +trustify -u http://localhost:8080 sbom list --query "name=my-app" + +# List only IDs +trustify -u http://localhost:8080 sbom list --format id + +# Paginated results +trustify -u http://localhost:8080 sbom list --limit 10 --offset 20 + +# Sorted results +trustify -u http://localhost:8080 sbom list --sort "published:desc" +``` + +--- + +### `sbom delete` + +Delete an SBOM (placeholder - not fully implemented). + +```bash +trustify -u http://localhost:8080 sbom delete --id [--dry-run] +``` + +--- + +### `sbom duplicates find` + +Find duplicate SBOMs by `document_id`. Groups SBOMs with the same `document_id` and identifies the most recent (by `published` date) as the primary, with others marked as duplicates. + +```bash +trustify -u http://localhost:8080 sbom duplicates find [OPTIONS] +``` + +**Options:** + +| Option | Default | Description | +|--------|---------|-------------| +| `-b, --batch-size` | 100 | Number of SBOMs to fetch per request | +| `-j, --concurrency` | 4 | Number of concurrent fetch requests | +| `--output` | `duplicates.json` | Output file path | + +**Examples:** + +```bash +# Default settings +trustify -u http://localhost:8080 sbom duplicates find + +# Faster with more concurrency +trustify -u http://localhost:8080 sbom duplicates find -j 8 + +# Larger batches +trustify -u http://localhost:8080 sbom duplicates find -b 500 -j 8 + +# Custom output file +trustify -u http://localhost:8080 sbom duplicates find --output my-duplicates.json +``` + +**Output Format (`duplicates.json`):** + +```json +[ + { + "document_id": "urn:example:sbom-1.0", + "published": "2025-01-10T12:00:00Z", + "id": "abc123", + "duplicates": ["def456", "ghi789"] + } +] +``` + +Where: +- `id` = The most recent SBOM (keep this one) +- `duplicates` = Older versions that can be deleted + +--- + +### `sbom duplicates delete` + +Delete duplicate SBOMs identified by the `duplicates find` command. + +```bash +trustify -u http://localhost:8080 sbom duplicates delete [OPTIONS] +``` + +**Options:** + +| Option | Default | Description | +|--------|---------|-------------| +| `--input` | `duplicates.json` | Input file from `duplicates find` | +| `-j, --concurrency` | 8 | Number of concurrent delete requests | +| `--dry-run` | false | Preview deletions without executing | + +**Examples:** + +```bash +# Dry run first (recommended) +trustify -u http://localhost:8080 sbom duplicates delete --dry-run + +# Actually delete +trustify -u http://localhost:8080 sbom duplicates delete + +# With higher concurrency +trustify -u http://localhost:8080 sbom duplicates delete -j 16 + +# From a specific file +trustify -u http://localhost:8080 sbom duplicates delete --input my-duplicates.json +``` + +**Output:** + +``` +Deleting 150 duplicates with 8 concurrent requests... +Deleted: abc123 (document_id: urn:example:sbom-1.0) +Deleted: def456 (document_id: urn:example:sbom-1.0) +... +Deleted 150 duplicate(s), 0 failed out of 150 total +``` + +--- + +## Complete Workflow Example + +```bash +# 1. Configure authentication +export TRUSTIFY_URL=http://localhost:8080 +export TRUSTIFY_SSO_URL=http://sso.example.com/realms/trustify +export TRUSTIFY_CLIENT_ID=my-client +export TRUSTIFY_CLIENT_SECRET=my-secret + +# 2. Find duplicates +trustify sbom duplicates find -j 8 +# Output: Found 150 document(s) with duplicates. Saved to duplicates.json + +# 3. Review the duplicates file +cat duplicates.json | jq '.[0]' + +# 4. Dry run to see what would be deleted +trustify sbom duplicates delete --dry-run + +# 5. Delete duplicates +trustify sbom duplicates delete -j 16 +# Output: Deleted 300 duplicate(s), 0 failed out of 300 total +``` + +## API Reference + +This CLI interacts with the Trustify API. See the [OpenAPI specification](https://raw.githubusercontent.com/guacsec/trustify/refs/heads/main/openapi.yaml) for full API documentation. + +## License + +Apache License, Version 2.0 diff --git a/src/api/client.rs b/src/api/client.rs new file mode 100644 index 000000000..e0910bd10 --- /dev/null +++ b/src/api/client.rs @@ -0,0 +1,97 @@ +use reqwest::{Client, RequestBuilder}; +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum ApiError { + #[error("Request failed: {0}")] + RequestError(#[from] reqwest::Error), + + #[error("Not found: {0}")] + NotFound(String), + + #[error("Unauthorized: Please check your authentication credentials")] + Unauthorized, + + #[error("Server error: {0}")] + ServerError(String), +} + +/// API client for Trustify +#[derive(Clone)] +pub struct ApiClient { + client: Client, + base_url: String, + token: Option, +} + +impl ApiClient { + pub fn new(base_url: &str, token: Option) -> Self { + // Normalize base URL (remove trailing slash) + let base_url = base_url.trim_end_matches('/').to_string(); + + Self { + client: Client::new(), + base_url, + token, + } + } + + /// Build the full API URL + pub fn url(&self, path: &str) -> String { + format!("{}/api{}", self.base_url, path) + } + + /// Add authorization header if token is present + fn authorize(&self, request: RequestBuilder) -> RequestBuilder { + match &self.token { + Some(token) => request.bearer_auth(token), + None => request, + } + } + + /// Perform a GET request + pub async fn get(&self, path: &str) -> Result { + let url = self.url(path); + let request = self.client.get(&url); + let response = self.authorize(request).send().await?; + + self.handle_response(response).await + } + + /// Perform a GET request with query parameters + pub async fn get_with_query( + &self, + path: &str, + query: &T, + ) -> Result { + let url = self.url(path); + let request = self.client.get(&url).query(query); + let response = self.authorize(request).send().await?; + + self.handle_response(response).await + } + + /// Perform a DELETE request + pub async fn delete(&self, path: &str) -> Result { + let url = self.url(path); + let request = self.client.delete(&url); + let response = self.authorize(request).send().await?; + + self.handle_response(response).await + } + + async fn handle_response(&self, response: reqwest::Response) -> Result { + let status = response.status(); + + if status.is_success() { + Ok(response.text().await?) + } else if status.as_u16() == 404 { + Err(ApiError::NotFound("Resource not found".to_string())) + } else if status.as_u16() == 401 || status.as_u16() == 403 { + Err(ApiError::Unauthorized) + } else { + let body = response.text().await.unwrap_or_default(); + Err(ApiError::ServerError(format!("HTTP {}: {}", status, body))) + } + } +} diff --git a/src/api/mod.rs b/src/api/mod.rs new file mode 100644 index 000000000..40637dfd2 --- /dev/null +++ b/src/api/mod.rs @@ -0,0 +1,4 @@ +pub mod client; +pub mod sbom; + +pub use client::ApiClient; diff --git a/src/api/sbom.rs b/src/api/sbom.rs new file mode 100644 index 000000000..12b52ae7a --- /dev/null +++ b/src/api/sbom.rs @@ -0,0 +1,397 @@ +use std::collections::HashMap; +use std::fs::File; +use std::io::{BufReader, Write}; +use std::path::Path; +use std::sync::atomic::{AtomicU32, Ordering}; +use std::sync::Arc; + +use futures::future::join_all; +use futures::stream::{self, StreamExt}; +use indicatif::{MultiProgress, ProgressBar, ProgressStyle}; +use serde::{Deserialize, Serialize}; +use serde_json::Value; +use tokio::sync::Mutex; + +use super::client::{ApiClient, ApiError}; + +const SBOM_PATH: &str = "/v2/sbom"; + +/// Query parameters for listing SBOMs +#[derive(Default, Serialize)] +pub struct ListParams { + #[serde(skip_serializing_if = "Option::is_none")] + pub q: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub limit: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub offset: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub sort: Option, +} + +/// Parameters for find duplicates +pub struct FindDuplicatesParams { + pub batch_size: u32, + pub concurrency: usize, +} + +/// SBOM entry for duplicate detection +#[derive(Debug, Clone)] +struct SbomEntry { + id: String, + document_id: String, + published: Option, +} + +/// Duplicate group output format +#[derive(Debug, Serialize, Deserialize)] +pub struct DuplicateGroup { + pub document_id: String, + pub published: Option, + pub id: String, + pub duplicates: Vec, +} + +/// Get SBOM by ID - returns raw JSON +pub async fn get(client: &ApiClient, id: &str) -> Result { + let path = format!("{}/{}", SBOM_PATH, id); + client.get(&path).await +} + +/// List SBOMs with optional query parameters - returns raw JSON +pub async fn list(client: &ApiClient, params: &ListParams) -> Result { + client.get_with_query(SBOM_PATH, params).await +} + +/// Fetch a single page and extract SBOM entries +async fn fetch_page(client: &ApiClient, batch_size: u32, offset: u32) -> Result, ApiError> { + let list_params = ListParams { + q: None, + limit: Some(batch_size), + offset: Some(offset), + sort: None, + }; + + let response = list(client, &list_params).await?; + let parsed: Value = serde_json::from_str(&response).map_err(|e| { + ApiError::ServerError(format!("Failed to parse response: {}", e)) + })?; + + let items = parsed + .get("items") + .and_then(|v| v.as_array()) + .ok_or_else(|| ApiError::ServerError("No items in response".to_string()))?; + + let entries: Vec = items + .iter() + .filter_map(|item| { + let id = item.get("id").and_then(|v| v.as_str())?.to_string(); + let document_id = item.get("document_id").and_then(|v| v.as_str())?.to_string(); + let published = item.get("published").and_then(|v| v.as_str()).map(|s| s.to_string()); + + if document_id.is_empty() { + None + } else { + Some(SbomEntry { id, document_id, published }) + } + }) + .collect(); + + Ok(entries) +} + +/// Worker that fetches assigned pages sequentially +async fn fetch_worker( + worker_id: usize, + client: ApiClient, + pages: Vec, + batch_size: u32, + progress_bar: ProgressBar, + results: Arc>>, +) { + let mut fetched: u64 = 0; + + for offset in pages { + match fetch_page(&client, batch_size, offset).await { + Ok(entries) => { + fetched += entries.len() as u64; + progress_bar.set_position(fetched); + results.lock().await.extend(entries); + } + Err(e) => { + progress_bar.println(format!("Worker {}: Error at offset {}: {}", worker_id, offset, e)); + } + } + } + + progress_bar.finish_with_message("done"); +} + +/// Find duplicate SBOMs by document_id and save to file +pub async fn find_duplicates( + client: &ApiClient, + params: &FindDuplicatesParams, + output_file: &Option, +) -> Result, ApiError> { + let batch_size = params.batch_size; + let concurrency = params.concurrency; + + // First, get the total count + let first_page = list(client, &ListParams { + q: None, + limit: Some(1), + offset: Some(0), + sort: None, + }).await?; + + let parsed: Value = serde_json::from_str(&first_page).map_err(|e| { + ApiError::ServerError(format!("Failed to parse response: {}", e)) + })?; + + let total = parsed + .get("total") + .and_then(|v| v.as_u64()) + .unwrap_or(0) as u32; + + if total == 0 { + eprintln!("No SBOMs found"); + return Ok(Vec::new()); + } + + eprintln!("Fetching {} SBOMs with {} workers...\n", total, concurrency); + + // Calculate page offsets + let num_pages = total.div_ceil(batch_size); + let all_offsets: Vec = (0..num_pages).map(|i| i * batch_size).collect(); + + // Distribute pages evenly among workers + let mut worker_pages: Vec> = vec![Vec::new(); concurrency]; + for (i, offset) in all_offsets.into_iter().enumerate() { + worker_pages[i % concurrency].push(offset); + } + + // Calculate how many SBOMs each worker will fetch + let worker_counts: Vec = worker_pages.iter().map(|pages| { + pages.iter().map(|&offset| { + let remaining = total.saturating_sub(offset); + remaining.min(batch_size) as u64 + }).sum() + }).collect(); + + // Set up progress bars + let multi_progress = MultiProgress::new(); + let style = ProgressStyle::default_bar() + .template("{prefix:>12} [{bar:30.cyan/blue}] {pos}/{len} ({percent}%)") + .unwrap() + .progress_chars("█▓░"); + + let results: Arc>> = Arc::new(Mutex::new(Vec::new())); + + // Spawn workers + let mut handles = Vec::new(); + for (worker_id, pages) in worker_pages.into_iter().enumerate() { + if pages.is_empty() { + continue; + } + + let worker_total = worker_counts[worker_id]; + let pb = multi_progress.add(ProgressBar::new(worker_total)); + pb.set_style(style.clone()); + pb.set_prefix(format!("Worker {}", worker_id + 1)); + + let client = client.clone(); + let results = Arc::clone(&results); + + handles.push(tokio::spawn(fetch_worker( + worker_id + 1, + client, + pages, + batch_size, + pb, + results, + ))); + } + + // Wait for all workers to complete + join_all(handles).await; + + let all_entries = Arc::try_unwrap(results) + .map_err(|_| ApiError::ServerError("Failed to unwrap entries".to_string()))? + .into_inner(); + + eprintln!("\nProcessing {} SBOMs for duplicates...", all_entries.len()); + + // Group by document_id + let mut groups: HashMap> = HashMap::new(); + for entry in all_entries { + groups + .entry(entry.document_id.clone()) + .or_default() + .push(entry); + } + + // Find duplicates (groups with more than one entry) + let mut duplicate_groups: Vec = Vec::new(); + + for (document_id, mut entries) in groups { + if entries.len() <= 1 { + continue; + } + + // Sort by published date descending (most recent first) + entries.sort_by(|a, b| { + match (&b.published, &a.published) { + (Some(b_pub), Some(a_pub)) => b_pub.cmp(a_pub), + (Some(_), None) => std::cmp::Ordering::Less, + (None, Some(_)) => std::cmp::Ordering::Greater, + (None, None) => std::cmp::Ordering::Equal, + } + }); + + let most_recent = entries.remove(0); + let duplicates: Vec = entries.into_iter().map(|e| e.id).collect(); + + duplicate_groups.push(DuplicateGroup { + document_id, + published: most_recent.published, + id: most_recent.id, + duplicates, + }); + } + + eprintln!("Found {} document(s) with duplicates", duplicate_groups.len()); + + // Save to file + let output_path = output_file + .as_ref() + .map(|s| s.as_str()) + .unwrap_or("duplicates.json"); + + let json = serde_json::to_string_pretty(&duplicate_groups).map_err(|e| { + ApiError::ServerError(format!("Failed to serialize results: {}", e)) + })?; + + let mut file = File::create(output_path).map_err(|e| { + ApiError::ServerError(format!("Failed to create output file: {}", e)) + })?; + + file.write_all(json.as_bytes()).map_err(|e| { + ApiError::ServerError(format!("Failed to write to file: {}", e)) + })?; + + Ok(duplicate_groups) +} + +/// Delete an SBOM by ID +pub async fn delete(client: &ApiClient, id: &str) -> Result<(), ApiError> { + let path = format!("{}/{}", SBOM_PATH, id); + client.delete(&path).await?; + Ok(()) +} + +/// Result of deleting duplicates +pub struct DeleteDuplicatesResult { + pub deleted: u32, + pub failed: u32, + pub total: u32, +} + +/// Entry to delete with its document_id for logging +#[derive(Clone)] +struct DeleteEntry { + id: String, + document_id: String, +} + +/// Delete duplicates from a file with progress bar +pub async fn delete_duplicates( + client: &ApiClient, + input_file: &str, + concurrency: usize, + dry_run: bool, +) -> Result { + // Check if file exists + let path = Path::new(input_file); + if !path.exists() { + return Err(ApiError::ServerError(format!( + "Input file not found: {}", + input_file + ))); + } + + // Read and parse the file + let file = File::open(path).map_err(|e| { + ApiError::ServerError(format!("Failed to open input file: {}", e)) + })?; + let reader = BufReader::new(file); + + let groups: Vec = serde_json::from_reader(reader).map_err(|e| { + ApiError::ServerError(format!("Failed to parse input file: {}", e)) + })?; + + // Collect all duplicate entries to delete + let entries: Vec = groups + .iter() + .flat_map(|group| { + group.duplicates.iter().map(|id| DeleteEntry { + id: id.clone(), + document_id: group.document_id.clone(), + }) + }) + .collect(); + + let total = entries.len() as u32; + + if dry_run { + for entry in &entries { + eprintln!("[DRY-RUN] Would delete: {} (document_id: {})", entry.id, entry.document_id); + } + return Ok(DeleteDuplicatesResult { + deleted: 0, + failed: 0, + total, + }); + } + + eprintln!("Deleting {} duplicates with {} concurrent requests...\n", total, concurrency); + + // Set up progress bar + let progress = ProgressBar::new(total as u64); + progress.set_style( + ProgressStyle::default_bar() + .template("{spinner:.green} [{bar:40.cyan/blue}] {pos}/{len} ({percent}%) {msg}") + .unwrap() + .progress_chars("█▓░") + ); + + let deleted = Arc::new(AtomicU32::new(0)); + let failed = Arc::new(AtomicU32::new(0)); + + stream::iter(entries) + .for_each_concurrent(concurrency, |entry| { + let client = client.clone(); + let deleted = Arc::clone(&deleted); + let failed = Arc::clone(&failed); + let progress = progress.clone(); + async move { + match delete(&client, &entry.id).await { + Ok(_) => { + deleted.fetch_add(1, Ordering::Relaxed); + } + Err(_) => { + failed.fetch_add(1, Ordering::Relaxed); + } + } + progress.inc(1); + } + }) + .await; + + progress.finish_with_message("complete"); + + Ok(DeleteDuplicatesResult { + deleted: deleted.load(Ordering::Relaxed), + failed: failed.load(Ordering::Relaxed), + total, + }) +} diff --git a/src/auth.rs b/src/auth.rs new file mode 100644 index 000000000..1fe5370a3 --- /dev/null +++ b/src/auth.rs @@ -0,0 +1,69 @@ +use reqwest::Client; +use serde::Deserialize; +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum AuthError { + #[error("Failed to connect to SSO server: {0}")] + ConnectionError(#[from] reqwest::Error), + + #[error("Authentication failed: Invalid client_id, client_secret, or SSO URL. Please verify your credentials.")] + AuthenticationFailed, + + #[error("SSO server returned an error: {0}")] + ServerError(String), +} + +#[derive(Deserialize)] +struct TokenResponse { + access_token: String, + #[allow(dead_code)] + token_type: String, + #[allow(dead_code)] + expires_in: Option, +} + +#[derive(Deserialize)] +struct ErrorResponse { + error: String, + error_description: Option, +} + +/// Retrieves an OAuth2 access token using client credentials grant +pub async fn get_token(token_url: &str, client_id: &str, client_secret: &str) -> Result { + let client = Client::new(); + + let response = client + .post(token_url) + .form(&[ + ("grant_type", "client_credentials"), + ("client_id", client_id), + ("client_secret", client_secret), + ]) + .send() + .await?; + + if response.status().is_success() { + let token_response: TokenResponse = response.json().await?; + Ok(token_response.access_token) + } else if response.status().as_u16() == 401 || response.status().as_u16() == 400 { + // Try to get error details + if let Ok(error_response) = response.json::().await { + if error_response.error == "invalid_client" || error_response.error == "unauthorized_client" { + return Err(AuthError::AuthenticationFailed); + } + let msg = error_response + .error_description + .unwrap_or(error_response.error); + return Err(AuthError::ServerError(msg)); + } + Err(AuthError::AuthenticationFailed) + } else { + let status = response.status(); + let body = response.text().await.unwrap_or_default(); + Err(AuthError::ServerError(format!( + "HTTP {}: {}", + status, body + ))) + } +} diff --git a/src/cli.rs b/src/cli.rs new file mode 100644 index 000000000..fbcae8ae8 --- /dev/null +++ b/src/cli.rs @@ -0,0 +1,17 @@ +use clap::Parser; + +use crate::commands::Commands; +use crate::config::Config; + +/// Trustify CLI - Software Supply-Chain Security tool +#[derive(Parser)] +#[command(name = "trustify")] +#[command(about = "CLI for interacting with the Trustify API", long_about = None)] +#[command(version)] +pub struct Cli { + #[command(flatten)] + pub config: Config, + + #[command(subcommand)] + pub command: Commands, +} diff --git a/src/commands/mod.rs b/src/commands/mod.rs new file mode 100644 index 000000000..2164b8d78 --- /dev/null +++ b/src/commands/mod.rs @@ -0,0 +1,23 @@ +pub mod sbom; + +use clap::Subcommand; + +use crate::Context; +pub use sbom::SbomCommands; + +#[derive(Subcommand)] +pub enum Commands { + /// SBOM management commands + Sbom { + #[command(subcommand)] + command: SbomCommands, + }, +} + +impl Commands { + pub async fn run(&self, ctx: &Context) { + match self { + Commands::Sbom { command } => command.run(ctx).await, + } + } +} diff --git a/src/commands/sbom.rs b/src/commands/sbom.rs new file mode 100644 index 000000000..1ab27767e --- /dev/null +++ b/src/commands/sbom.rs @@ -0,0 +1,360 @@ +use std::io::{self, Write}; +use std::path::Path; +use std::process; + +use clap::{Subcommand, ValueEnum}; +use serde_json::Value; + +use crate::api::sbom as sbom_api; +use crate::Context; + +/// Output format for SBOM list +#[derive(Clone, Default, ValueEnum)] +pub enum ListFormat { + /// Only output the SBOM ID + Id, + /// Output id, name, document_id + Name, + /// Output id, name, document_id, ingested, published, size + Short, + /// Output complete JSON document + #[default] + Full, +} + +#[derive(Subcommand)] +pub enum DuplicatesCommands { + /// Find duplicates by namespace + Find { + /// Batch size for querying duplicates + #[arg(short = 'b', long, default_value = "100")] + batch_size: u32, + + /// Number of concurrent fetch requests (default: 4) + #[arg(short = 'j', long, default_value = "4")] + concurrency: usize, + + /// Output file + #[arg(long, default_value = "duplicates.json")] + output: Option, + }, + /// Delete duplicates + Delete { + /// Input file + #[arg(long, default_value = "duplicates.json")] + input: Option, + + /// Number of concurrent delete requests (default: 8) + #[arg(short = 'j', long, default_value = "8")] + concurrency: usize, + + /// Perform a dry run without actually deleting + #[arg(long)] + dry_run: bool, + }, +} + +#[derive(Subcommand)] +pub enum SbomCommands { + /// Get SBOM by ID + Get { + /// SBOM ID + id: String, + }, + /// List SBOMs + List { + /// Query filter for SBOMs + #[arg(long)] + query: Option, + /// Limit the number of results + #[arg(long)] + limit: Option, + /// Offset the results + #[arg(long)] + offset: Option, + /// Sort the results + /// Example: `purl:qualifiers:type:desc` + #[arg(long)] + sort: Option, + /// Output format: id, name, short, full (default: full) + #[arg(long, value_enum, default_value = "full")] + format: ListFormat, + }, + /// Delete SBOMs + Delete { + /// SBOM ID + #[arg(long)] + id: Option, + + /// Query filter for SBOMs to delete + #[arg(long)] + query: Option, + + /// Perform a dry run without actually deleting + #[arg(long)] + dry_run: bool, + }, + /// Manage duplicate SBOMs + Duplicates { + #[command(subcommand)] + command: DuplicatesCommands, + }, +} + +impl SbomCommands { + pub async fn run(&self, ctx: &Context) { + match self { + SbomCommands::Duplicates { command } => { + command.run(ctx).await; + } + SbomCommands::Get { id } => { + match sbom_api::get(&ctx.client, id).await { + Ok(json) => println!("{}", json), + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } + } + SbomCommands::List { + query, + limit, + offset, + sort, + format, + } => { + let params = sbom_api::ListParams { + q: query.clone(), + limit: *limit, + offset: *offset, + sort: sort.clone(), + }; + match sbom_api::list(&ctx.client, ¶ms).await { + Ok(json) => { + format_list_output(&json, format); + } + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } + } + SbomCommands::Delete { + id, + query, + dry_run, + } => { + println!( + "SBOM delete command executed successfully!{}", + if *dry_run { " (dry-run)" } else { "" } + ); + if let Some(i) = id { + println!(" ID: {}", i); + } + if let Some(q) = query { + println!(" Query: {}", q); + } + } + } + } +} + +impl DuplicatesCommands { + pub async fn run(&self, ctx: &Context) { + match self { + DuplicatesCommands::Find { batch_size, concurrency, output } => { + let output_path = output.as_ref().map(|s| s.as_str()).unwrap_or("duplicates.json"); + + // Check if output file exists + let final_output = check_output_file(output_path); + if final_output.is_none() { + eprintln!("Operation cancelled."); + process::exit(0); + } + let final_output = final_output.unwrap(); + + let params = sbom_api::FindDuplicatesParams { + batch_size: *batch_size, + concurrency: *concurrency, + }; + match sbom_api::find_duplicates(&ctx.client, ¶ms, &Some(final_output.clone())).await { + Ok(groups) => { + let total_duplicates: usize = groups.iter().map(|g| g.duplicates.len()).sum(); + println!( + "Found {} document(s) with {} duplicate(s). Saved to {}", + groups.len(), + total_duplicates, + final_output + ); + } + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } + } + DuplicatesCommands::Delete { + input, + concurrency, + dry_run, + } => { + let input_path = input.as_ref().map(|s| s.as_str()).unwrap_or("duplicates.json"); + + match sbom_api::delete_duplicates(&ctx.client, input_path, *concurrency, *dry_run).await { + Ok(result) => { + if *dry_run { + println!("[DRY-RUN] Would delete {} duplicate(s)", result.total); + } else { + println!( + "Deleted {} duplicate(s), {} failed out of {} total", + result.deleted, result.failed, result.total + ); + } + } + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } + } + } + } +} + +/// Format and print list output based on the specified format +fn format_list_output(json: &str, format: &ListFormat) { + let parsed: Value = match serde_json::from_str(json) { + Ok(v) => v, + Err(e) => { + eprintln!("Error parsing response: {}", e); + process::exit(1); + } + }; + + // The API returns { "items": [...], "total": N } + let items = match parsed.get("items").and_then(|v| v.as_array()) { + Some(arr) => arr, + None => { + // If no items array, just print the raw JSON + println!("{}", json); + return; + } + }; + + match format { + ListFormat::Full => { + println!("{}", json); + } + ListFormat::Id => { + for item in items { + if let Some(id) = item.get("id").and_then(|v| v.as_str()) { + println!("{}", id); + } + } + } + ListFormat::Name => { + let result: Vec = items + .iter() + .map(|item| { + serde_json::json!({ + "id": item.get("id"), + "name": item.get("name"), + "document_id": item.get("document_id") + }) + }) + .collect(); + println!("{}", serde_json::to_string(&result).unwrap_or_default()); + } + ListFormat::Short => { + let result: Vec = items + .iter() + .map(|item| { + serde_json::json!({ + "id": item.get("id"), + "name": item.get("name"), + "document_id": item.get("document_id"), + "ingested": item.get("ingested"), + "published": item.get("published"), + "size": item.get("size"), + }) + }) + .collect(); + println!("{}", serde_json::to_string(&result).unwrap_or_default()); + } + } +} + +/// Check if output file exists and prompt user for action +/// Returns None if user cancels, Some(path) with the final path to use +fn check_output_file(output_path: &str) -> Option { + let path = Path::new(output_path); + + if !path.exists() { + return Some(output_path.to_string()); + } + + // File exists, ask user what to do + loop { + eprint!( + "File '{}' already exists. Overwrite? [y]es / [n]o / [r]ename: ", + output_path + ); + io::stderr().flush().ok(); + + let mut input = String::new(); + if io::stdin().read_line(&mut input).is_err() { + return None; + } + + let input = input.trim().to_lowercase(); + match input.as_str() { + "y" | "yes" => { + return Some(output_path.to_string()); + } + "n" | "no" => { + return None; + } + "r" | "rename" => { + // Generate a new filename + let new_name = generate_unique_filename(output_path); + eprintln!("Using: {}", new_name); + return Some(new_name); + } + _ => { + eprintln!("Please enter 'y', 'n', or 'r'"); + } + } + } +} + +/// Generate a unique filename by appending a number +fn generate_unique_filename(base_path: &str) -> String { + let path = Path::new(base_path); + let stem = path.file_stem().and_then(|s| s.to_str()).unwrap_or("duplicates"); + let ext = path.extension().and_then(|s| s.to_str()).unwrap_or("json"); + let parent = path.parent().and_then(|p| p.to_str()).unwrap_or(""); + + for i in 1..1000 { + let new_name = if parent.is_empty() { + format!("{}_{}.{}", stem, i, ext) + } else { + format!("{}/{}_{}.{}", parent, stem, i, ext) + }; + + if !Path::new(&new_name).exists() { + return new_name; + } + } + + // Fallback with timestamp + let timestamp = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .map(|d| d.as_secs()) + .unwrap_or(0); + + if parent.is_empty() { + format!("{}_{}.{}", stem, timestamp, ext) + } else { + format!("{}/{}_{}.{}", parent, stem, timestamp, ext) + } +} diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 000000000..bbfb852f4 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,36 @@ +use clap::Args; + +/// Configuration for connecting to Trustify API +#[derive(Args, Clone)] +pub struct Config { + /// Trustify API URL (required) + #[arg(short = 'u', long = "url", env = "TRUSTIFY_URL")] + pub url: String, + + /// SSO URL for authentication + #[arg(long = "sso-url", env = "TRUSTIFY_SSO_URL")] + pub sso_url: Option, + + /// OAuth2 Client ID + #[arg(long = "client-id", env = "TRUSTIFY_CLIENT_ID")] + pub client_id: Option, + + /// OAuth2 Client Secret + #[arg(long = "client-secret", env = "TRUSTIFY_CLIENT_SECRET")] + pub client_secret: Option, +} + +impl Config { + /// Returns true if authentication credentials are configured + pub fn has_auth(&self) -> bool { + self.sso_url.is_some() && self.client_id.is_some() && self.client_secret.is_some() + } + + /// Returns the auth credentials if all are present + pub fn auth_credentials(&self) -> Option<(&str, &str, &str)> { + match (&self.sso_url, &self.client_id, &self.client_secret) { + (Some(sso), Some(id), Some(secret)) => Some((sso.as_str(), id.as_str(), secret.as_str())), + _ => None, + } + } +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 000000000..dd5d26f6c --- /dev/null +++ b/src/main.rs @@ -0,0 +1,56 @@ +mod api; +mod auth; +mod cli; +mod commands; +mod config; + +use std::process; + +use clap::Parser; + +use api::ApiClient; +use cli::Cli; + +/// Runtime context containing config and API client +pub struct Context { + pub config: config::Config, + pub client: ApiClient, +} + +#[tokio::main] +async fn main() { + // Load .env file if present (silently ignore if not found) + let _ = dotenvy::dotenv(); + + let cli = Cli::parse(); + + // Attempt authentication if credentials are provided + let token = if let Some((sso_url, client_id, client_secret)) = cli.config.auth_credentials() { + let token_url = if sso_url.ends_with("/token") { + sso_url.to_string() + } else if sso_url.ends_with('/') { + format!("{}protocol/openid-connect/token", sso_url) + } else { + format!("{}/protocol/openid-connect/token", sso_url) + }; + match auth::get_token(&token_url, client_id, client_secret).await { + Ok(token) => Some(token), + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } + } else { + None + }; + + // Create API client + let client = ApiClient::new(&cli.config.url, token); + + let ctx = Context { + config: cli.config, + client, + }; + + cli.command.run(&ctx).await; +} From b79c9ca18463297fdebcd8a50fb8e7899d97c827 Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Mon, 12 Jan 2026 20:03:33 +0100 Subject: [PATCH 02/10] improve error handling and reauth Signed-off-by: Ruben Romero Montes Assisted-by: Cursor --- src/api/client.rs | 182 +++++++++++++++++++++++++++++++++++-------- src/api/sbom.rs | 149 +++++++++++++++++++++-------------- src/auth.rs | 15 ++-- src/commands/sbom.rs | 69 +++++++++------- src/config.rs | 4 +- src/main.rs | 48 +++++++----- 6 files changed, 325 insertions(+), 142 deletions(-) diff --git a/src/api/client.rs b/src/api/client.rs index e0910bd10..2538e2dd2 100644 --- a/src/api/client.rs +++ b/src/api/client.rs @@ -1,10 +1,20 @@ -use reqwest::{Client, RequestBuilder}; +use std::sync::Arc; +use std::time::Duration; + +use reqwest::{Client, RequestBuilder, StatusCode}; use thiserror::Error; +use tokio::sync::RwLock; +use tokio::time::sleep; + +use crate::auth; + +const MAX_RETRIES: u32 = 3; +const RETRY_DELAY_MS: u64 = 1000; -#[derive(Error, Debug)] +#[derive(Error, Debug, Clone)] pub enum ApiError { #[error("Request failed: {0}")] - RequestError(#[from] reqwest::Error), + RequestError(String), #[error("Not found: {0}")] NotFound(String), @@ -12,27 +22,59 @@ pub enum ApiError { #[error("Unauthorized: Please check your authentication credentials")] Unauthorized, + #[error("Token expired")] + TokenExpired, + + #[error("Server timeout - please retry")] + Timeout, + #[error("Server error: {0}")] ServerError(String), } -/// API client for Trustify +impl From for ApiError { + fn from(e: reqwest::Error) -> Self { + if e.is_timeout() { + ApiError::Timeout + } else { + ApiError::RequestError(e.to_string()) + } + } +} + +/// Authentication credentials for token refresh +#[derive(Clone)] +pub struct AuthCredentials { + pub token_url: String, + pub client_id: String, + pub client_secret: String, +} + +/// API client for Trustify with retry and token refresh support #[derive(Clone)] pub struct ApiClient { client: Client, base_url: String, - token: Option, + token: Arc>>, + auth_credentials: Option, } impl ApiClient { - pub fn new(base_url: &str, token: Option) -> Self { - // Normalize base URL (remove trailing slash) + pub fn new( + base_url: &str, + token: Option, + auth_credentials: Option, + ) -> Self { let base_url = base_url.trim_end_matches('/').to_string(); Self { - client: Client::new(), + client: Client::builder() + .timeout(Duration::from_secs(60)) + .build() + .unwrap_or_else(|_| Client::new()), base_url, - token, + token: Arc::new(RwLock::new(token)), + auth_credentials, } } @@ -42,42 +84,114 @@ impl ApiClient { } /// Add authorization header if token is present - fn authorize(&self, request: RequestBuilder) -> RequestBuilder { - match &self.token { - Some(token) => request.bearer_auth(token), + async fn authorize(&self, request: RequestBuilder) -> RequestBuilder { + let token = self.token.read().await; + match &*token { + Some(t) => request.bearer_auth(t), None => request, } } - /// Perform a GET request - pub async fn get(&self, path: &str) -> Result { - let url = self.url(path); - let request = self.client.get(&url); - let response = self.authorize(request).send().await?; + /// Refresh the token using stored credentials + async fn refresh_token(&self) -> Result<(), ApiError> { + let creds = self + .auth_credentials + .as_ref() + .ok_or(ApiError::Unauthorized)?; + + eprintln!("Token expired, refreshing..."); + + match auth::get_token(&creds.token_url, &creds.client_id, &creds.client_secret).await { + Ok(new_token) => { + let mut token = self.token.write().await; + *token = Some(new_token); + eprintln!("Token refreshed successfully"); + Ok(()) + } + Err(e) => { + eprintln!("Failed to refresh token: {}", e); + Err(ApiError::Unauthorized) + } + } + } - self.handle_response(response).await + /// Perform a GET request with retry logic + pub async fn get(&self, path: &str) -> Result { + self.execute_with_retry(|| async { + let url = self.url(path); + let request = self.client.get(&url); + let response = self.authorize(request).await.send().await?; + self.handle_response(response).await + }) + .await } - /// Perform a GET request with query parameters - pub async fn get_with_query( + /// Perform a GET request with query parameters and retry logic + pub async fn get_with_query( &self, path: &str, query: &T, ) -> Result { - let url = self.url(path); - let request = self.client.get(&url).query(query); - let response = self.authorize(request).send().await?; - - self.handle_response(response).await + self.execute_with_retry(|| async { + let url = self.url(path); + let request = self.client.get(&url).query(query); + let response = self.authorize(request).await.send().await?; + self.handle_response(response).await + }) + .await } - /// Perform a DELETE request + /// Perform a DELETE request with retry logic pub async fn delete(&self, path: &str) -> Result { - let url = self.url(path); - let request = self.client.delete(&url); - let response = self.authorize(request).send().await?; + self.execute_with_retry(|| async { + let url = self.url(path); + let request = self.client.delete(&url); + let response = self.authorize(request).await.send().await?; + self.handle_response(response).await + }) + .await + } + + /// Execute a request with retry logic for timeouts and token refresh + async fn execute_with_retry(&self, f: F) -> Result + where + F: Fn() -> Fut, + Fut: std::future::Future>, + { + let mut last_error = ApiError::RequestError("No attempts made".to_string()); + let mut token_refreshed = false; + + for attempt in 0..MAX_RETRIES { + match f().await { + Ok(result) => return Ok(result), + Err(ApiError::TokenExpired) => { + if !token_refreshed + && self.auth_credentials.is_some() + && self.refresh_token().await.is_ok() + { + token_refreshed = true; + continue; // Retry with new token + } + return Err(ApiError::Unauthorized); + } + Err(ApiError::Timeout) | Err(ApiError::ServerError(_)) + if attempt < MAX_RETRIES - 1 => + { + let delay = RETRY_DELAY_MS * (attempt as u64 + 1); + eprintln!( + "Request failed, retrying in {}ms... (attempt {}/{})", + delay, + attempt + 1, + MAX_RETRIES + ); + sleep(Duration::from_millis(delay)).await; + last_error = ApiError::Timeout; + } + Err(e) => return Err(e), + } + } - self.handle_response(response).await + Err(last_error) } async fn handle_response(&self, response: reqwest::Response) -> Result { @@ -85,10 +199,14 @@ impl ApiClient { if status.is_success() { Ok(response.text().await?) - } else if status.as_u16() == 404 { + } else if status == StatusCode::NOT_FOUND { Err(ApiError::NotFound("Resource not found".to_string())) - } else if status.as_u16() == 401 || status.as_u16() == 403 { + } else if status == StatusCode::UNAUTHORIZED { + Err(ApiError::TokenExpired) + } else if status == StatusCode::FORBIDDEN { Err(ApiError::Unauthorized) + } else if status == StatusCode::GATEWAY_TIMEOUT || status == StatusCode::REQUEST_TIMEOUT { + Err(ApiError::Timeout) } else { let body = response.text().await.unwrap_or_default(); Err(ApiError::ServerError(format!("HTTP {}: {}", status, body))) diff --git a/src/api/sbom.rs b/src/api/sbom.rs index 12b52ae7a..c531d8c4a 100644 --- a/src/api/sbom.rs +++ b/src/api/sbom.rs @@ -64,7 +64,11 @@ pub async fn list(client: &ApiClient, params: &ListParams) -> Result Result, ApiError> { +async fn fetch_page( + client: &ApiClient, + batch_size: u32, + offset: u32, +) -> Result, ApiError> { let list_params = ListParams { q: None, limit: Some(batch_size), @@ -73,9 +77,8 @@ async fn fetch_page(client: &ApiClient, batch_size: u32, offset: u32) -> Result< }; let response = list(client, &list_params).await?; - let parsed: Value = serde_json::from_str(&response).map_err(|e| { - ApiError::ServerError(format!("Failed to parse response: {}", e)) - })?; + let parsed: Value = serde_json::from_str(&response) + .map_err(|e| ApiError::ServerError(format!("Failed to parse response: {}", e)))?; let items = parsed .get("items") @@ -86,13 +89,23 @@ async fn fetch_page(client: &ApiClient, batch_size: u32, offset: u32) -> Result< .iter() .filter_map(|item| { let id = item.get("id").and_then(|v| v.as_str())?.to_string(); - let document_id = item.get("document_id").and_then(|v| v.as_str())?.to_string(); - let published = item.get("published").and_then(|v| v.as_str()).map(|s| s.to_string()); - + let document_id = item + .get("document_id") + .and_then(|v| v.as_str())? + .to_string(); + let published = item + .get("published") + .and_then(|v| v.as_str()) + .map(|s| s.to_string()); + if document_id.is_empty() { None } else { - Some(SbomEntry { id, document_id, published }) + Some(SbomEntry { + id, + document_id, + published, + }) } }) .collect(); @@ -110,7 +123,7 @@ async fn fetch_worker( results: Arc>>, ) { let mut fetched: u64 = 0; - + for offset in pages { match fetch_page(&client, batch_size, offset).await { Ok(entries) => { @@ -119,11 +132,14 @@ async fn fetch_worker( results.lock().await.extend(entries); } Err(e) => { - progress_bar.println(format!("Worker {}: Error at offset {}: {}", worker_id, offset, e)); + progress_bar.println(format!( + "Worker {}: Error at offset {}: {}", + worker_id, offset, e + )); } } } - + progress_bar.finish_with_message("done"); } @@ -137,21 +153,21 @@ pub async fn find_duplicates( let concurrency = params.concurrency; // First, get the total count - let first_page = list(client, &ListParams { - q: None, - limit: Some(1), - offset: Some(0), - sort: None, - }).await?; - - let parsed: Value = serde_json::from_str(&first_page).map_err(|e| { - ApiError::ServerError(format!("Failed to parse response: {}", e)) - })?; - - let total = parsed - .get("total") - .and_then(|v| v.as_u64()) - .unwrap_or(0) as u32; + let first_page = list( + client, + &ListParams { + q: None, + limit: Some(1), + offset: Some(0), + sort: None, + }, + ) + .await?; + + let parsed: Value = serde_json::from_str(&first_page) + .map_err(|e| ApiError::ServerError(format!("Failed to parse response: {}", e)))?; + + let total = parsed.get("total").and_then(|v| v.as_u64()).unwrap_or(0) as u32; if total == 0 { eprintln!("No SBOMs found"); @@ -171,12 +187,18 @@ pub async fn find_duplicates( } // Calculate how many SBOMs each worker will fetch - let worker_counts: Vec = worker_pages.iter().map(|pages| { - pages.iter().map(|&offset| { - let remaining = total.saturating_sub(offset); - remaining.min(batch_size) as u64 - }).sum() - }).collect(); + let worker_counts: Vec = worker_pages + .iter() + .map(|pages| { + pages + .iter() + .map(|&offset| { + let remaining = total.saturating_sub(offset); + remaining.min(batch_size) as u64 + }) + .sum() + }) + .collect(); // Set up progress bars let multi_progress = MultiProgress::new(); @@ -239,13 +261,11 @@ pub async fn find_duplicates( } // Sort by published date descending (most recent first) - entries.sort_by(|a, b| { - match (&b.published, &a.published) { - (Some(b_pub), Some(a_pub)) => b_pub.cmp(a_pub), - (Some(_), None) => std::cmp::Ordering::Less, - (None, Some(_)) => std::cmp::Ordering::Greater, - (None, None) => std::cmp::Ordering::Equal, - } + entries.sort_by(|a, b| match (&b.published, &a.published) { + (Some(b_pub), Some(a_pub)) => b_pub.cmp(a_pub), + (Some(_), None) => std::cmp::Ordering::Less, + (None, Some(_)) => std::cmp::Ordering::Greater, + (None, None) => std::cmp::Ordering::Equal, }); let most_recent = entries.remove(0); @@ -259,7 +279,10 @@ pub async fn find_duplicates( }); } - eprintln!("Found {} document(s) with duplicates", duplicate_groups.len()); + eprintln!( + "Found {} document(s) with duplicates", + duplicate_groups.len() + ); // Save to file let output_path = output_file @@ -267,17 +290,14 @@ pub async fn find_duplicates( .map(|s| s.as_str()) .unwrap_or("duplicates.json"); - let json = serde_json::to_string_pretty(&duplicate_groups).map_err(|e| { - ApiError::ServerError(format!("Failed to serialize results: {}", e)) - })?; + let json = serde_json::to_string_pretty(&duplicate_groups) + .map_err(|e| ApiError::ServerError(format!("Failed to serialize results: {}", e)))?; - let mut file = File::create(output_path).map_err(|e| { - ApiError::ServerError(format!("Failed to create output file: {}", e)) - })?; + let mut file = File::create(output_path) + .map_err(|e| ApiError::ServerError(format!("Failed to create output file: {}", e)))?; - file.write_all(json.as_bytes()).map_err(|e| { - ApiError::ServerError(format!("Failed to write to file: {}", e)) - })?; + file.write_all(json.as_bytes()) + .map_err(|e| ApiError::ServerError(format!("Failed to write to file: {}", e)))?; Ok(duplicate_groups) } @@ -292,6 +312,7 @@ pub async fn delete(client: &ApiClient, id: &str) -> Result<(), ApiError> { /// Result of deleting duplicates pub struct DeleteDuplicatesResult { pub deleted: u32, + pub skipped: u32, pub failed: u32, pub total: u32, } @@ -320,14 +341,12 @@ pub async fn delete_duplicates( } // Read and parse the file - let file = File::open(path).map_err(|e| { - ApiError::ServerError(format!("Failed to open input file: {}", e)) - })?; + let file = File::open(path) + .map_err(|e| ApiError::ServerError(format!("Failed to open input file: {}", e)))?; let reader = BufReader::new(file); - let groups: Vec = serde_json::from_reader(reader).map_err(|e| { - ApiError::ServerError(format!("Failed to parse input file: {}", e)) - })?; + let groups: Vec = serde_json::from_reader(reader) + .map_err(|e| ApiError::ServerError(format!("Failed to parse input file: {}", e)))?; // Collect all duplicate entries to delete let entries: Vec = groups @@ -344,16 +363,23 @@ pub async fn delete_duplicates( if dry_run { for entry in &entries { - eprintln!("[DRY-RUN] Would delete: {} (document_id: {})", entry.id, entry.document_id); + eprintln!( + "[DRY-RUN] Would delete: {} (document_id: {})", + entry.id, entry.document_id + ); } return Ok(DeleteDuplicatesResult { deleted: 0, + skipped: 0, failed: 0, total, }); } - eprintln!("Deleting {} duplicates with {} concurrent requests...\n", total, concurrency); + eprintln!( + "Deleting {} duplicates with {} concurrent requests...\n", + total, concurrency + ); // Set up progress bar let progress = ProgressBar::new(total as u64); @@ -361,16 +387,18 @@ pub async fn delete_duplicates( ProgressStyle::default_bar() .template("{spinner:.green} [{bar:40.cyan/blue}] {pos}/{len} ({percent}%) {msg}") .unwrap() - .progress_chars("█▓░") + .progress_chars("█▓░"), ); let deleted = Arc::new(AtomicU32::new(0)); + let skipped = Arc::new(AtomicU32::new(0)); let failed = Arc::new(AtomicU32::new(0)); stream::iter(entries) .for_each_concurrent(concurrency, |entry| { let client = client.clone(); let deleted = Arc::clone(&deleted); + let skipped = Arc::clone(&skipped); let failed = Arc::clone(&failed); let progress = progress.clone(); async move { @@ -378,6 +406,10 @@ pub async fn delete_duplicates( Ok(_) => { deleted.fetch_add(1, Ordering::Relaxed); } + Err(ApiError::NotFound(_)) => { + // SBOM already deleted or doesn't exist - skip silently + skipped.fetch_add(1, Ordering::Relaxed); + } Err(_) => { failed.fetch_add(1, Ordering::Relaxed); } @@ -391,6 +423,7 @@ pub async fn delete_duplicates( Ok(DeleteDuplicatesResult { deleted: deleted.load(Ordering::Relaxed), + skipped: skipped.load(Ordering::Relaxed), failed: failed.load(Ordering::Relaxed), total, }) diff --git a/src/auth.rs b/src/auth.rs index 1fe5370a3..e7c2396fd 100644 --- a/src/auth.rs +++ b/src/auth.rs @@ -30,7 +30,11 @@ struct ErrorResponse { } /// Retrieves an OAuth2 access token using client credentials grant -pub async fn get_token(token_url: &str, client_id: &str, client_secret: &str) -> Result { +pub async fn get_token( + token_url: &str, + client_id: &str, + client_secret: &str, +) -> Result { let client = Client::new(); let response = client @@ -49,7 +53,9 @@ pub async fn get_token(token_url: &str, client_id: &str, client_secret: &str) -> } else if response.status().as_u16() == 401 || response.status().as_u16() == 400 { // Try to get error details if let Ok(error_response) = response.json::().await { - if error_response.error == "invalid_client" || error_response.error == "unauthorized_client" { + if error_response.error == "invalid_client" + || error_response.error == "unauthorized_client" + { return Err(AuthError::AuthenticationFailed); } let msg = error_response @@ -61,9 +67,6 @@ pub async fn get_token(token_url: &str, client_id: &str, client_secret: &str) -> } else { let status = response.status(); let body = response.text().await.unwrap_or_default(); - Err(AuthError::ServerError(format!( - "HTTP {}: {}", - status, body - ))) + Err(AuthError::ServerError(format!("HTTP {}: {}", status, body))) } } diff --git a/src/commands/sbom.rs b/src/commands/sbom.rs index 1ab27767e..cb79d51d9 100644 --- a/src/commands/sbom.rs +++ b/src/commands/sbom.rs @@ -107,15 +107,13 @@ impl SbomCommands { SbomCommands::Duplicates { command } => { command.run(ctx).await; } - SbomCommands::Get { id } => { - match sbom_api::get(&ctx.client, id).await { - Ok(json) => println!("{}", json), - Err(e) => { - eprintln!("Error: {}", e); - process::exit(1); - } + SbomCommands::Get { id } => match sbom_api::get(&ctx.client, id).await { + Ok(json) => println!("{}", json), + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); } - } + }, SbomCommands::List { query, limit, @@ -139,11 +137,7 @@ impl SbomCommands { } } } - SbomCommands::Delete { - id, - query, - dry_run, - } => { + SbomCommands::Delete { id, query, dry_run } => { println!( "SBOM delete command executed successfully!{}", if *dry_run { " (dry-run)" } else { "" } @@ -162,9 +156,16 @@ impl SbomCommands { impl DuplicatesCommands { pub async fn run(&self, ctx: &Context) { match self { - DuplicatesCommands::Find { batch_size, concurrency, output } => { - let output_path = output.as_ref().map(|s| s.as_str()).unwrap_or("duplicates.json"); - + DuplicatesCommands::Find { + batch_size, + concurrency, + output, + } => { + let output_path = output + .as_ref() + .map(|s| s.as_str()) + .unwrap_or("duplicates.json"); + // Check if output file exists let final_output = check_output_file(output_path); if final_output.is_none() { @@ -177,9 +178,12 @@ impl DuplicatesCommands { batch_size: *batch_size, concurrency: *concurrency, }; - match sbom_api::find_duplicates(&ctx.client, ¶ms, &Some(final_output.clone())).await { + match sbom_api::find_duplicates(&ctx.client, ¶ms, &Some(final_output.clone())) + .await + { Ok(groups) => { - let total_duplicates: usize = groups.iter().map(|g| g.duplicates.len()).sum(); + let total_duplicates: usize = + groups.iter().map(|g| g.duplicates.len()).sum(); println!( "Found {} document(s) with {} duplicate(s). Saved to {}", groups.len(), @@ -198,17 +202,27 @@ impl DuplicatesCommands { concurrency, dry_run, } => { - let input_path = input.as_ref().map(|s| s.as_str()).unwrap_or("duplicates.json"); + let input_path = input + .as_ref() + .map(|s| s.as_str()) + .unwrap_or("duplicates.json"); - match sbom_api::delete_duplicates(&ctx.client, input_path, *concurrency, *dry_run).await { + match sbom_api::delete_duplicates(&ctx.client, input_path, *concurrency, *dry_run) + .await + { Ok(result) => { if *dry_run { println!("[DRY-RUN] Would delete {} duplicate(s)", result.total); } else { - println!( - "Deleted {} duplicate(s), {} failed out of {} total", - result.deleted, result.failed, result.total - ); + let mut msg = format!("Deleted {} duplicate(s)", result.deleted); + if result.skipped > 0 { + msg.push_str(&format!(", {} skipped (not found)", result.skipped)); + } + if result.failed > 0 { + msg.push_str(&format!(", {} failed", result.failed)); + } + msg.push_str(&format!(" out of {} total", result.total)); + println!("{}", msg); } } Err(e) => { @@ -288,7 +302,7 @@ fn format_list_output(json: &str, format: &ListFormat) { /// Returns None if user cancels, Some(path) with the final path to use fn check_output_file(output_path: &str) -> Option { let path = Path::new(output_path); - + if !path.exists() { return Some(output_path.to_string()); } @@ -330,7 +344,10 @@ fn check_output_file(output_path: &str) -> Option { /// Generate a unique filename by appending a number fn generate_unique_filename(base_path: &str) -> String { let path = Path::new(base_path); - let stem = path.file_stem().and_then(|s| s.to_str()).unwrap_or("duplicates"); + let stem = path + .file_stem() + .and_then(|s| s.to_str()) + .unwrap_or("duplicates"); let ext = path.extension().and_then(|s| s.to_str()).unwrap_or("json"); let parent = path.parent().and_then(|p| p.to_str()).unwrap_or(""); diff --git a/src/config.rs b/src/config.rs index bbfb852f4..b11e299a8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -29,7 +29,9 @@ impl Config { /// Returns the auth credentials if all are present pub fn auth_credentials(&self) -> Option<(&str, &str, &str)> { match (&self.sso_url, &self.client_id, &self.client_secret) { - (Some(sso), Some(id), Some(secret)) => Some((sso.as_str(), id.as_str(), secret.as_str())), + (Some(sso), Some(id), Some(secret)) => { + Some((sso.as_str(), id.as_str(), secret.as_str())) + } _ => None, } } diff --git a/src/main.rs b/src/main.rs index dd5d26f6c..603fe230f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,6 +8,7 @@ use std::process; use clap::Parser; +use api::client::AuthCredentials; use api::ApiClient; use cli::Cli; @@ -24,28 +25,37 @@ async fn main() { let cli = Cli::parse(); - // Attempt authentication if credentials are provided - let token = if let Some((sso_url, client_id, client_secret)) = cli.config.auth_credentials() { - let token_url = if sso_url.ends_with("/token") { - sso_url.to_string() - } else if sso_url.ends_with('/') { - format!("{}protocol/openid-connect/token", sso_url) + // Build auth credentials and get initial token if configured + let (token, auth_credentials) = + if let Some((sso_url, client_id, client_secret)) = cli.config.auth_credentials() { + let token_url = if sso_url.ends_with("/token") { + sso_url.to_string() + } else if sso_url.ends_with('/') { + format!("{}protocol/openid-connect/token", sso_url) + } else { + format!("{}/protocol/openid-connect/token", sso_url) + }; + + // Store credentials for token refresh + let creds = AuthCredentials { + token_url: token_url.clone(), + client_id: client_id.to_string(), + client_secret: client_secret.to_string(), + }; + + match auth::get_token(&token_url, client_id, client_secret).await { + Ok(token) => (Some(token), Some(creds)), + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } } else { - format!("{}/protocol/openid-connect/token", sso_url) + (None, None) }; - match auth::get_token(&token_url, client_id, client_secret).await { - Ok(token) => Some(token), - Err(e) => { - eprintln!("Error: {}", e); - process::exit(1); - } - } - } else { - None - }; - // Create API client - let client = ApiClient::new(&cli.config.url, token); + // Create API client with auth credentials for token refresh + let client = ApiClient::new(&cli.config.url, token, auth_credentials); let ctx = Context { config: cli.config, From b8ef6a017c02947fc5f9a75139e617e861308d2f Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Mon, 12 Jan 2026 21:51:26 +0100 Subject: [PATCH 03/10] chore: publish container image Signed-off-by: Ruben Romero Montes Assisted-by: Cursor --- .dockerignore | 9 ++++ .github/workflows/container-image.yml | 62 +++++++++++++++++++++++++++ Dockerfile | 31 ++++++++++++++ README.md | 35 +++++++++++++++ src/api/client.rs | 52 ++++++++++++++-------- src/api/sbom.rs | 26 ++++++----- 6 files changed, 187 insertions(+), 28 deletions(-) create mode 100644 .dockerignore create mode 100644 .github/workflows/container-image.yml create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..7015f3a69 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +target/ +.git/ +.gitignore +*.md +LICENSE +Dockerfile +.dockerignore +.env +duplicates.json diff --git a/.github/workflows/container-image.yml b/.github/workflows/container-image.yml new file mode 100644 index 000000000..91ae026a3 --- /dev/null +++ b/.github/workflows/container-image.yml @@ -0,0 +1,62 @@ +name: Build and Push Container Image + +on: + push: + branches: + - main + tags: + - 'v*' + pull_request: + branches: + - main + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha,prefix= + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..d347217e9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +# Build stage +FROM rust:1.83-alpine AS builder + +# Install musl-dev for static linking +RUN apk add --no-cache musl-dev + +WORKDIR /app + +# Copy manifests first for better layer caching +COPY Cargo.toml Cargo.lock ./ + +# Create a dummy main.rs to build dependencies +RUN mkdir src && echo "fn main() {}" > src/main.rs + +# Build dependencies only (this layer will be cached) +RUN cargo build --release && rm -rf src + +# Copy actual source code +COPY src ./src + +# Build the actual binary (touch to update mtime so cargo rebuilds) +RUN touch src/main.rs && cargo build --release + +# Runtime stage - use minimal distroless image +FROM gcr.io/distroless/static-debian12:nonroot + +# Copy the binary from builder +COPY --from=builder /app/target/release/trustify /usr/local/bin/trustify + +# Set the entrypoint +ENTRYPOINT ["trustify"] diff --git a/README.md b/README.md index 7448c32e5..e7d8c0256 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,41 @@ cargo build --release # The binary will be at ./target/release/trustify ``` +### Using Docker + +Pull and run the pre-built image: + +```bash +# Run with environment variables +docker run --rm \ + -e TRUSTIFY_URL=https://trustify.example.com \ + -e TRUSTIFY_SSO_URL=https://sso.example.com/realms/trustify \ + -e TRUSTIFY_CLIENT_ID=my-client \ + -e TRUSTIFY_CLIENT_SECRET=my-secret \ + ghcr.io/ruromero/trustify-cli sbom list + +# Or use an env file +docker run --rm --env-file .env ghcr.io/ruromero/trustify-cli sbom list + +# Mount a volume to save/load files (e.g., duplicates.json) +docker run --rm --env-file .env \ + -v $(pwd):/data \ + ghcr.io/ruromero/trustify-cli sbom duplicates find --output /data/duplicates.json +``` + +### Build Docker Image Locally + +```bash +# Clone and build +git clone https://github.com/ruromero/trustify-cli.git +cd trustify-cli + +docker build -t trustify-cli . + +# Run +docker run --rm --env-file .env trustify-cli sbom list +``` + ## Configuration The CLI can be configured using command-line arguments, environment variables, or a `.env` file. diff --git a/src/api/client.rs b/src/api/client.rs index 2538e2dd2..f4a0afeb7 100644 --- a/src/api/client.rs +++ b/src/api/client.rs @@ -13,31 +13,41 @@ const RETRY_DELAY_MS: u64 = 1000; #[derive(Error, Debug, Clone)] pub enum ApiError { - #[error("Request failed: {0}")] - RequestError(String), + #[error("Network error: {0}")] + NetworkError(String), - #[error("Not found: {0}")] + #[error("HTTP {0}: {1}")] + HttpError(u16, String), + + #[error("HTTP 404: Resource not found")] NotFound(String), - #[error("Unauthorized: Please check your authentication credentials")] + #[error("HTTP 401: Please check your authentication credentials")] Unauthorized, - #[error("Token expired")] + #[error("HTTP 401: Token expired")] TokenExpired, - #[error("Server timeout - please retry")] - Timeout, + #[error("HTTP {0}: Server timeout")] + Timeout(u16), + + #[error("HTTP {0}: {1}")] + ServerError(u16, String), - #[error("Server error: {0}")] - ServerError(String), + #[error("{0}")] + InternalError(String), } impl From for ApiError { fn from(e: reqwest::Error) -> Self { if e.is_timeout() { - ApiError::Timeout + ApiError::Timeout(0) // 0 indicates network-level timeout (no HTTP response) + } else if e.is_connect() { + ApiError::NetworkError(format!("Connection failed: {}", e)) + } else if e.is_request() { + ApiError::NetworkError(format!("Request error: {}", e)) } else { - ApiError::RequestError(e.to_string()) + ApiError::NetworkError(e.to_string()) } } } @@ -158,7 +168,7 @@ impl ApiClient { F: Fn() -> Fut, Fut: std::future::Future>, { - let mut last_error = ApiError::RequestError("No attempts made".to_string()); + let mut last_error = ApiError::NetworkError("No attempts made".to_string()); let mut token_refreshed = false; for attempt in 0..MAX_RETRIES { @@ -174,18 +184,21 @@ impl ApiClient { } return Err(ApiError::Unauthorized); } - Err(ApiError::Timeout) | Err(ApiError::ServerError(_)) + Err(ref e @ ApiError::Timeout(_)) + | Err(ref e @ ApiError::ServerError(_, _)) + | Err(ref e @ ApiError::NetworkError(_)) if attempt < MAX_RETRIES - 1 => { let delay = RETRY_DELAY_MS * (attempt as u64 + 1); eprintln!( - "Request failed, retrying in {}ms... (attempt {}/{})", + "{}, retrying in {}ms... (attempt {}/{})", + e, delay, attempt + 1, MAX_RETRIES ); sleep(Duration::from_millis(delay)).await; - last_error = ApiError::Timeout; + last_error = e.clone(); } Err(e) => return Err(e), } @@ -196,6 +209,7 @@ impl ApiClient { async fn handle_response(&self, response: reqwest::Response) -> Result { let status = response.status(); + let status_code = status.as_u16(); if status.is_success() { Ok(response.text().await?) @@ -206,10 +220,14 @@ impl ApiClient { } else if status == StatusCode::FORBIDDEN { Err(ApiError::Unauthorized) } else if status == StatusCode::GATEWAY_TIMEOUT || status == StatusCode::REQUEST_TIMEOUT { - Err(ApiError::Timeout) + Err(ApiError::Timeout(status_code)) } else { let body = response.text().await.unwrap_or_default(); - Err(ApiError::ServerError(format!("HTTP {}: {}", status, body))) + if status.is_server_error() { + Err(ApiError::ServerError(status_code, body)) + } else { + Err(ApiError::HttpError(status_code, body)) + } } } } diff --git a/src/api/sbom.rs b/src/api/sbom.rs index c531d8c4a..57d490543 100644 --- a/src/api/sbom.rs +++ b/src/api/sbom.rs @@ -78,12 +78,12 @@ async fn fetch_page( let response = list(client, &list_params).await?; let parsed: Value = serde_json::from_str(&response) - .map_err(|e| ApiError::ServerError(format!("Failed to parse response: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to parse response: {}", e)))?; let items = parsed .get("items") .and_then(|v| v.as_array()) - .ok_or_else(|| ApiError::ServerError("No items in response".to_string()))?; + .ok_or_else(|| ApiError::InternalError("No items in response".to_string()))?; let entries: Vec = items .iter() @@ -165,7 +165,7 @@ pub async fn find_duplicates( .await?; let parsed: Value = serde_json::from_str(&first_page) - .map_err(|e| ApiError::ServerError(format!("Failed to parse response: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to parse response: {}", e)))?; let total = parsed.get("total").and_then(|v| v.as_u64()).unwrap_or(0) as u32; @@ -238,7 +238,7 @@ pub async fn find_duplicates( join_all(handles).await; let all_entries = Arc::try_unwrap(results) - .map_err(|_| ApiError::ServerError("Failed to unwrap entries".to_string()))? + .map_err(|_| ApiError::InternalError("Failed to unwrap entries".to_string()))? .into_inner(); eprintln!("\nProcessing {} SBOMs for duplicates...", all_entries.len()); @@ -291,13 +291,13 @@ pub async fn find_duplicates( .unwrap_or("duplicates.json"); let json = serde_json::to_string_pretty(&duplicate_groups) - .map_err(|e| ApiError::ServerError(format!("Failed to serialize results: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to serialize results: {}", e)))?; let mut file = File::create(output_path) - .map_err(|e| ApiError::ServerError(format!("Failed to create output file: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to create output file: {}", e)))?; file.write_all(json.as_bytes()) - .map_err(|e| ApiError::ServerError(format!("Failed to write to file: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to write to file: {}", e)))?; Ok(duplicate_groups) } @@ -334,7 +334,7 @@ pub async fn delete_duplicates( // Check if file exists let path = Path::new(input_file); if !path.exists() { - return Err(ApiError::ServerError(format!( + return Err(ApiError::InternalError(format!( "Input file not found: {}", input_file ))); @@ -342,11 +342,11 @@ pub async fn delete_duplicates( // Read and parse the file let file = File::open(path) - .map_err(|e| ApiError::ServerError(format!("Failed to open input file: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to open input file: {}", e)))?; let reader = BufReader::new(file); let groups: Vec = serde_json::from_reader(reader) - .map_err(|e| ApiError::ServerError(format!("Failed to parse input file: {}", e)))?; + .map_err(|e| ApiError::InternalError(format!("Failed to parse input file: {}", e)))?; // Collect all duplicate entries to delete let entries: Vec = groups @@ -410,8 +410,12 @@ pub async fn delete_duplicates( // SBOM already deleted or doesn't exist - skip silently skipped.fetch_add(1, Ordering::Relaxed); } - Err(_) => { + Err(e) => { failed.fetch_add(1, Ordering::Relaxed); + progress.println(format!( + "Failed to delete {} (document_id: {}): {}", + entry.id, entry.document_id, e + )); } } progress.inc(1); From 47dc5538bbe709fc2919968ba5b0cc68b11b3066 Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Mon, 12 Jan 2026 22:05:31 +0100 Subject: [PATCH 04/10] docs: update readme Signed-off-by: Ruben Romero Montes --- .gitignore | 2 +- README.md | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2da936e32..a0808ee7b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ /target .env -duplicates.json +duplicates-*.json diff --git a/README.md b/README.md index e7d8c0256..d2d32e611 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,12 @@ # Trustify CLI -A command-line interface for interacting with the [Trustify](https://github.com/trustification/trustify) Software Supply-Chain Security API. +A command-line interface for interacting with the [Trustify](https://github.com/guacsec/trustify) API. ## Features - 🔐 OAuth2 authentication (client credentials) - 📦 SBOM management (list, get, delete) - 🔍 Duplicate detection and cleanup -- ⚡ Concurrent operations for fast bulk processing -- 🌍 Environment variable and `.env` file support ## Installation From 2d7d2d65132173b58ed198790a47f2a8fc4f92e1 Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Tue, 13 Jan 2026 10:05:01 +0100 Subject: [PATCH 05/10] feat: add auth token command Signed-off-by: Ruben Romero Montes Assisted-by: Cursor --- README.md | 27 ++++++++++++++++++++++++++- src/{ => api}/auth.rs | 36 ++++++++++++++++++++++++++++++++++++ src/api/client.rs | 12 +++--------- src/api/mod.rs | 2 +- src/commands/auth.rs | 36 ++++++++++++++++++++++++++++++++++++ src/commands/mod.rs | 9 +++++++++ src/main.rs | 20 +++----------------- 7 files changed, 114 insertions(+), 28 deletions(-) rename src/{ => api}/auth.rs (66%) create mode 100644 src/commands/auth.rs diff --git a/README.md b/README.md index d2d32e611..8e5bf04a1 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,10 @@ A command-line interface for interacting with the [Trustify](https://github.com/ ## Features -- 🔐 OAuth2 authentication (client credentials) +- 🔐 OAuth2 authentication (client credentials) with token retrieval - 📦 SBOM management (list, get, delete) - 🔍 Duplicate detection and cleanup +- ⚡ Concurrent operations with automatic retry and token refresh ## Installation @@ -135,6 +136,30 @@ trustify -u http://localhost:8080 \ --- +### `auth token` + +Retrieve an OAuth2 access token using the configured credentials. Useful for debugging authentication or using the token with other tools. + +```bash +trustify -u http://localhost:8080 \ + --sso-url http://sso.example.com/realms/trustify \ + --client-id my-client \ + --client-secret my-secret \ + auth token +``` + +**Output:** The access token string (can be used as a Bearer token) + +**Example with curl:** + +```bash +# Get token and use with curl +TOKEN=$(trustify auth token) +curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/v2/sbom +``` + +--- + ### `sbom get ` Get an SBOM by its ID. Returns the full JSON document. diff --git a/src/auth.rs b/src/api/auth.rs similarity index 66% rename from src/auth.rs rename to src/api/auth.rs index e7c2396fd..79199ca66 100644 --- a/src/auth.rs +++ b/src/api/auth.rs @@ -14,6 +14,42 @@ pub enum AuthError { ServerError(String), } +/// Authentication credentials for token refresh +#[derive(Clone)] +pub struct AuthCredentials { + pub token_url: String, + pub client_id: String, + pub client_secret: String, +} + +impl AuthCredentials { + /// Build credentials from SSO URL and client credentials + pub fn new(sso_url: &str, client_id: &str, client_secret: &str) -> Self { + let token_url = build_token_url(sso_url); + Self { + token_url, + client_id: client_id.to_string(), + client_secret: client_secret.to_string(), + } + } + + /// Get a token using these credentials + pub async fn get_token(&self) -> Result { + get_token(&self.token_url, &self.client_id, &self.client_secret).await + } +} + +/// Build the token URL from an SSO base URL +pub fn build_token_url(sso_url: &str) -> String { + if sso_url.ends_with("/token") { + sso_url.to_string() + } else if sso_url.ends_with('/') { + format!("{}protocol/openid-connect/token", sso_url) + } else { + format!("{}/protocol/openid-connect/token", sso_url) + } +} + #[derive(Deserialize)] struct TokenResponse { access_token: String, diff --git a/src/api/client.rs b/src/api/client.rs index f4a0afeb7..d06704d0f 100644 --- a/src/api/client.rs +++ b/src/api/client.rs @@ -6,7 +6,6 @@ use thiserror::Error; use tokio::sync::RwLock; use tokio::time::sleep; -use crate::auth; const MAX_RETRIES: u32 = 3; const RETRY_DELAY_MS: u64 = 1000; @@ -52,13 +51,8 @@ impl From for ApiError { } } -/// Authentication credentials for token refresh -#[derive(Clone)] -pub struct AuthCredentials { - pub token_url: String, - pub client_id: String, - pub client_secret: String, -} +// Re-export AuthCredentials from auth module +pub use super::auth::AuthCredentials; /// API client for Trustify with retry and token refresh support #[derive(Clone)] @@ -111,7 +105,7 @@ impl ApiClient { eprintln!("Token expired, refreshing..."); - match auth::get_token(&creds.token_url, &creds.client_id, &creds.client_secret).await { + match creds.get_token().await { Ok(new_token) => { let mut token = self.token.write().await; *token = Some(new_token); diff --git a/src/api/mod.rs b/src/api/mod.rs index 40637dfd2..666dc0fd0 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -1,4 +1,4 @@ pub mod client; pub mod sbom; - +pub mod auth; pub use client::ApiClient; diff --git a/src/commands/auth.rs b/src/commands/auth.rs new file mode 100644 index 000000000..7ca608fb5 --- /dev/null +++ b/src/commands/auth.rs @@ -0,0 +1,36 @@ +use clap::Subcommand; + +use std::process; +use crate::Context; +use crate::api::auth::AuthCredentials; + +#[derive(Subcommand)] +pub enum AuthCommands { + /// Get authentication token + Token {}, +} + +impl AuthCommands { + pub async fn run(&self, ctx: &Context) { + match self { + AuthCommands::Token {} => { + match ctx.config.auth_credentials() { + Some((token_url, client_id, client_secret)) => { + let creds = AuthCredentials::new(token_url, client_id, client_secret); + match creds.get_token().await { + Ok(token) => println!("{}", token), + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); + } + } + } + None => { + eprintln!("Error: SSO URL, client ID, and client secret are all required"); + process::exit(1); + } + } + } + } + } +} diff --git a/src/commands/mod.rs b/src/commands/mod.rs index 2164b8d78..74fd2746f 100644 --- a/src/commands/mod.rs +++ b/src/commands/mod.rs @@ -1,9 +1,11 @@ pub mod sbom; +pub mod auth; use clap::Subcommand; use crate::Context; pub use sbom::SbomCommands; +pub use auth::AuthCommands; #[derive(Subcommand)] pub enum Commands { @@ -12,12 +14,19 @@ pub enum Commands { #[command(subcommand)] command: SbomCommands, }, + + /// Authentication commands + Auth { + #[command(subcommand)] + command: AuthCommands, + }, } impl Commands { pub async fn run(&self, ctx: &Context) { match self { Commands::Sbom { command } => command.run(ctx).await, + Commands::Auth { command } => command.run(ctx).await, } } } diff --git a/src/main.rs b/src/main.rs index 603fe230f..560c2946b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ mod api; -mod auth; mod cli; mod commands; mod config; @@ -8,7 +7,7 @@ use std::process; use clap::Parser; -use api::client::AuthCredentials; +use api::auth::AuthCredentials; use api::ApiClient; use cli::Cli; @@ -28,22 +27,9 @@ async fn main() { // Build auth credentials and get initial token if configured let (token, auth_credentials) = if let Some((sso_url, client_id, client_secret)) = cli.config.auth_credentials() { - let token_url = if sso_url.ends_with("/token") { - sso_url.to_string() - } else if sso_url.ends_with('/') { - format!("{}protocol/openid-connect/token", sso_url) - } else { - format!("{}/protocol/openid-connect/token", sso_url) - }; + let creds = AuthCredentials::new(sso_url, client_id, client_secret); - // Store credentials for token refresh - let creds = AuthCredentials { - token_url: token_url.clone(), - client_id: client_id.to_string(), - client_secret: client_secret.to_string(), - }; - - match auth::get_token(&token_url, client_id, client_secret).await { + match creds.get_token().await { Ok(token) => (Some(token), Some(creds)), Err(e) => { eprintln!("Error: {}", e); From b9d149b0cd10f13b2fbfe4fd017d865c6d3757a2 Mon Sep 17 00:00:00 2001 From: Ruben Romero Montes Date: Tue, 13 Jan 2026 10:48:33 +0100 Subject: [PATCH 06/10] docs: add index and simpler commands Signed-off-by: Ruben Romero Montes Assisted-by: Cursor --- README.md | 322 +++++++++++++----------------------------------------- 1 file changed, 76 insertions(+), 246 deletions(-) diff --git a/README.md b/README.md index 8e5bf04a1..5a6ec0e23 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,50 @@ # Trustify CLI -A command-line interface for interacting with the [Trustify](https://github.com/guacsec/trustify) API. +A command-line tool for interacting with the [Trustify API](https://github.com/guacsec/trustify). Built for DevSecOps teams who need to keep their software supply chain clean and organized. + +## Quick Start + +```bash +# Set up your credentials once +cat > .env << EOF +TRUSTIFY_URL=https://trustify.example.com +TRUSTIFY_SSO_URL=https://sso.example.com/realms/trustify +TRUSTIFY_CLIENT_ID=my-client +TRUSTIFY_CLIENT_SECRET=my-secret +EOF + +# Find all duplicate SBOMs (same document_id, different versions) +trustify sbom duplicates find + +# Preview what would be deleted +trustify sbom duplicates delete --dry-run + +# Clean them up! +trustify sbom duplicates delete +``` + +**Result:** Thousands of duplicate SBOMs cleaned up in seconds with concurrent API requests and automatic retry handling. ## Features -- 🔐 OAuth2 authentication (client credentials) with token retrieval -- 📦 SBOM management (list, get, delete) -- 🔍 Duplicate detection and cleanup -- ⚡ Concurrent operations with automatic retry and token refresh +- 🔍 **Duplicate detection** — Find and remove duplicate SBOMs by document ID +- 🔐 **Seamless auth** — OAuth2 with automatic token refresh +- 🔄 **Resilient** — Auto-retry on timeouts and transient failures +- 📦 **SBOM management** — List, get, and delete with flexible output formats + +## Index + +- [Installation](#installation) +- [Configuration](#configuration) +- [Commands](#commands) + - [`auth token`](#auth-token) + - [`sbom list`](#sbom-list) + - [`sbom get`](#sbom-get-id) + - [`sbom delete`](#sbom-delete) + - [`sbom duplicates find`](#sbom-duplicates-find) + - [`sbom duplicates delete`](#sbom-duplicates-delete) +- [API Reference](#api-reference) +- [License](#license) ## Installation @@ -26,100 +63,29 @@ cargo build --release ### Using Docker -Pull and run the pre-built image: - ```bash -# Run with environment variables -docker run --rm \ - -e TRUSTIFY_URL=https://trustify.example.com \ - -e TRUSTIFY_SSO_URL=https://sso.example.com/realms/trustify \ - -e TRUSTIFY_CLIENT_ID=my-client \ - -e TRUSTIFY_CLIENT_SECRET=my-secret \ - ghcr.io/ruromero/trustify-cli sbom list - -# Or use an env file +# Use your .env file with the container docker run --rm --env-file .env ghcr.io/ruromero/trustify-cli sbom list -# Mount a volume to save/load files (e.g., duplicates.json) -docker run --rm --env-file .env \ - -v $(pwd):/data \ +# For commands that write files, mount a volume +docker run --rm --env-file .env -v $(pwd):/data \ ghcr.io/ruromero/trustify-cli sbom duplicates find --output /data/duplicates.json ``` -### Build Docker Image Locally - -```bash -# Clone and build -git clone https://github.com/ruromero/trustify-cli.git -cd trustify-cli - -docker build -t trustify-cli . - -# Run -docker run --rm --env-file .env trustify-cli sbom list -``` - ## Configuration -The CLI can be configured using command-line arguments, environment variables, or a `.env` file. - -### Configuration Options - -| CLI Argument | Environment Variable | Required | Description | -|--------------|---------------------|----------|-------------| -| `-u, --url` | `TRUSTIFY_URL` | ✅ Yes | Trustify API URL | -| `--sso-url` | `TRUSTIFY_SSO_URL` | No | SSO/Keycloak URL for authentication | -| `--client-id` | `TRUSTIFY_CLIENT_ID` | No | OAuth2 Client ID | -| `--client-secret` | `TRUSTIFY_CLIENT_SECRET` | No | OAuth2 Client Secret | - -### Using Environment Variables - -```bash -export TRUSTIFY_URL=http://localhost:8080 -export TRUSTIFY_SSO_URL=http://sso.example.com/realms/trustify -export TRUSTIFY_CLIENT_ID=my-client -export TRUSTIFY_CLIENT_SECRET=my-secret - -trustify sbom list -``` - -### Using a `.env` File - Create a `.env` file in your working directory: ```env -TRUSTIFY_URL=http://localhost:8080 -TRUSTIFY_SSO_URL=http://sso.example.com/realms/trustify +TRUSTIFY_URL=https://trustify.example.com +TRUSTIFY_SSO_URL=https://sso.example.com/realms/trustify TRUSTIFY_CLIENT_ID=my-client TRUSTIFY_CLIENT_SECRET=my-secret ``` -Then simply run: - -```bash -trustify sbom list -``` - -### Configuration Priority - -1. **CLI arguments** (highest priority) -2. **Shell environment variables** -3. **`.env` file** (lowest priority) - -## Authentication - -When `--sso-url`, `--client-id`, and `--client-secret` are all provided, the CLI automatically obtains an OAuth2 token using the client credentials grant before making API requests. +That's it! The CLI automatically loads credentials and handles OAuth2 token management. -The SSO URL should point to your Keycloak realm. The CLI automatically appends `/protocol/openid-connect/token` if needed. - -```bash -# Full authentication example -trustify -u http://localhost:8080 \ - --sso-url http://sso.example.com/realms/trustify \ - --client-id my-client \ - --client-secret my-secret \ - sbom list -``` +> **Tip:** You can also use CLI arguments (`-u`, `--sso-url`, etc.) or shell environment variables. CLI args take priority over env vars, which take priority over `.env` files. ## Commands @@ -138,221 +104,85 @@ trustify -u http://localhost:8080 \ ### `auth token` -Retrieve an OAuth2 access token using the configured credentials. Useful for debugging authentication or using the token with other tools. +Get an OAuth2 access token for use with other tools. ```bash -trustify -u http://localhost:8080 \ - --sso-url http://sso.example.com/realms/trustify \ - --client-id my-client \ - --client-secret my-secret \ - auth token -``` - -**Output:** The access token string (can be used as a Bearer token) - -**Example with curl:** - -```bash -# Get token and use with curl TOKEN=$(trustify auth token) -curl -H "Authorization: Bearer $TOKEN" http://localhost:8080/api/v2/sbom +curl -H "Authorization: Bearer $TOKEN" $TRUSTIFY_URL/api/v2/sbom ``` --- ### `sbom get ` -Get an SBOM by its ID. Returns the full JSON document. +Get an SBOM by ID (returns raw JSON). ```bash -trustify -u http://localhost:8080 sbom get abc123 +trustify sbom get urn:uuid:abc123 ``` -**Output:** Raw JSON of the SBOM - --- ### `sbom list` -List SBOMs with optional filtering, pagination, and output formatting. +List SBOMs with filtering, pagination, and output formatting. ```bash -trustify -u http://localhost:8080 sbom list [OPTIONS] +trustify sbom list # Full JSON +trustify sbom list --format id # Just IDs +trustify sbom list --query "name=my-app" # Filter by name +trustify sbom list --limit 10 --offset 20 # Pagination +trustify sbom list --sort "published:desc" # Sort by date ``` -**Options:** - -| Option | Description | -|--------|-------------| -| `--query ` | Query filter (e.g., `name=my-app`) | -| `--limit ` | Maximum number of results | -| `--offset ` | Skip first N results | -| `--sort ` | Sort order (e.g., `name:asc`, `published:desc`) | -| `--format ` | Output format: `id`, `name`, `short`, `full` (default: `full`) | - -**Format Options:** - -| Format | Fields Included | -|--------|-----------------| -| `id` | Just the ID (one per line) | -| `name` | `id`, `name`, `document_id` | -| `short` | `id`, `name`, `document_id`, `ingested`, `published`, `size` | -| `full` | Complete JSON document | - -**Examples:** - -```bash -# List all SBOMs (full JSON) -trustify -u http://localhost:8080 sbom list - -# List with query filter -trustify -u http://localhost:8080 sbom list --query "name=my-app" - -# List only IDs -trustify -u http://localhost:8080 sbom list --format id - -# Paginated results -trustify -u http://localhost:8080 sbom list --limit 10 --offset 20 - -# Sorted results -trustify -u http://localhost:8080 sbom list --sort "published:desc" -``` +**Format options:** `id` | `name` | `short` | `full` (default) --- ### `sbom delete` -Delete an SBOM (placeholder - not fully implemented). +Delete an SBOM by ID. ```bash -trustify -u http://localhost:8080 sbom delete --id [--dry-run] +trustify sbom delete --id urn:uuid:abc123 +trustify sbom delete --id urn:uuid:abc123 --dry-run # Preview only ``` --- ### `sbom duplicates find` -Find duplicate SBOMs by `document_id`. Groups SBOMs with the same `document_id` and identifies the most recent (by `published` date) as the primary, with others marked as duplicates. - -```bash -trustify -u http://localhost:8080 sbom duplicates find [OPTIONS] -``` - -**Options:** - -| Option | Default | Description | -|--------|---------|-------------| -| `-b, --batch-size` | 100 | Number of SBOMs to fetch per request | -| `-j, --concurrency` | 4 | Number of concurrent fetch requests | -| `--output` | `duplicates.json` | Output file path | - -**Examples:** +Scan all SBOMs and find duplicates by `document_id`. Keeps the most recent version, marks others as duplicates. ```bash -# Default settings -trustify -u http://localhost:8080 sbom duplicates find - -# Faster with more concurrency -trustify -u http://localhost:8080 sbom duplicates find -j 8 - -# Larger batches -trustify -u http://localhost:8080 sbom duplicates find -b 500 -j 8 - -# Custom output file -trustify -u http://localhost:8080 sbom duplicates find --output my-duplicates.json +trustify sbom duplicates find # Default: 4 workers, saves to duplicates.json +trustify sbom duplicates find -j 8 # Faster with 8 concurrent workers +trustify sbom duplicates find -b 500 -j 8 # Larger batches + more workers +trustify sbom duplicates find --output out.json # Custom output file ``` -**Output Format (`duplicates.json`):** +**Output file format:** ```json [ { "document_id": "urn:example:sbom-1.0", + "id": "abc123", // ← Keep this one (most recent) "published": "2025-01-10T12:00:00Z", - "id": "abc123", - "duplicates": ["def456", "ghi789"] + "duplicates": ["def456", "ghi789"] // ← Delete these } ] ``` -Where: -- `id` = The most recent SBOM (keep this one) -- `duplicates` = Older versions that can be deleted - --- ### `sbom duplicates delete` -Delete duplicate SBOMs identified by the `duplicates find` command. +Delete the duplicates found by `find`. Always preview with `--dry-run` first! ```bash -trustify -u http://localhost:8080 sbom duplicates delete [OPTIONS] +trustify sbom duplicates delete --dry-run # Preview what will be deleted +trustify sbom duplicates delete # Delete all duplicates +trustify sbom duplicates delete -j 16 # Faster with 16 concurrent requests +trustify sbom duplicates delete --input out.json # Use custom input file ``` - -**Options:** - -| Option | Default | Description | -|--------|---------|-------------| -| `--input` | `duplicates.json` | Input file from `duplicates find` | -| `-j, --concurrency` | 8 | Number of concurrent delete requests | -| `--dry-run` | false | Preview deletions without executing | - -**Examples:** - -```bash -# Dry run first (recommended) -trustify -u http://localhost:8080 sbom duplicates delete --dry-run - -# Actually delete -trustify -u http://localhost:8080 sbom duplicates delete - -# With higher concurrency -trustify -u http://localhost:8080 sbom duplicates delete -j 16 - -# From a specific file -trustify -u http://localhost:8080 sbom duplicates delete --input my-duplicates.json -``` - -**Output:** - -``` -Deleting 150 duplicates with 8 concurrent requests... -Deleted: abc123 (document_id: urn:example:sbom-1.0) -Deleted: def456 (document_id: urn:example:sbom-1.0) -... -Deleted 150 duplicate(s), 0 failed out of 150 total -``` - ---- - -## Complete Workflow Example - -```bash -# 1. Configure authentication -export TRUSTIFY_URL=http://localhost:8080 -export TRUSTIFY_SSO_URL=http://sso.example.com/realms/trustify -export TRUSTIFY_CLIENT_ID=my-client -export TRUSTIFY_CLIENT_SECRET=my-secret - -# 2. Find duplicates -trustify sbom duplicates find -j 8 -# Output: Found 150 document(s) with duplicates. Saved to duplicates.json - -# 3. Review the duplicates file -cat duplicates.json | jq '.[0]' - -# 4. Dry run to see what would be deleted -trustify sbom duplicates delete --dry-run - -# 5. Delete duplicates -trustify sbom duplicates delete -j 16 -# Output: Deleted 300 duplicate(s), 0 failed out of 300 total -``` - -## API Reference - -This CLI interacts with the Trustify API. See the [OpenAPI specification](https://raw.githubusercontent.com/guacsec/trustify/refs/heads/main/openapi.yaml) for full API documentation. - -## License - -Apache License, Version 2.0 From 4430d57af428604e9100c29cc3a9bd703d08ee62 Mon Sep 17 00:00:00 2001 From: "bxf12315@gmail.com" Date: Thu, 29 Jan 2026 21:04:24 +0800 Subject: [PATCH 07/10] Some minor adjustments. --- Cargo.lock | 429 ++++++++++++------ Cargo.toml | 4 +- .../trustify-cli}/Cargo.lock | 0 tools/trustify-cli/Cargo.toml | 19 + {trustify-cli => tools/trustify-cli}/LICENSE | 0 .../trustify-cli}/README.md | 0 .../trustify-cli}/src/api/auth.rs | 0 .../trustify-cli}/src/api/client.rs | 0 .../trustify-cli}/src/api/mod.rs | 0 .../trustify-cli}/src/api/sbom.rs | 0 .../trustify-cli}/src/cli.rs | 0 .../trustify-cli}/src/commands/auth.rs | 0 .../trustify-cli}/src/commands/mod.rs | 0 .../trustify-cli}/src/commands/sbom.rs | 0 .../trustify-cli}/src/config.rs | 0 .../trustify-cli}/src/main.rs | 0 trustify-cli/.dockerignore | 9 - .../.github/workflows/container-image.yml | 62 --- trustify-cli/.gitignore | 4 - trustify-cli/Cargo.toml | 19 - trustify-cli/Dockerfile | 31 -- 21 files changed, 311 insertions(+), 266 deletions(-) rename {trustify-cli => tools/trustify-cli}/Cargo.lock (100%) create mode 100644 tools/trustify-cli/Cargo.toml rename {trustify-cli => tools/trustify-cli}/LICENSE (100%) rename {trustify-cli => tools/trustify-cli}/README.md (100%) rename {trustify-cli => tools/trustify-cli}/src/api/auth.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/api/client.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/api/mod.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/api/sbom.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/cli.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/commands/auth.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/commands/mod.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/commands/sbom.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/config.rs (100%) rename {trustify-cli => tools/trustify-cli}/src/main.rs (100%) delete mode 100644 trustify-cli/.dockerignore delete mode 100644 trustify-cli/.github/workflows/container-image.yml delete mode 100644 trustify-cli/.gitignore delete mode 100644 trustify-cli/Cargo.toml delete mode 100644 trustify-cli/Dockerfile diff --git a/Cargo.lock b/Cargo.lock index c97cfe538..2742f71e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -325,15 +325,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -1154,21 +1145,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "backtrace" -version = "0.3.75" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets 0.52.6", -] - [[package]] name = "base16ct" version = "0.1.1" @@ -1598,7 +1574,7 @@ dependencies = [ "semver", "serde", "serde_json", - "thiserror 2.0.16", + "thiserror 2.0.18", ] [[package]] @@ -1619,6 +1595,12 @@ dependencies = [ "shlex", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cexpr" version = "0.6.0" @@ -1789,6 +1771,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "compression-codecs" version = "0.4.30" @@ -2124,13 +2116,13 @@ dependencies = [ "log", "parking_lot 0.12.4", "percent-encoding", - "reqwest", + "reqwest 0.12.24", "sectxtlib", "sequoia-openpgp", "serde", "serde_json", "sha2", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "url", @@ -3079,7 +3071,7 @@ dependencies = [ "serde", "serde_json", "strum 0.27.2", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", "url", @@ -3145,12 +3137,6 @@ dependencies = [ "syn 2.0.106", ] -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - [[package]] name = "git2" version = "0.20.2" @@ -3370,7 +3356,7 @@ dependencies = [ "once_cell", "rand 0.9.2", "ring", - "thiserror 2.0.16", + "thiserror 2.0.18", "tinyvec", "tokio", "tracing", @@ -3393,7 +3379,7 @@ dependencies = [ "rand 0.9.2", "resolv-conf", "smallvec", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -3885,9 +3871,9 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.18.0" +version = "0.18.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a646d946d06bedbbc4cac4c218acf4bbf2d87757a784857025f4d447e4e1cd" +checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" dependencies = [ "console", "futures-core", @@ -3940,17 +3926,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "io-uring" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" -dependencies = [ - "bitflags 2.9.4", - "cfg-if", - "libc", -] - [[package]] name = "ipconfig" version = "0.3.2" @@ -4027,6 +4002,28 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror 1.0.69", + "walkdir", + "windows-sys 0.45.0", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "jobserver" version = "0.1.34" @@ -4076,7 +4073,7 @@ dependencies = [ "pest_derive", "regex", "serde_json", - "thiserror 2.0.16", + "thiserror 2.0.18", ] [[package]] @@ -4689,7 +4686,7 @@ dependencies = [ "getrandom 0.2.16", "http 1.3.1", "rand 0.8.5", - "reqwest", + "reqwest 0.12.24", "serde", "serde_json", "serde_path_to_error", @@ -4698,15 +4695,6 @@ dependencies = [ "url", ] -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - [[package]] name = "oci-client" version = "0.15.0" @@ -4723,11 +4711,11 @@ dependencies = [ "oci-spec", "olpc-cjson", "regex", - "reqwest", + "reqwest 0.12.24", "serde", "serde_json", "sha2", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", "unicase", @@ -4747,7 +4735,7 @@ dependencies = [ "serde_json", "strum 0.27.2", "strum_macros 0.27.2", - "thiserror 2.0.16", + "thiserror 2.0.18", ] [[package]] @@ -4794,7 +4782,7 @@ dependencies = [ "chrono", "lazy_static", "mime", - "reqwest", + "reqwest 0.12.24", "serde", "serde_json", "thiserror 1.0.69", @@ -4814,7 +4802,7 @@ dependencies = [ "getrandom 0.3.3", "hmac-sha256", "mime", - "reqwest", + "reqwest 0.12.24", "serde", "serde_json", "thiserror 1.0.69", @@ -4917,7 +4905,7 @@ dependencies = [ "futures-sink", "js-sys", "pin-project-lite", - "thiserror 2.0.16", + "thiserror 2.0.18", "tracing", ] @@ -4931,7 +4919,7 @@ dependencies = [ "bytes", "http 1.3.1", "opentelemetry", - "reqwest", + "reqwest 0.12.24", ] [[package]] @@ -4960,8 +4948,8 @@ dependencies = [ "opentelemetry-proto", "opentelemetry_sdk", "prost", - "reqwest", - "thiserror 2.0.16", + "reqwest 0.12.24", + "thiserror 2.0.18", "tokio", "tonic", "tracing", @@ -4998,7 +4986,7 @@ dependencies = [ "opentelemetry", "percent-encoding", "rand 0.9.2", - "thiserror 2.0.16", + "thiserror 2.0.18", ] [[package]] @@ -5146,7 +5134,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35da99768af1ae8830ccf30d295db0e09c24bcfda5a67515191dd4b773f6d82a" dependencies = [ "percent-encoding", - "thiserror 2.0.16", + "thiserror 2.0.18", ] [[package]] @@ -5298,7 +5286,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21e0a3a33733faeaf8651dfee72dd0f388f0c8e5ad496a3478fa5a922f49cfa8" dependencies = [ "memchr", - "thiserror 2.0.16", + "thiserror 2.0.18", "ucd-trie", ] @@ -5542,7 +5530,7 @@ dependencies = [ "hex", "num-format", "regex-lite", - "reqwest", + "reqwest 0.12.24", "reqwest-middleware", "reqwest-retry", "reqwest-tracing", @@ -5553,7 +5541,7 @@ dependencies = [ "tar", "target-triple", "tempfile", - "thiserror 2.0.16", + "thiserror 2.0.18", "tracing", "url", ] @@ -5564,7 +5552,7 @@ version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20698f9f0fddfa20bb0f8db60c47c7c1996b781c8e4bc2d09182d6cab66da25c" dependencies = [ - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", ] @@ -5583,7 +5571,7 @@ dependencies = [ "sqlx", "target-triple", "tempfile", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", "url", @@ -5773,7 +5761,7 @@ dependencies = [ "rustc-hash", "rustls 0.23.32", "socket2 0.6.1", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", "web-time", @@ -5785,6 +5773,7 @@ version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ + "aws-lc-rs", "bytes", "getrandom 0.3.3", "lru-slab", @@ -5794,7 +5783,7 @@ dependencies = [ "rustls 0.23.32", "rustls-pki-types", "slab", - "thiserror 2.0.16", + "thiserror 2.0.18", "tinyvec", "tracing", "web-time", @@ -6062,6 +6051,52 @@ dependencies = [ "webpki-roots 1.0.3", ] +[[package]] +name = "reqwest" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-channel", + "futures-core", + "futures-util", + "h2 0.4.12", + "http 1.3.1", + "http-body 1.0.1", + "http-body-util", + "hyper 1.7.0", + "hyper-rustls 0.27.7", + "hyper-tls", + "hyper-util", + "js-sys", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls 0.23.32", + "rustls-pki-types", + "rustls-platform-verifier", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-rustls 0.26.3", + "tower", + "tower-http", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "reqwest-middleware" version = "0.4.2" @@ -6071,7 +6106,7 @@ dependencies = [ "anyhow", "async-trait", "http 1.3.1", - "reqwest", + "reqwest 0.12.24", "serde", "thiserror 1.0.69", "tower-service", @@ -6090,7 +6125,7 @@ dependencies = [ "http 1.3.1", "hyper 1.7.0", "parking_lot 0.11.2", - "reqwest", + "reqwest 0.12.24", "reqwest-middleware", "retry-policies", "thiserror 1.0.69", @@ -6110,7 +6145,7 @@ dependencies = [ "getrandom 0.2.16", "http 1.3.1", "matchit", - "reqwest", + "reqwest 0.12.24", "reqwest-middleware", "tracing", ] @@ -6332,12 +6367,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "rustc-demangle" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" - [[package]] name = "rustc-hash" version = "2.1.1" @@ -6436,6 +6465,33 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls 0.23.32", + "rustls-native-certs 0.8.1", + "rustls-platform-verifier-android", + "rustls-webpki 0.103.6", + "security-framework 3.5.0", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -6503,14 +6559,14 @@ dependencies = [ "humantime", "log", "parking_lot 0.12.4", - "reqwest", + "reqwest 0.12.24", "sequoia-openpgp", "serde", "serde-cyclonedx", "serde_json", "sha2", "spdx-rs", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "url", @@ -6668,7 +6724,7 @@ dependencies = [ "serde_json", "sqlx", "strum 0.26.3", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tracing", "url", @@ -6768,7 +6824,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.106", - "thiserror 2.0.16", + "thiserror 2.0.18", ] [[package]] @@ -6840,7 +6896,7 @@ dependencies = [ "iri-string", "nom", "oxilangtag", - "thiserror 2.0.16", + "thiserror 2.0.18", "valuable", ] @@ -6913,15 +6969,15 @@ dependencies = [ "regex", "regex-syntax", "sha1collisiondetection", - "thiserror 2.0.16", + "thiserror 2.0.18", "xxhash-rust", ] [[package]] name = "serde" -version = "1.0.226" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -6957,18 +7013,18 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.226" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.226" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -6988,16 +7044,16 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.145" +version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ "indexmap 2.11.4", "itoa", "memchr", - "ryu", "serde", "serde_core", + "zmij", ] [[package]] @@ -7345,7 +7401,7 @@ dependencies = [ "serde_json", "sha2", "smallvec", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "tokio-stream", @@ -7433,7 +7489,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tracing", "uuid", @@ -7476,7 +7532,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tracing", "uuid", @@ -7503,7 +7559,7 @@ dependencies = [ "serde", "serde_urlencoded", "sqlx-core", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tracing", "url", @@ -7848,11 +7904,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.16", + "thiserror-impl 2.0.18", ] [[package]] @@ -7868,9 +7924,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.16" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -7971,29 +8027,26 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.47.1" +version = "1.49.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" +checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" dependencies = [ - "backtrace", "bytes", - "io-uring", "libc", "mio", "parking_lot 0.12.4", "pin-project-lite", "signal-hook-registry", - "slab", "socket2 0.6.1", "tokio-macros", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", @@ -8167,9 +8220,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ "bitflags 2.9.4", "bytes", @@ -8273,7 +8326,7 @@ dependencies = [ "opentelemetry_sdk", "rustversion", "smallvec", - "thiserror 2.0.16", + "thiserror 2.0.18", "tracing", "tracing-core", "tracing-log", @@ -8318,13 +8371,13 @@ dependencies = [ "jsonpath-rust", "log", "openid 0.18.3", - "reqwest", + "reqwest 0.13.1", "schemars 1.0.4", "serde", "serde_json", "serde_yaml_ng", "strum 0.27.2", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tracing", "trustify-common", @@ -8333,6 +8386,21 @@ dependencies = [ "utoipa-swagger-ui", ] +[[package]] +name = "trustify-cli" +version = "0.1.0" +dependencies = [ + "clap", + "dotenvy", + "futures", + "indicatif", + "reqwest 0.13.1", + "serde", + "serde_json", + "thiserror 2.0.18", + "tokio", +] + [[package]] name = "trustify-common" version = "0.4.0-beta.1" @@ -8357,7 +8425,7 @@ dependencies = [ "pem", "rand 0.9.2", "regex", - "reqwest", + "reqwest 0.13.1", "ring", "rstest", "sbom-walker", @@ -8373,7 +8441,7 @@ dependencies = [ "sqlx", "strum 0.27.2", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "tracing", @@ -8430,7 +8498,7 @@ dependencies = [ "strum 0.27.2", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "trustify-common", @@ -8461,7 +8529,7 @@ dependencies = [ "opentelemetry-otlp", "opentelemetry_sdk", "parking_lot 0.12.4", - "reqwest", + "reqwest 0.13.1", "serde", "serde_json", "tokio", @@ -8545,7 +8613,7 @@ dependencies = [ "sha2", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "tokio-util", @@ -8593,7 +8661,7 @@ dependencies = [ "osv", "packageurl", "regex", - "reqwest", + "reqwest 0.13.1", "roxmltree", "sanitize-filename", "sea-orm", @@ -8611,7 +8679,7 @@ dependencies = [ "tar", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "tokio-util", @@ -8685,7 +8753,7 @@ dependencies = [ "osv", "parking_lot 0.12.4", "regex", - "reqwest", + "reqwest 0.13.1", "sbom-walker", "schemars 1.0.4", "sea-orm", @@ -8696,7 +8764,7 @@ dependencies = [ "tempfile", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "tokio-util", @@ -8757,7 +8825,7 @@ dependencies = [ "strum 0.27.2", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "time", "tokio", "tracing", @@ -8796,7 +8864,7 @@ dependencies = [ "tempfile", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "tokio-util", "tracing", @@ -8817,7 +8885,7 @@ dependencies = [ "serde_json", "spdx-rs", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "trustify-common", "trustify-module-ingestor", @@ -8839,7 +8907,7 @@ dependencies = [ "serde_json", "test-context", "test-log", - "thiserror 2.0.16", + "thiserror 2.0.18", "tokio", "trustify-auth", "trustify-common", @@ -8921,7 +8989,7 @@ dependencies = [ "osv", "peak_alloc", "postgresql_embedded", - "reqwest", + "reqwest 0.13.1", "serde", "serde_json", "sha2", @@ -9380,12 +9448,12 @@ dependencies = [ "log", "openid 0.17.0", "pem", - "reqwest", + "reqwest 0.12.24", "sequoia-openpgp", "serde", "serde_json", "sha2", - "thiserror 2.0.16", + "thiserror 2.0.18", "thousands", "time", "tokio", @@ -9553,6 +9621,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webpki-roots" version = "0.26.11" @@ -9765,6 +9842,15 @@ dependencies = [ "windows-link 0.2.0", ] +[[package]] +name = "windows-sys" +version = "0.45.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets 0.42.2", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -9810,6 +9896,21 @@ dependencies = [ "windows-link 0.2.0", ] +[[package]] +name = "windows-targets" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +dependencies = [ + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -9858,6 +9959,12 @@ dependencies = [ "windows_x86_64_msvc 0.53.0", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -9876,6 +9983,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -9894,6 +10007,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" +[[package]] +name = "windows_i686_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -9924,6 +10043,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" +[[package]] +name = "windows_i686_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -9942,6 +10067,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -9960,6 +10091,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -9978,6 +10115,12 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -10279,6 +10422,12 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" +[[package]] +name = "zmij" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" + [[package]] name = "zopfli" version = "0.8.2" diff --git a/Cargo.toml b/Cargo.toml index 3b5f1dc2a..c3cd74cf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,6 +22,7 @@ members = [ "test-context", "trustd", "xtask", + "tools/trustify-cli" ] [workspace.package] @@ -68,6 +69,7 @@ cve = "0.5.0" cvss = { package = "cvss-rs", version = "0.2.0" } cvss-old = { package = "cvss", version = "2" } deepsize = "0.2.0" +dotenvy = "0.15.7" fixedbitset = "0.5.7" flate2 = "1.0.35" fs4 = "0.13.1" @@ -110,7 +112,7 @@ petgraph = { version = "0.8.0", features = ["serde-1"] } quick-xml = "0.38.0" rand = "0.9.0" regex = "1.10.3" -reqwest = "0.12" +reqwest = "0.13.1" ring = "0.17.8" roxmltree = "0.20.0" rstest = "0.26.1" diff --git a/trustify-cli/Cargo.lock b/tools/trustify-cli/Cargo.lock similarity index 100% rename from trustify-cli/Cargo.lock rename to tools/trustify-cli/Cargo.lock diff --git a/tools/trustify-cli/Cargo.toml b/tools/trustify-cli/Cargo.toml new file mode 100644 index 000000000..3e0cbae4d --- /dev/null +++ b/tools/trustify-cli/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "trustify-cli" +version = "0.1.0" +edition = "2024" + +[[bin]] +name = "trustify" +path = "src/main.rs" + +[dependencies] +clap = { workspace = true, features = ["derive", "env"] } +dotenvy = { workspace = true } +futures = { workspace = true } +indicatif = { workspace = true } +reqwest = { workspace = true , features = ["blocking", "form", "json", "query"] } +serde = { workspace = true , features = ["derive"] } +serde_json = { workspace = true } +thiserror = { workspace = true } +tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync"] } diff --git a/trustify-cli/LICENSE b/tools/trustify-cli/LICENSE similarity index 100% rename from trustify-cli/LICENSE rename to tools/trustify-cli/LICENSE diff --git a/trustify-cli/README.md b/tools/trustify-cli/README.md similarity index 100% rename from trustify-cli/README.md rename to tools/trustify-cli/README.md diff --git a/trustify-cli/src/api/auth.rs b/tools/trustify-cli/src/api/auth.rs similarity index 100% rename from trustify-cli/src/api/auth.rs rename to tools/trustify-cli/src/api/auth.rs diff --git a/trustify-cli/src/api/client.rs b/tools/trustify-cli/src/api/client.rs similarity index 100% rename from trustify-cli/src/api/client.rs rename to tools/trustify-cli/src/api/client.rs diff --git a/trustify-cli/src/api/mod.rs b/tools/trustify-cli/src/api/mod.rs similarity index 100% rename from trustify-cli/src/api/mod.rs rename to tools/trustify-cli/src/api/mod.rs diff --git a/trustify-cli/src/api/sbom.rs b/tools/trustify-cli/src/api/sbom.rs similarity index 100% rename from trustify-cli/src/api/sbom.rs rename to tools/trustify-cli/src/api/sbom.rs diff --git a/trustify-cli/src/cli.rs b/tools/trustify-cli/src/cli.rs similarity index 100% rename from trustify-cli/src/cli.rs rename to tools/trustify-cli/src/cli.rs diff --git a/trustify-cli/src/commands/auth.rs b/tools/trustify-cli/src/commands/auth.rs similarity index 100% rename from trustify-cli/src/commands/auth.rs rename to tools/trustify-cli/src/commands/auth.rs diff --git a/trustify-cli/src/commands/mod.rs b/tools/trustify-cli/src/commands/mod.rs similarity index 100% rename from trustify-cli/src/commands/mod.rs rename to tools/trustify-cli/src/commands/mod.rs diff --git a/trustify-cli/src/commands/sbom.rs b/tools/trustify-cli/src/commands/sbom.rs similarity index 100% rename from trustify-cli/src/commands/sbom.rs rename to tools/trustify-cli/src/commands/sbom.rs diff --git a/trustify-cli/src/config.rs b/tools/trustify-cli/src/config.rs similarity index 100% rename from trustify-cli/src/config.rs rename to tools/trustify-cli/src/config.rs diff --git a/trustify-cli/src/main.rs b/tools/trustify-cli/src/main.rs similarity index 100% rename from trustify-cli/src/main.rs rename to tools/trustify-cli/src/main.rs diff --git a/trustify-cli/.dockerignore b/trustify-cli/.dockerignore deleted file mode 100644 index 7015f3a69..000000000 --- a/trustify-cli/.dockerignore +++ /dev/null @@ -1,9 +0,0 @@ -target/ -.git/ -.gitignore -*.md -LICENSE -Dockerfile -.dockerignore -.env -duplicates.json diff --git a/trustify-cli/.github/workflows/container-image.yml b/trustify-cli/.github/workflows/container-image.yml deleted file mode 100644 index 91ae026a3..000000000 --- a/trustify-cli/.github/workflows/container-image.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Build and Push Container Image - -on: - push: - branches: - - main - tags: - - 'v*' - pull_request: - branches: - - main - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-and-push: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to Container Registry - if: github.event_name != 'pull_request' - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - tags: | - type=ref,event=branch - type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} - type=sha,prefix= - type=raw,value=latest,enable={{is_default_branch}} - - - name: Build and push Docker image - uses: docker/build-push-action@v6 - with: - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - cache-from: type=gha - cache-to: type=gha,mode=max - platforms: linux/amd64,linux/arm64 diff --git a/trustify-cli/.gitignore b/trustify-cli/.gitignore deleted file mode 100644 index a0808ee7b..000000000 --- a/trustify-cli/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/target -.env - -duplicates-*.json diff --git a/trustify-cli/Cargo.toml b/trustify-cli/Cargo.toml deleted file mode 100644 index e81b1bb6c..000000000 --- a/trustify-cli/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "trustify-cli" -version = "0.1.0" -edition = "2021" - -[[bin]] -name = "trustify" -path = "src/main.rs" - -[dependencies] -clap = { version = "4.5", features = ["derive", "env"] } -dotenvy = "0.15.7" -futures = "0.3.31" -indicatif = "0.18.3" -reqwest = { version = "0.13.1", features = ["blocking", "form", "json", "query"] } -serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.149" -thiserror = "2.0.17" -tokio = { version = "1.49.0", features = ["rt-multi-thread", "macros", "sync"] } diff --git a/trustify-cli/Dockerfile b/trustify-cli/Dockerfile deleted file mode 100644 index d347217e9..000000000 --- a/trustify-cli/Dockerfile +++ /dev/null @@ -1,31 +0,0 @@ -# Build stage -FROM rust:1.83-alpine AS builder - -# Install musl-dev for static linking -RUN apk add --no-cache musl-dev - -WORKDIR /app - -# Copy manifests first for better layer caching -COPY Cargo.toml Cargo.lock ./ - -# Create a dummy main.rs to build dependencies -RUN mkdir src && echo "fn main() {}" > src/main.rs - -# Build dependencies only (this layer will be cached) -RUN cargo build --release && rm -rf src - -# Copy actual source code -COPY src ./src - -# Build the actual binary (touch to update mtime so cargo rebuilds) -RUN touch src/main.rs && cargo build --release - -# Runtime stage - use minimal distroless image -FROM gcr.io/distroless/static-debian12:nonroot - -# Copy the binary from builder -COPY --from=builder /app/target/release/trustify /usr/local/bin/trustify - -# Set the entrypoint -ENTRYPOINT ["trustify"] From d0577c7c2b35853ee85dd3b9be6aa22f678f8a23 Mon Sep 17 00:00:00 2001 From: "bxf12315@gmail.com" Date: Thu, 29 Jan 2026 23:14:09 +0800 Subject: [PATCH 08/10] Downgrade reqwest to 0.12, remove the form and query features, format the code, and replace unwrap to make clippy happy. --- Cargo.lock | 2168 ++++++++++------------- Cargo.toml | 2 +- tools/trustify-cli/Cargo.toml | 2 +- tools/trustify-cli/src/api/auth.rs | 4 +- tools/trustify-cli/src/api/client.rs | 11 +- tools/trustify-cli/src/api/mod.rs | 2 +- tools/trustify-cli/src/api/sbom.rs | 8 +- tools/trustify-cli/src/commands/auth.rs | 30 +- tools/trustify-cli/src/commands/mod.rs | 4 +- tools/trustify-cli/src/commands/sbom.rs | 4 +- tools/trustify-cli/src/main.rs | 2 +- 11 files changed, 996 insertions(+), 1241 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2742f71e5..7185e2d8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21,7 +21,7 @@ dependencies = [ "actix-macros", "actix-rt", "actix_derive", - "bitflags 2.9.4", + "bitflags 2.10.0", "bytes", "crossbeam-channel", "futures-core", @@ -30,7 +30,7 @@ dependencies = [ "futures-util", "log", "once_cell", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "pin-project-lite", "smallvec", "tokio", @@ -43,7 +43,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "bytes", "futures-core", "futures-sink", @@ -62,7 +62,7 @@ checksum = "daa239b93927be1ff123eebada5a3ff23e89f0124ccb8609234e5103d5a5ae6d" dependencies = [ "actix-utils", "actix-web", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures-util", "log", "once_cell", @@ -71,9 +71,9 @@ dependencies = [ [[package]] name = "actix-http" -version = "3.11.1" +version = "3.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44cceded2fb55f3c4b67068fa64962e2ca59614edc5b03167de9ff82ae803da0" +checksum = "7926860314cbe2fb5d1f13731e387ab43bd32bca224e82e6e2db85de0a3dba49" dependencies = [ "actix-codec", "actix-rt", @@ -81,11 +81,11 @@ dependencies = [ "actix-tls", "actix-utils", "base64 0.22.1", - "bitflags 2.9.4", + "bitflags 2.10.0", "brotli", "bytes", "bytestring", - "derive_more 2.0.1", + "derive_more 2.1.1", "encoding_rs", "flate2", "foldhash", @@ -116,7 +116,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -173,9 +173,9 @@ dependencies = [ [[package]] name = "actix-tls" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac453898d866cdbecdbc2334fe1738c747b4eba14a677261f2b768ba05329389" +checksum = "6176099de3f58fbddac916a7f8c6db297e021d706e7a6b99947785fee14abe9f" dependencies = [ "actix-rt", "actix-service", @@ -202,9 +202,9 @@ dependencies = [ [[package]] name = "actix-web" -version = "4.11.0" +version = "4.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a597b77b5c6d6a1e1097fddde329a83665e25c5437c696a3a9a4aa514a614dea" +checksum = "1654a77ba142e37f049637a3e5685f864514af11fcbc51cb51eb6596afe5b8d6" dependencies = [ "actix-codec", "actix-http", @@ -220,7 +220,7 @@ dependencies = [ "bytestring", "cfg-if", "cookie", - "derive_more 2.0.1", + "derive_more 2.1.1", "encoding_rs", "foldhash", "futures-core", @@ -238,7 +238,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "smallvec", - "socket2 0.5.10", + "socket2 0.6.2", "time", "tracing", "url", @@ -271,7 +271,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -322,7 +322,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -348,16 +348,16 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -406,9 +406,9 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" [[package]] name = "anstream" -version = "0.6.20" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -421,9 +421,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" @@ -436,22 +436,22 @@ dependencies = [ [[package]] name = "anstyle-query" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.10" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -532,37 +532,36 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.31" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9611ec0b6acea03372540509035db2f7f1e9f04da5d27728436fa994033c00a0" +checksum = "d10e4f991a553474232bc0a31799f6d24b034a84c0971d80d2e2f78b2e576e40" dependencies = [ "compression-codecs", "compression-core", - "futures-core", "pin-project-lite", "tokio", ] [[package]] name = "async-graphql" -version = "7.0.17" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "036618f842229ba0b89652ffe425f96c7c16a49f7e3cb23b56fca7f61fd74980" +checksum = "1057a9f7ccf2404d94571dec3451ade1cb524790df6f1ada0d19c2a49f6b0f40" dependencies = [ "async-graphql-derive", "async-graphql-parser", "async-graphql-value", - "async-stream", + "async-io", "async-trait", + "asynk-strim", "base64 0.22.1", "bytes", "fast_chemail", "fnv", - "futures-timer", "futures-util", "handlebars", - "http 1.3.1", - "indexmap 2.11.4", + "http 1.4.0", + "indexmap 2.13.0", "mime", "multer", "num-traits", @@ -573,16 +572,16 @@ dependencies = [ "serde_urlencoded", "static_assertions_next", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.18", "time", "uuid", ] [[package]] name = "async-graphql-actix-web" -version = "7.0.17" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7a6848c3effbd36ea8390db3d1f0b7c79fbedcb23c2390fb79c1d1774491c4c" +checksum = "771b8c91b2de81e0eee71f453224514090bd3d82c86a3d7e7b8a55fdae729cbc" dependencies = [ "actix", "actix-http", @@ -590,35 +589,35 @@ dependencies = [ "actix-web-actors", "async-channel", "async-graphql", - "async-stream", + "asynk-strim", "futures-channel", "futures-util", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] name = "async-graphql-derive" -version = "7.0.17" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd45deb3dbe5da5cdb8d6a670a7736d735ba65b455328440f236dfb113727a3d" +checksum = "2e6cbeadc8515e66450fba0985ce722192e28443697799988265d86304d7cc68" dependencies = [ "Inflector", "async-graphql-parser", - "darling 0.20.11", + "darling 0.23.0", "proc-macro-crate", "proc-macro2", "quote", - "strum 0.26.3", - "syn 2.0.106", - "thiserror 1.0.69", + "strum 0.27.2", + "syn 2.0.114", + "thiserror 2.0.18", ] [[package]] name = "async-graphql-parser" -version = "7.0.17" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b7607e59424a35dadbc085b0d513aa54ec28160ee640cf79ec3b634eba66d3" +checksum = "e64ef70f77a1c689111e52076da1cd18f91834bcb847de0a9171f83624b07fbf" dependencies = [ "async-graphql-value", "pest", @@ -628,16 +627,34 @@ dependencies = [ [[package]] name = "async-graphql-value" -version = "7.0.17" +version = "7.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34ecdaff7c9cffa3614a9f9999bf9ee4c3078fe3ce4d6a6e161736b56febf2de" +checksum = "3e3ef112905abea9dea592fc868a6873b10ebd3f983e83308f995d6284e9ba41" dependencies = [ "bytes", - "indexmap 2.11.4", + "indexmap 2.13.0", "serde", "serde_json", ] +[[package]] +name = "async-io" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc" +dependencies = [ + "autocfg", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite", + "parking", + "polling", + "rustix", + "slab", + "windows-sys 0.61.2", +] + [[package]] name = "async-recursion" version = "1.1.1" @@ -646,7 +663,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -668,7 +685,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -679,7 +696,17 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", +] + +[[package]] +name = "asynk-strim" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52697735bdaac441a29391a9e97102c74c6ef0f9b60a40cf109b1b404e29d2f6" +dependencies = [ + "futures-core", + "pin-project-lite", ] [[package]] @@ -705,9 +732,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "aws-config" -version = "1.8.7" +version = "1.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04b37ddf8d2e9744a0b9c19ce0b78efe4795339a90b66b7bae77987092cd2e69" +checksum = "96571e6996817bf3d58f6b569e4b9fd2e9d2fcf9f7424eed07b2ce9bb87535e5" dependencies = [ "aws-credential-types", "aws-runtime", @@ -724,7 +751,7 @@ dependencies = [ "bytes", "fastrand", "hex", - "http 1.3.1", + "http 1.4.0", "ring", "time", "tokio", @@ -735,9 +762,9 @@ dependencies = [ [[package]] name = "aws-credential-types" -version = "1.2.7" +version = "1.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799a1290207254984cb7c05245111bc77958b92a3c9bb449598044b36341cce6" +checksum = "3cd362783681b15d136480ad555a099e82ecd8e2d10a841e14dfd0078d67fee3" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", @@ -747,9 +774,9 @@ dependencies = [ [[package]] name = "aws-lc-rs" -version = "1.14.1" +version = "1.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d" +checksum = "7b7b6141e96a8c160799cc2d5adecd5cbbe5054cb8c7c4af53da0f83bb7ad256" dependencies = [ "aws-lc-sys", "zeroize", @@ -757,23 +784,21 @@ dependencies = [ [[package]] name = "aws-lc-sys" -version = "0.32.0" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee74396bee4da70c2e27cf94762714c911725efe69d9e2672f998512a67a4ce4" +checksum = "5c34dda4df7017c8db52132f0f8a2e0f8161649d15723ed63fc00c82d0f2081a" dependencies = [ - "bindgen", "cc", "cmake", "dunce", "fs_extra", - "libloading", ] [[package]] name = "aws-runtime" -version = "1.5.11" +version = "1.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e1ed337dabcf765ad5f2fb426f13af22d576328aaf09eac8f70953530798ec0" +checksum = "959dab27ce613e6c9658eb3621064d0e2027e5f2acb65bc526a43577facea557" dependencies = [ "aws-credential-types", "aws-sigv4", @@ -796,9 +821,9 @@ dependencies = [ [[package]] name = "aws-sdk-s3" -version = "1.107.0" +version = "1.119.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb9118b3454ba89b30df55931a1fa7605260fc648e070b5aab402c24b375b1f" +checksum = "1d65fddc3844f902dfe1864acb8494db5f9342015ee3ab7890270d36fbd2e01c" dependencies = [ "aws-credential-types", "aws-runtime", @@ -818,7 +843,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "http-body 0.4.6", "lru", "percent-encoding", @@ -830,15 +855,16 @@ dependencies = [ [[package]] name = "aws-sdk-sso" -version = "1.85.0" +version = "1.92.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f2c741e2e439f07b5d1b33155e246742353d82167c785a2ff547275b7e32483" +checksum = "b7d63bd2bdeeb49aa3f9b00c15e18583503b778b2e792fc06284d54e7d5b6566" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", "aws-smithy-json", + "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -852,15 +878,16 @@ dependencies = [ [[package]] name = "aws-sdk-ssooidc" -version = "1.87.0" +version = "1.94.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6428ae5686b18c0ee99f6f3c39d94ae3f8b42894cdc35c35d8fb2470e9db2d4c" +checksum = "532d93574bf731f311bafb761366f9ece345a0416dbcc273d81d6d1a1205239b" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", "aws-smithy-json", + "aws-smithy-observability", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", @@ -874,15 +901,16 @@ dependencies = [ [[package]] name = "aws-sdk-sts" -version = "1.87.0" +version = "1.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5871bec9a79a3e8d928c7788d654f135dde0e71d2dd98089388bab36b37ef607" +checksum = "357e9a029c7524db6a0099cd77fbd5da165540339e7296cca603531bc783b56c" dependencies = [ "aws-credential-types", "aws-runtime", "aws-smithy-async", "aws-smithy-http", "aws-smithy-json", + "aws-smithy-observability", "aws-smithy-query", "aws-smithy-runtime", "aws-smithy-runtime-api", @@ -897,9 +925,9 @@ dependencies = [ [[package]] name = "aws-sigv4" -version = "1.3.4" +version = "1.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084c34162187d39e3740cb635acd73c4e3a551a36146ad6fe8883c929c9f876c" +checksum = "69e523e1c4e8e7e8ff219d732988e22bfeae8a1cafdbe6d9eca1546fa080be7c" dependencies = [ "aws-credential-types", "aws-smithy-eventstream", @@ -912,7 +940,7 @@ dependencies = [ "hex", "hmac", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "p256 0.11.1", "percent-encoding", "ring", @@ -925,9 +953,9 @@ dependencies = [ [[package]] name = "aws-smithy-async" -version = "1.2.5" +version = "1.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e190749ea56f8c42bf15dd76c65e14f8f765233e6df9b0506d9d934ebef867c" +checksum = "9330762ee48c6cecfad2cb37b1506c16c8e858c90638eda2b1a7272b56f88bd5" dependencies = [ "futures-util", "pin-project-lite", @@ -936,9 +964,9 @@ dependencies = [ [[package]] name = "aws-smithy-checksums" -version = "0.63.8" +version = "0.63.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d2df0314b8e307995a3b86d44565dfe9de41f876901a7d71886c756a25979f" +checksum = "87294a084b43d649d967efe58aa1f9e0adc260e13a6938eb904c0ae9b45824ae" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -956,9 +984,9 @@ dependencies = [ [[package]] name = "aws-smithy-eventstream" -version = "0.60.11" +version = "0.60.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182b03393e8c677347fb5705a04a9392695d47d20ef0a2f8cfe28c8e6b9b9778" +checksum = "0810b22ae554f5076c3eabe1fe89b01aee61c354c575789f67e248e83c5f472b" dependencies = [ "aws-smithy-types", "bytes", @@ -967,9 +995,9 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.62.3" +version = "0.62.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c4dacf2d38996cf729f55e7a762b30918229917eca115de45dfa8dfb97796c9" +checksum = "826141069295752372f8203c17f28e30c464d22899a43a0c9fd9c458d469c88b" dependencies = [ "aws-smithy-eventstream", "aws-smithy-runtime-api", @@ -977,8 +1005,9 @@ dependencies = [ "bytes", "bytes-utils", "futures-core", + "futures-util", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "http-body 0.4.6", "percent-encoding", "pin-project-lite", @@ -988,57 +1017,57 @@ dependencies = [ [[package]] name = "aws-smithy-http-client" -version = "1.1.1" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147e8eea63a40315d704b97bf9bc9b8c1402ae94f89d5ad6f7550d963309da1b" +checksum = "ec918f18147cec121cb142a91b0038f66d99bbe903e585dccf871920e90b22ab" dependencies = [ "aws-smithy-async", "aws-smithy-runtime-api", "aws-smithy-types", "h2 0.3.27", - "h2 0.4.12", + "h2 0.4.13", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "http-body 0.4.6", "hyper 0.14.32", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-rustls 0.24.2", "hyper-rustls 0.27.7", "hyper-util", "pin-project-lite", "rustls 0.21.12", - "rustls 0.23.32", - "rustls-native-certs 0.8.1", + "rustls 0.23.36", + "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.3", + "tokio-rustls 0.26.4", "tower", "tracing", ] [[package]] name = "aws-smithy-json" -version = "0.61.5" +version = "0.61.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaa31b350998e703e9826b2104dd6f63be0508666e1aba88137af060e8944047" +checksum = "49fa1213db31ac95288d981476f78d05d9cbb0353d22cdf3472cc05bb02f6551" dependencies = [ "aws-smithy-types", ] [[package]] name = "aws-smithy-observability" -version = "0.1.3" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9364d5989ac4dd918e5cc4c4bdcc61c9be17dcd2586ea7f69e348fc7c6cab393" +checksum = "a700a7702874cd78b85fecdc9f64f3f72eb22fb713791cb445bcfd2a15bc1ecf" dependencies = [ "aws-smithy-runtime-api", ] [[package]] name = "aws-smithy-query" -version = "0.60.7" +version = "0.60.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" +checksum = "adc4a6cdc289a37be7fddb7f4365448187d62c603a40e6d46d13c68e5e81900f" dependencies = [ "aws-smithy-types", "urlencoding", @@ -1046,9 +1075,9 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "1.9.2" +version = "1.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa63ad37685ceb7762fa4d73d06f1d5493feb88e3f27259b9ed277f4c01b185" +checksum = "bb5b6167fcdf47399024e81ac08e795180c576a20e4d4ce67949f9a88ae37dc1" dependencies = [ "aws-smithy-async", "aws-smithy-http", @@ -1059,7 +1088,7 @@ dependencies = [ "bytes", "fastrand", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "http-body 0.4.6", "http-body 1.0.1", "pin-project-lite", @@ -1070,15 +1099,15 @@ dependencies = [ [[package]] name = "aws-smithy-runtime-api" -version = "1.9.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07f5e0fc8a6b3f2303f331b94504bbf754d85488f402d6f1dd7a6080f99afe56" +checksum = "5c47b1e62accf759b01aba295e40479d1ba8fb77c2a54f0fed861c809ca49761" dependencies = [ "aws-smithy-async", "aws-smithy-types", "bytes", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "pin-project-lite", "tokio", "tracing", @@ -1087,16 +1116,16 @@ dependencies = [ [[package]] name = "aws-smithy-types" -version = "1.3.2" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d498595448e43de7f4296b7b7a18a8a02c61ec9349128c80a368f7c3b4ab11a8" +checksum = "c2d447863bdec38c899e5753a48c0abcf590f3ec629e257ad5a9ef8806ad7714" dependencies = [ "base64-simd", "bytes", "bytes-utils", "futures-core", "http 0.2.12", - "http 1.3.1", + "http 1.4.0", "http-body 0.4.6", "http-body 1.0.1", "http-body-util", @@ -1113,18 +1142,18 @@ dependencies = [ [[package]] name = "aws-smithy-xml" -version = "0.60.10" +version = "0.60.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db87b96cb1b16c024980f133968d52882ca0daaee3a086c6decc500f6c99728" +checksum = "11b2f670422ff42bf7065031e72b45bc52a3508bd089f743ea90731ca2b6ea57" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "1.3.8" +version = "1.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b069d19bf01e46298eaedd7c6f283fe565a59263e53eebec945f3e6398f42390" +checksum = "1d980627d2dd7bfc32a3c025685a033eeab8d365cc840c631ef59d1b8f428164" dependencies = [ "aws-credential-types", "aws-smithy-async", @@ -1136,9 +1165,9 @@ dependencies = [ [[package]] name = "backon" -version = "1.5.2" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592277618714fbcecda9a02ba7a8781f319d26532a88553bbacc77ba5d2b3a8d" +checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" dependencies = [ "fastrand", "gloo-timers", @@ -1187,15 +1216,15 @@ dependencies = [ [[package]] name = "base64ct" -version = "1.8.0" +version = "1.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55248b47b0caf0546f7988906588779981c43bb1bc9d0c44087278f80cdb44ba" +checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06" [[package]] name = "bigdecimal" -version = "0.4.8" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a22f228ab7a1b23027ccc6c350b72868017af7ea8356fbdf19f8d991c690013" +checksum = "4d6867f1565b3aad85681f1015055b087fcfd840d6aeee6eee7f2da317603695" dependencies = [ "autocfg", "libm", @@ -1225,26 +1254,6 @@ dependencies = [ "virtue", ] -[[package]] -name = "bindgen" -version = "0.72.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895" -dependencies = [ - "bitflags 2.9.4", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.106", -] - [[package]] name = "biscuit" version = "0.7.0" @@ -1284,11 +1293,11 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" dependencies = [ - "serde", + "serde_core", ] [[package]] @@ -1314,13 +1323,13 @@ dependencies = [ [[package]] name = "blake2b_simd" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06e903a20b159e944f91ec8499fe1e55651480c541ea0a584f5d967c49ad9d99" +checksum = "b79834656f71332577234b50bfc009996f7449e0c056884e6a02492ded0ca2f3" dependencies = [ "arrayref", "arrayvec", - "constant_time_eq", + "constant_time_eq 0.4.2", ] [[package]] @@ -1329,20 +1338,20 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", ] [[package]] name = "borrow-or-share" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eeab4423108c5d7c744f4d234de88d18d636100093ae04caf4825134b9c3a32" +checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" [[package]] name = "borsh" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ "borsh-derive", "cfg_aliases", @@ -1350,15 +1359,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" +checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -1384,9 +1393,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "serde", @@ -1439,7 +1448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7a436965b6554ae18aba994745234bf2ed98d2c984e96b58aeb0f845c666969" dependencies = [ "chrono", - "derive_more 2.0.1", + "derive_more 2.1.1", "semver", "serde", ] @@ -1461,15 +1470,15 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.106", + "syn 2.0.114", "zstd", ] [[package]] name = "bumpalo" -version = "3.19.0" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" +checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "bytecheck" @@ -1501,9 +1510,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" dependencies = [ "serde", ] @@ -1520,9 +1529,9 @@ dependencies = [ [[package]] name = "bytesize" -version = "2.1.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5c434ae3cf0089ca203e9019ebe529c47ff45cefe8af7c85ecb734ef541822f" +checksum = "6bd91ee7b2422bcb158d90ef4d14f75ef67f340943fc4149891dcce8f8b972a3" dependencies = [ "serde_core", ] @@ -1538,36 +1547,37 @@ dependencies = [ [[package]] name = "bzip2" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bea8dcd42434048e4f7a304411d9273a411f647446c1234a65ce0554923f4cff" +checksum = "f3a53fac24f34a81bc9954b5d6cfce0c21e18ec6959f44f56e8e90e4bb7c346c" dependencies = [ "libbz2-rs-sys", ] [[package]] name = "camino" -version = "1.2.0" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1de8bc0aa9e9385ceb3bf0c152e3a9b9544f6c4a912c8ae504e80c1f0368603" +checksum = "e629a66d692cb9ff1a1c664e41771b3dcaf961985a9774c0eb0bd1b51cf60a48" dependencies = [ "serde_core", ] [[package]] name = "cargo-platform" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "122ec45a44b270afd1402f351b782c676b173e3c3fb28d86ff7ebfb4d86a4ee4" +checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082" dependencies = [ "serde", + "serde_core", ] [[package]] name = "cargo_metadata" -version = "0.23.0" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "981a6f317983eec002839b90fae7411a85621410ae591a9cab2ecf5cb5744873" +checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", "cargo-platform", @@ -1585,9 +1595,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.41" +version = "1.2.54" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac9fe6cdbb24b6ade63616c0a0688e45bb56732262c158df3c0c4bea4ca47cb7" +checksum = "6354c81bbfd62d9cfa9cb3c773c2b7b2a3a482d569de977fd0e961f6e7c00583" dependencies = [ "find-msvc-tools", "jobserver", @@ -1595,26 +1605,11 @@ dependencies = [ "shlex", ] -[[package]] -name = "cesu8" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "cfg_aliases" @@ -1634,16 +1629,16 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" +checksum = "fac4744fb15ae8337dc853fee7fb3f4e48c0fbaa23d0afe49c447b4fab126118" dependencies = [ "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-link 0.2.0", + "windows-link", ] [[package]] @@ -1705,22 +1700,11 @@ dependencies = [ "inout", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" -version = "4.5.49" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4512b90fa68d3a9932cea5184017c5d200f5921df706d45e853537dea51508f" +checksum = "3e34525d5bbbd55da2bb745d34b36121baac88d07619a9a09cfcf4a6c0832785" dependencies = [ "clap_builder", "clap_derive", @@ -1728,9 +1712,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.49" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0025e98baa12e766c67ba13ff4695a887a1eba19569aad00a472546795bd6730" +checksum = "59a20016a20a3da95bef50ec7238dbd09baeef4311dcdd38ec15aba69812fb61" dependencies = [ "anstream", "anstyle", @@ -1740,27 +1724,27 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.49" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "clap_lex" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" +checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32" [[package]] name = "cmake" -version = "0.1.54" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7caa3f9de89ddbe2c607f4101924c5abec803763ae9534e4f4d7d8f84aa81f0" +checksum = "75443c44cd6b379beb8c5b45d85d0773baf31cce901fe7bb252f4eff3008ef7d" dependencies = [ "cc", ] @@ -1771,21 +1755,11 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" -[[package]] -name = "combine" -version = "4.6.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" -dependencies = [ - "bytes", - "memchr", -] - [[package]] name = "compression-codecs" -version = "0.4.30" +version = "0.4.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "485abf41ac0c8047c07c87c72c8fb3eb5197f6e9d7ded615dfd1a00ae00a0f64" +checksum = "00828ba6fd27b45a448e57dbfe84f1029d4c9f26b368157e9a448a5f49a2ec2a" dependencies = [ "compression-core", "liblzma", @@ -1795,9 +1769,9 @@ dependencies = [ [[package]] name = "compression-core" -version = "0.4.29" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb" +checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" [[package]] name = "concurrent-queue" @@ -1810,15 +1784,15 @@ dependencies = [ [[package]] name = "console" -version = "0.16.1" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" dependencies = [ "encode_unicode", "libc", "once_cell", "unicode-width", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -1829,9 +1803,9 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.34" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd" +checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" dependencies = [ "const_format_proc_macros", ] @@ -1853,12 +1827,27 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +[[package]] +name = "constant_time_eq" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d52eff69cd5e647efe296129160853a42795992097e8af39800e1060caeea9b" + [[package]] name = "convert_case" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie" version = "0.16.2" @@ -1921,9 +1910,9 @@ dependencies = [ [[package]] name = "crc" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +checksum = "5eb8a2a1cd12ab0d987a5d5e825195d372001a4094a0376319d5a0ad71c1ba0d" dependencies = [ "crc-catalog", ] @@ -1936,15 +1925,15 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" [[package]] name = "crc-fast" -version = "1.3.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bf62af4cc77d8fe1c22dde4e721d87f2f54056139d8c412e1366b740305f56f" +checksum = "6ddc2d09feefeee8bd78101665bd8645637828fa9317f9f292496dbbd8c65ff3" dependencies = [ "crc", "digest", - "libc", "rand 0.9.2", "regex", + "rustversion", ] [[package]] @@ -2051,7 +2040,7 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -2063,7 +2052,7 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", "rand_core 0.6.4", "subtle", "zeroize", @@ -2071,11 +2060,11 @@ dependencies = [ [[package]] name = "crypto-common" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", "typenum", ] @@ -2114,9 +2103,9 @@ dependencies = [ "html-escape", "humantime", "log", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "percent-encoding", - "reqwest 0.12.24", + "reqwest", "sectxtlib", "sequoia-openpgp", "serde", @@ -2132,21 +2121,21 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" +checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938" dependencies = [ "csv-core", "itoa", "ryu", - "serde", + "serde_core", ] [[package]] name = "csv-core" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d02f3b0da4c6504f86e9cd789d8dbafab48c2321be74e9987593de5a894d93d" +checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782" dependencies = [ "memchr", ] @@ -2175,7 +2164,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2192,9 +2181,9 @@ dependencies = [ [[package]] name = "cvss" -version = "2.1.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f643e062e9a8e26edea270945e05011c441ca6a56e9d9d4464c6b0be1352bd" +checksum = "f7fb220d3ce1b565af39cee5b89e47fd8dd1dab162900ee4363c8ee4169ee8a2" [[package]] name = "cvss-rs" @@ -2237,6 +2226,16 @@ dependencies = [ "darling_macro 0.21.3", ] +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + [[package]] name = "darling_core" version = "0.10.2" @@ -2262,7 +2261,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2276,7 +2275,20 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.106", + "syn 2.0.114", +] + +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 2.0.114", ] [[package]] @@ -2298,7 +2310,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2309,14 +2321,25 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.106", + "syn 2.0.114", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", + "quote", + "syn 2.0.114", ] [[package]] name = "data-encoding" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2330da5de22e8a3cb63252ce2abb30116bf5265e89c0e01bc17015ce30a476" +checksum = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea" [[package]] name = "deadpool" @@ -2358,9 +2381,9 @@ dependencies = [ [[package]] name = "deflate64" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da692b8d1080ea3045efaab14434d40468c3d8657e42abddfffca87b428f4c1b" +checksum = "26bf8fc351c5ed29b5c2f0cbbac1b209b74f60ecd62e675a998df72c49af5204" [[package]] name = "der" @@ -2385,9 +2408,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41953f86f8a05768a6cda24def994fd2f424b04ec5c719cf89989779f199071" +checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", "serde_core", @@ -2401,7 +2424,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2447,7 +2470,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2457,7 +2480,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core 0.20.2", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2466,31 +2489,33 @@ version = "0.99.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" dependencies = [ - "convert_case", + "convert_case 0.4.0", "proc-macro2", "quote", "rustc_version", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134" dependencies = [ "derive_more-impl", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ + "convert_case 0.10.0", "proc-macro2", "quote", - "syn 2.0.106", + "rustc_version", + "syn 2.0.114", "unicode-xid", ] @@ -2547,7 +2572,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2638,7 +2663,7 @@ dependencies = [ "der 0.6.1", "digest", "ff 0.12.1", - "generic-array 0.14.9", + "generic-array 0.14.7", "group 0.12.1", "pkcs8 0.9.0", "rand_core 0.6.4", @@ -2657,7 +2682,7 @@ dependencies = [ "crypto-bigint 0.5.5", "digest", "ff 0.13.1", - "generic-array 0.14.9", + "generic-array 0.14.7", "group 0.13.0", "hkdf", "pem-rfc7468", @@ -2701,7 +2726,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -2738,7 +2763,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -2816,21 +2841,20 @@ checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" [[package]] name = "filetime" -version = "0.2.26" +version = "0.2.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc0505cd1b6fa6580283f6bdf70a73fcf4aba1184038c90902b92b3dd0df63ed" +checksum = "f98844151eee8917efc50bd9e8318cb963ae8b297431495d3f758616ea5c57db" dependencies = [ "cfg-if", "libc", "libredox", - "windows-sys 0.60.2", ] [[package]] name = "find-msvc-tools" -version = "0.1.4" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127" +checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db" [[package]] name = "fixedbitset" @@ -2846,13 +2870,13 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.2" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" dependencies = [ "crc32fast", - "libz-rs-sys", "miniz_oxide", + "zlib-rs", ] [[package]] @@ -2993,7 +3017,7 @@ checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", "lock_api", - "parking_lot 0.12.4", + "parking_lot 0.12.5", ] [[package]] @@ -3002,6 +3026,16 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "futures-core", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.31" @@ -3010,7 +3044,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -3079,9 +3113,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.9" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -3090,9 +3124,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "1.3.3" +version = "1.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42bb3faf529935fbba0684910e1a71ecd271d618549d58f430b878619b7f4cf" +checksum = "eaf57c49a95fd1fe24b90b3033bee6dc7e8f1288d51494cb44e627c295e38542" dependencies = [ "rustversion", "typenum", @@ -3100,28 +3134,28 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi", - "wasi 0.14.7+wasi-0.2.4", + "wasip2", "wasm-bindgen", ] @@ -3134,20 +3168,20 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "git2" -version = "0.20.2" +version = "0.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" +checksum = "3e2b37e2f62729cdada11f0e6b3b6fe383c69c29fc619e391223e12856af308c" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "libc", "libgit2-sys", "log", - "openssl-probe", + "openssl-probe 0.1.6", "openssl-sys", "url", ] @@ -3160,9 +3194,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" [[package]] name = "globset" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a1028dfc5f5df5da8a56a73e6c153c9a9708ec57232470703592a3f18e49f5" +checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" dependencies = [ "aho-corasick", "bstr", @@ -3177,7 +3211,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "ignore", "walkdir", ] @@ -3228,7 +3262,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.11.4", + "indexmap 2.13.0", "slab", "tokio", "tokio-util", @@ -3237,17 +3271,17 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" +checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54" dependencies = [ "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http 1.3.1", - "indexmap 2.11.4", + "http 1.4.0", + "indexmap 2.13.0", "slab", "tokio", "tokio-util", @@ -3267,16 +3301,18 @@ dependencies = [ [[package]] name = "handlebars" -version = "5.1.2" +version = "6.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d08485b96a0e6393e9e4d1b8d48cf74ad6c063cd905eb33f42c1ce3f0377539b" +checksum = "9b3f9296c208515b87bd915a2f5d1163d4b3f863ba83337d7713cf478055948e" dependencies = [ + "derive_builder 0.20.2", "log", + "num-order", "pest", "pest_derive", "serde", "serde_json", - "thiserror 1.0.69", + "thiserror 2.0.18", ] [[package]] @@ -3301,9 +3337,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.16.0" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" [[package]] name = "hashlink" @@ -3375,7 +3411,7 @@ dependencies = [ "ipconfig", "moka", "once_cell", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "rand 0.9.2", "resolv-conf", "smallvec", @@ -3414,17 +3450,17 @@ dependencies = [ [[package]] name = "hmac-sha256" -version = "1.1.12" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad6880c8d4a9ebf39c6e8b77007ce223f646a4d21ce29d99f70cb16420545425" +checksum = "d0f0ae375a85536cac3a243e3a9cda80a47910348abdea7e2c22f8ec556d586d" [[package]] name = "home" -version = "0.5.11" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" +checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3449,12 +3485,11 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -3485,7 +3520,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.3.1", + "http 1.4.0", ] [[package]] @@ -3496,7 +3531,7 @@ checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ "bytes", "futures-core", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "pin-project-lite", ] @@ -3577,16 +3612,16 @@ dependencies = [ [[package]] name = "hyper" -version = "1.7.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" +checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" dependencies = [ "atomic-waker", "bytes", "futures-channel", "futures-core", - "h2 0.4.12", - "http 1.3.1", + "h2 0.4.13", + "http 1.4.0", "http-body 1.0.1", "httparse", "httpdate", @@ -3609,7 +3644,6 @@ dependencies = [ "hyper 0.14.32", "log", "rustls 0.21.12", - "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", ] @@ -3620,16 +3654,16 @@ version = "0.27.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" dependencies = [ - "http 1.3.1", - "hyper 1.7.0", + "http 1.4.0", + "hyper 1.8.1", "hyper-util", - "rustls 0.23.32", - "rustls-native-certs 0.8.1", + "rustls 0.23.36", + "rustls-native-certs", "rustls-pki-types", "tokio", - "tokio-rustls 0.26.3", + "tokio-rustls 0.26.4", "tower-service", - "webpki-roots 1.0.3", + "webpki-roots 1.0.5", ] [[package]] @@ -3638,7 +3672,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" dependencies = [ - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "pin-project-lite", "tokio", @@ -3653,7 +3687,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "native-tls", "tokio", @@ -3663,23 +3697,23 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.17" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ "base64 0.22.1", "bytes", "futures-channel", "futures-core", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", - "hyper 1.7.0", + "hyper 1.8.1", "ipnet", "libc", "percent-encoding", "pin-project-lite", - "socket2 0.6.1", + "socket2 0.6.2", "system-configuration", "tokio", "tower-service", @@ -3689,9 +3723,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.64" +version = "0.1.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" +checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -3699,7 +3733,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.0", + "windows-core 0.62.2", ] [[package]] @@ -3713,9 +3747,9 @@ dependencies = [ [[package]] name = "icu_collections" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47" +checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43" dependencies = [ "displaydoc", "potential_utf", @@ -3726,9 +3760,9 @@ dependencies = [ [[package]] name = "icu_locale_core" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a" +checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6" dependencies = [ "displaydoc", "litemap", @@ -3739,11 +3773,10 @@ dependencies = [ [[package]] name = "icu_normalizer" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979" +checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599" dependencies = [ - "displaydoc", "icu_collections", "icu_normalizer_data", "icu_properties", @@ -3754,42 +3787,38 @@ dependencies = [ [[package]] name = "icu_normalizer_data" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3" +checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a" [[package]] name = "icu_properties" -version = "2.0.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b" +checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec" dependencies = [ - "displaydoc", "icu_collections", "icu_locale_core", "icu_properties_data", "icu_provider", - "potential_utf", "zerotrie", "zerovec", ] [[package]] name = "icu_properties_data" -version = "2.0.1" +version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632" +checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af" [[package]] name = "icu_provider" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af" +checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614" dependencies = [ "displaydoc", "icu_locale_core", - "stable_deref_trait", - "tinystr", "writeable", "yoke", "zerofrom", @@ -3826,9 +3855,9 @@ dependencies = [ [[package]] name = "ignore" -version = "0.4.23" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" +checksum = "d3d782a365a015e0f5c04902246139249abf769125006fbe7649e2ee88169b4a" dependencies = [ "crossbeam-deque", "globset", @@ -3859,12 +3888,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.11.4" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" dependencies = [ "equivalent", - "hashbrown 0.16.0", + "hashbrown 0.16.1", "serde", "serde_core", ] @@ -3902,7 +3931,7 @@ checksum = "c727f80bfa4a6c6e2508d2f05b6f4bfce242030bd88ed15ae5331c5b5d30fba7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -3911,7 +3940,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" dependencies = [ - "generic-array 0.14.9", + "generic-array 0.14.7", ] [[package]] @@ -3946,9 +3975,9 @@ checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] name = "iri-string" -version = "0.7.8" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" dependencies = [ "memchr", "serde", @@ -3956,9 +3985,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "itertools" @@ -3998,31 +4027,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "jni" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" -dependencies = [ - "cesu8", - "cfg-if", - "combine", - "jni-sys", - "log", - "thiserror 1.0.69", - "walkdir", - "windows-sys 0.45.0", -] - -[[package]] -name = "jni-sys" -version = "0.3.0" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" [[package]] name = "jobserver" @@ -4030,15 +4037,15 @@ version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9afb3de4395d6b3e67a780b6de64b51c978ecf11cb9a462c66be7d4ca9039d33" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "libc", ] [[package]] name = "js-sys" -version = "0.3.81" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec48937a97411dcb524a265206ccd4c90bb711fca92b2792c407f268825b9305" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -4246,15 +4253,15 @@ checksum = "2c4a545a15244c7d945065b5d392b2d2d7f21526fba56ce51467b06ed445e8f7" [[package]] name = "libc" -version = "0.2.177" +version = "0.2.180" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc" [[package]] name = "libgit2-sys" -version = "0.18.2+1.9.1" +version = "0.18.3+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222" +checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" dependencies = [ "cc", "libc", @@ -4264,30 +4271,20 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "libloading" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" -dependencies = [ - "cfg-if", - "windows-targets 0.53.3", -] - [[package]] name = "liblzma" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10bf66f4598dc77ff96677c8e763655494f00ff9c1cf79e2eb5bb07bc31f807d" +checksum = "73c36d08cad03a3fbe2c4e7bb3a9e84c57e4ee4135ed0b065cade3d98480c648" dependencies = [ "liblzma-sys", ] [[package]] name = "liblzma-sys" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b9596486f6d60c3bbe644c0e1be1aa6ccc472ad630fe8927b456973d7cb736" +checksum = "9f2db66f3268487b5033077f266da6777d057949b8f93c8ad82e441df25e6186" dependencies = [ "cc", "libc", @@ -4296,19 +4293,19 @@ dependencies = [ [[package]] name = "libm" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb" +checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "libc", - "redox_syscall 0.5.17", + "redox_syscall 0.7.0", ] [[package]] @@ -4335,20 +4332,11 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "libz-rs-sys" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "840db8cf39d9ec4dd794376f38acc40d0fc65eec2a8f484f7fd375b84602becd" -dependencies = [ - "zlib-rs", -] - [[package]] name = "libz-sys" -version = "1.1.22" +version = "1.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b70e7a7df205e92a1a4cd9aaae7898dac0aa555503cc0a649494d0d60e7651d" +checksum = "15d118bbf3771060e7311cc7bb0545b01d08a8b4a7de949198dec1fa0ca1c0f7" dependencies = [ "cc", "libc", @@ -4364,9 +4352,9 @@ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "litemap" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956" +checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77" [[package]] name = "local-channel" @@ -4387,19 +4375,18 @@ checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" [[package]] name = "lock_api" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" dependencies = [ - "autocfg", "scopeguard", ] [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lru" @@ -4453,9 +4440,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "memsec" @@ -4492,33 +4479,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.4" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "log", - "wasi 0.11.1+wasi-snapshot-preview1", - "windows-sys 0.59.0", + "wasi", + "windows-sys 0.61.2", ] [[package]] name = "moka" -version = "0.12.11" +version = "0.12.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8261cd88c312e0004c1d51baad2980c66528dfdb2bee62003e643a4d8f86b077" +checksum = "b4ac832c50ced444ef6be0767a008b02c106a909ba79d1d830501e94b96f6b7e" dependencies = [ "crossbeam-channel", "crossbeam-epoch", "crossbeam-utils", "equivalent", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "portable-atomic", - "rustc_version", "smallvec", "tagptr", "uuid", @@ -4533,7 +4520,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.3.1", + "http 1.4.0", "httparse", "memchr", "mime", @@ -4550,7 +4537,7 @@ dependencies = [ "libc", "log", "openssl", - "openssl-probe", + "openssl-probe 0.1.6", "openssl-sys", "schannel", "security-framework 2.11.1", @@ -4580,7 +4567,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -4595,11 +4582,10 @@ dependencies = [ [[package]] name = "num-bigint-dig" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" +checksum = "e661dda6640fad38e827a6d4a310ff4763082116fe217f279885c97f511bb0b7" dependencies = [ - "byteorder", "lazy_static", "libm", "num-integer", @@ -4612,9 +4598,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-format" @@ -4646,6 +4632,21 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-modular" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17bb261bf36fa7d83f4c294f834e91256769097b3cb505d44831e0a179ac647f" + +[[package]] +name = "num-order" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537b596b97c40fcf8056d153049eb22f481c17ebce72a513ec9286e4986d1bb6" +dependencies = [ + "num-modular", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -4683,10 +4684,10 @@ checksum = "51e219e79014df21a225b1860a479e2dcd7cbd9130f4defd4bd0e191ea31d67d" dependencies = [ "base64 0.22.1", "chrono", - "getrandom 0.2.16", - "http 1.3.1", + "getrandom 0.2.17", + "http 1.4.0", "rand 0.8.5", - "reqwest 0.12.24", + "reqwest", "serde", "serde_json", "serde_path_to_error", @@ -4704,14 +4705,14 @@ dependencies = [ "bytes", "chrono", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-auth", "jwt", "lazy_static", "oci-spec", "olpc-cjson", "regex", - "reqwest 0.12.24", + "reqwest", "serde", "serde_json", "sha2", @@ -4723,9 +4724,9 @@ dependencies = [ [[package]] name = "oci-spec" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2078e2f6be932a4de9aca90a375a45590809dfb5a08d93ab1ee217107aceeb67" +checksum = "fc3da52b83ce3258fbf29f66ac784b279453c2ac3c22c5805371b921ede0d308" dependencies = [ "const_format", "derive_builder 0.20.2", @@ -4761,9 +4762,9 @@ dependencies = [ [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "oorandom" @@ -4782,7 +4783,7 @@ dependencies = [ "chrono", "lazy_static", "mime", - "reqwest 0.12.24", + "reqwest", "serde", "serde_json", "thiserror 1.0.69", @@ -4799,10 +4800,10 @@ dependencies = [ "base64 0.22.1", "biscuit", "chrono", - "getrandom 0.3.3", + "getrandom 0.3.4", "hmac-sha256", "mime", - "reqwest 0.12.24", + "reqwest", "serde", "serde_json", "thiserror 1.0.69", @@ -4821,7 +4822,7 @@ dependencies = [ "dyn-clone", "ed25519-dalek", "hmac", - "http 1.3.1", + "http 1.4.0", "itertools 0.10.5", "log", "oauth2", @@ -4843,11 +4844,11 @@ dependencies = [ [[package]] name = "openssl" -version = "0.10.73" +version = "0.10.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8" +checksum = "08838db121398ad17ab8531ce9de97b244589089e290a384c900cb9ff7434328" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "cfg-if", "foreign-types", "libc", @@ -4864,7 +4865,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -4873,20 +4874,26 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" +[[package]] +name = "openssl-probe" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" + [[package]] name = "openssl-src" -version = "300.5.2+3.5.2" +version = "300.5.5+3.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d270b79e2926f5150189d475bc7e9d2c69f9c4697b185fa917d5a32b792d21b4" +checksum = "3f1787d533e03597a7934fd0a765f0d28e94ecc5fb7789f8053b1e699a56f709" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.109" +version = "0.9.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571" +checksum = "82cab2d520aa75e3c58898289429321eb788c3106963d0dc886ec7a5f4adc321" dependencies = [ "cc", "libc", @@ -4917,9 +4924,9 @@ checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d" dependencies = [ "async-trait", "bytes", - "http 1.3.1", + "http 1.4.0", "opentelemetry", - "reqwest 0.12.24", + "reqwest", ] [[package]] @@ -4942,13 +4949,13 @@ version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" dependencies = [ - "http 1.3.1", + "http 1.4.0", "opentelemetry", "opentelemetry-http", "opentelemetry-proto", "opentelemetry_sdk", "prost", - "reqwest 0.12.24", + "reqwest", "thiserror 2.0.18", "tokio", "tonic", @@ -5039,7 +5046,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -5156,12 +5163,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.4" +version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" dependencies = [ "lock_api", - "parking_lot_core 0.9.11", + "parking_lot_core 0.9.12", ] [[package]] @@ -5180,15 +5187,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.11" +version = "0.9.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.17", + "redox_syscall 0.5.18", "smallvec", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -5211,12 +5218,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "path-matchers" version = "1.0.2" @@ -5281,12 +5282,11 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.2" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e0a3a33733faeaf8651dfee72dd0f388f0c8e5ad496a3478fa5a922f49cfa8" +checksum = "2c9eb05c21a464ea704b53158d358a31e6425db2f63a1a7312268b05fe2b75f7" dependencies = [ "memchr", - "thiserror 2.0.18", "ucd-trie", ] @@ -5314,9 +5314,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.2" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc58706f770acb1dbd0973e6530a3cff4746fb721207feb3a8a6064cd0b6c663" +checksum = "68f9dbced329c441fa79d80472764b1a2c7e57123553b8519b36663a2fb234ed" dependencies = [ "pest", "pest_generator", @@ -5324,22 +5324,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.2" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d4f36811dfe07f7b8573462465d5cb8965fffc2e71ae377a33aecf14c2c9a2f" +checksum = "3bb96d5051a78f44f43c8f712d8e810adb0ebf923fc9ed2655a7f66f63ba8ee5" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "pest_meta" -version = "2.8.2" +version = "2.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42919b05089acbd0a5dcd5405fb304d17d1053847b81163d09c4ad18ce8e8420" +checksum = "602113b5b5e8621770cfd490cfd90b9f84ab29bd2b0e49ad83eb6d186cef2365" dependencies = [ "pest", "sha2", @@ -5352,18 +5352,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset 0.4.2", - "indexmap 2.11.4", + "indexmap 2.13.0", ] [[package]] name = "petgraph" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca" +checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455" dependencies = [ "fixedbitset 0.5.7", "hashbrown 0.15.5", - "indexmap 2.11.4", + "indexmap 2.13.0", "serde", "serde_derive", ] @@ -5432,7 +5432,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -5512,11 +5512,25 @@ dependencies = [ "plotters-backend", ] +[[package]] +name = "polling" +version = "3.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi", + "pin-project-lite", + "rustix", + "windows-sys 0.61.2", +] + [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" [[package]] name = "postgresql_archive" @@ -5530,7 +5544,7 @@ dependencies = [ "hex", "num-format", "regex-lite", - "reqwest 0.12.24", + "reqwest", "reqwest-middleware", "reqwest-retry", "reqwest-tracing", @@ -5579,9 +5593,9 @@ dependencies = [ [[package]] name = "potential_utf" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a" +checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77" dependencies = [ "zerovec", ] @@ -5594,9 +5608,9 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppmd-rust" -version = "1.2.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c834641d8ad1b348c9ee86dec3b9840d805acd5f24daa5f90c788951a52ff59b" +checksum = "efca4c95a19a79d1c98f791f10aebd5c1363b473244630bb7dbde1dc98455a24" [[package]] name = "ppv-lite86" @@ -5630,7 +5644,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -5670,14 +5684,14 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -5690,16 +5704,16 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", "version_check", "yansi", ] [[package]] name = "prost" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" +checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ "bytes", "prost-derive", @@ -5707,15 +5721,15 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.14.1" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" +checksum = "27c6023962132f4b30eb4c172c91ce92d933da334c59c23cddee82358ddafb0b" dependencies = [ "anyhow", "itertools 0.14.0", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -5740,9 +5754,9 @@ dependencies = [ [[package]] name = "quick-xml" -version = "0.38.3" +version = "0.38.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89" +checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c" dependencies = [ "memchr", ] @@ -5759,8 +5773,8 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.32", - "socket2 0.6.1", + "rustls 0.23.36", + "socket2 0.6.2", "thiserror 2.0.18", "tokio", "tracing", @@ -5773,14 +5787,13 @@ version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" dependencies = [ - "aws-lc-rs", "bytes", - "getrandom 0.3.3", + "getrandom 0.3.4", "lru-slab", "rand 0.9.2", "ring", "rustc-hash", - "rustls 0.23.32", + "rustls 0.23.36", "rustls-pki-types", "slab", "thiserror 2.0.18", @@ -5798,16 +5811,16 @@ dependencies = [ "cfg_aliases", "libc", "once_cell", - "socket2 0.6.1", + "socket2 0.6.2", "tracing", "windows-sys 0.60.2", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -5842,7 +5855,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ "rand_chacha 0.9.0", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -5862,7 +5875,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", + "rand_core 0.9.5", ] [[package]] @@ -5871,16 +5884,16 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", ] [[package]] name = "rand_core" -version = "0.9.3" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", ] [[package]] @@ -5914,11 +5927,20 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.17" +version = "0.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", +] + +[[package]] +name = "redox_syscall" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +dependencies = [ + "bitflags 2.10.0", ] [[package]] @@ -5927,29 +5949,29 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.16", + "getrandom 0.2.17", "libredox", "thiserror 1.0.69", ] [[package]] name = "ref-cast" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -6004,9 +6026,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.12.24" +version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" +checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ "base64 0.22.1", "bytes", @@ -6014,11 +6036,11 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.4.12", - "http 1.3.1", + "h2 0.4.13", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-rustls 0.27.7", "hyper-tls", "hyper-util", @@ -6029,8 +6051,8 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.32", - "rustls-native-certs 0.8.1", + "rustls 0.23.36", + "rustls-native-certs", "rustls-pki-types", "serde", "serde_json", @@ -6038,7 +6060,7 @@ dependencies = [ "sync_wrapper", "tokio", "tokio-native-tls", - "tokio-rustls 0.26.3", + "tokio-rustls 0.26.4", "tokio-util", "tower", "tower-http", @@ -6048,53 +6070,7 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots 1.0.3", -] - -[[package]] -name = "reqwest" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e9018c9d814e5f30cc16a0f03271aeab3571e609612d9fe78c1aa8d11c2f62" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.4.12", - "http 1.3.1", - "http-body 1.0.1", - "http-body-util", - "hyper 1.7.0", - "hyper-rustls 0.27.7", - "hyper-tls", - "hyper-util", - "js-sys", - "log", - "mime", - "native-tls", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls 0.23.32", - "rustls-pki-types", - "rustls-platform-verifier", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.26.3", - "tower", - "tower-http", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "webpki-roots 1.0.5", ] [[package]] @@ -6105,8 +6081,8 @@ checksum = "57f17d28a6e6acfe1733fe24bcd30774d13bffa4b8a22535b4c8c98423088d4e" dependencies = [ "anyhow", "async-trait", - "http 1.3.1", - "reqwest 0.12.24", + "http 1.4.0", + "reqwest", "serde", "thiserror 1.0.69", "tower-service", @@ -6121,11 +6097,11 @@ dependencies = [ "anyhow", "async-trait", "futures", - "getrandom 0.2.16", - "http 1.3.1", - "hyper 1.7.0", + "getrandom 0.2.17", + "http 1.4.0", + "hyper 1.8.1", "parking_lot 0.11.2", - "reqwest 0.12.24", + "reqwest", "reqwest-middleware", "retry-policies", "thiserror 1.0.69", @@ -6142,19 +6118,19 @@ checksum = "d70ea85f131b2ee9874f0b160ac5976f8af75f3c9badfe0d955880257d10bd83" dependencies = [ "anyhow", "async-trait", - "getrandom 0.2.16", - "http 1.3.1", + "getrandom 0.2.17", + "http 1.4.0", "matchit", - "reqwest 0.12.24", + "reqwest", "reqwest-middleware", "tracing", ] [[package]] name = "resolv-conf" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799" +checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" [[package]] name = "retry-policies" @@ -6194,7 +6170,7 @@ checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.16", + "getrandom 0.2.17", "libc", "untrusted", "windows-sys 0.52.0", @@ -6202,9 +6178,9 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" +checksum = "2297bf9c81a3f0dc96bc9521370b88f054168c29826a75e89c55ff196e7ed6a1" dependencies = [ "bitvec", "bytecheck", @@ -6220,9 +6196,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.45" +version = "0.7.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" +checksum = "84d7b42d4b8d06048d3ac8db0eb31bcb942cbeb709f0b5f2b2ebde398d3038f5" dependencies = [ "proc-macro2", "quote", @@ -6231,22 +6207,19 @@ dependencies = [ [[package]] name = "rmp" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" +checksum = "4ba8be72d372b2c9b35542551678538b562e7cf86c3315773cae48dfbfe7790c" dependencies = [ - "byteorder", "num-traits", - "paste", ] [[package]] name = "rmp-serde" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" +checksum = "72f81bee8c8ef9b577d1681a70ebbc962c232461e397b22c208c43c04b67a155" dependencies = [ - "byteorder", "rmp", "serde", ] @@ -6259,9 +6232,9 @@ checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97" [[package]] name = "rsa" -version = "0.9.8" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78928ac1ed176a5ca1d17e578a1825f3d81ca54cf41053a592584b020cfd691b" +checksum = "b8573f03f5883dcaebdfcf4725caa1ecb9c15b2ef50c43a07b816e06799bb12d" dependencies = [ "const-oid", "digest", @@ -6302,7 +6275,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.106", + "syn 2.0.114", "unicode-ident", ] @@ -6314,14 +6287,14 @@ checksum = "9d9848531d60c9cbbcf9d166c885316c24bc0e2a9d3eba0956bb6cbbd79bc6e8" dependencies = [ "base64 0.21.7", "blake2b_simd", - "constant_time_eq", + "constant_time_eq 0.3.1", ] [[package]] name = "rust-embed" -version = "8.7.2" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "025908b8682a26ba8d12f6f2d66b987584a4a87bc024abc5bbc12553a8cd178a" +checksum = "04113cb9355a377d83f06ef1f0a45b8ab8cd7d8b1288160717d66df5c7988d27" dependencies = [ "rust-embed-impl", "rust-embed-utils", @@ -6330,22 +6303,22 @@ dependencies = [ [[package]] name = "rust-embed-impl" -version = "8.7.2" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6065f1a4392b71819ec1ea1df1120673418bf386f50de1d6f54204d836d4349c" +checksum = "da0902e4c7c8e997159ab384e6d0fc91c221375f6894346ae107f47dd0f3ccaa" dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.106", + "syn 2.0.114", "walkdir", ] [[package]] name = "rust-embed-utils" -version = "8.7.2" +version = "8.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6cc0c81648b20b70c491ff8cce00c1c3b223bb8ed2b5d41f0e54c6c4c0a3594" +checksum = "5bcdef0be6fe7f6fa333b1073c949729274b05f123a0ad7efcb8efd878e5c3b1" dependencies = [ "sha2", "walkdir", @@ -6353,9 +6326,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35affe401787a9bd846712274d97654355d21b2a2c092a3139aabe31e9022282" +checksum = "61f703d19852dbf87cbc513643fa81428361eb6940f1ac14fd58155d295a3eb0" dependencies = [ "arrayvec", "borsh", @@ -6384,15 +6357,15 @@ dependencies = [ [[package]] name = "rustix" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" +checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -6409,89 +6382,41 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.32" +version = "0.23.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd3c25631629d034ce7cd9940adc9d45762d46de2b0f57193c4443b92c6d4d40" +checksum = "c665f33d38cea657d9614f766881e4d510e0eda4239891eea56b4cadcf01801b" dependencies = [ "aws-lc-rs", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.103.6", + "rustls-webpki 0.103.9", "subtle", "zeroize", ] [[package]] name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework 2.11.1", -] - -[[package]] -name = "rustls-native-certs" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ - "openssl-probe", + "openssl-probe 0.2.1", "rustls-pki-types", "schannel", - "security-framework 3.5.0", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", + "security-framework 3.5.1", ] [[package]] name = "rustls-pki-types" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ "web-time", "zeroize", ] -[[package]] -name = "rustls-platform-verifier" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d99feebc72bae7ab76ba994bb5e121b8d83d910ca40b36e0921f53becc41784" -dependencies = [ - "core-foundation 0.10.1", - "core-foundation-sys", - "jni", - "log", - "once_cell", - "rustls 0.23.32", - "rustls-native-certs 0.8.1", - "rustls-platform-verifier-android", - "rustls-webpki 0.103.6", - "security-framework 3.5.0", - "security-framework-sys", - "webpki-root-certs", - "windows-sys 0.61.0", -] - -[[package]] -name = "rustls-platform-verifier-android" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" - [[package]] name = "rustls-webpki" version = "0.101.7" @@ -6504,9 +6429,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.6" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "aws-lc-rs", "ring", @@ -6522,9 +6447,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" +checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" [[package]] name = "same-file" @@ -6558,8 +6483,8 @@ dependencies = [ "futures", "humantime", "log", - "parking_lot 0.12.4", - "reqwest 0.12.24", + "parking_lot 0.12.5", + "reqwest", "sequoia-openpgp", "serde", "serde-cyclonedx", @@ -6579,7 +6504,7 @@ version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" dependencies = [ - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -6636,13 +6561,13 @@ dependencies = [ [[package]] name = "schemars" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +checksum = "54e910108742c57a770f492731f99be216a52fadd361b06c8fb59d74ccc267d2" dependencies = [ "dyn-clone", "ref-cast", - "schemars_derive 1.0.4", + "schemars_derive 1.2.0", "serde", "serde_json", "url", @@ -6657,19 +6582,19 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "schemars_derive" -version = "1.0.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80" +checksum = "4908ad288c5035a8eb12cfdf0d49270def0a268ee162b75eeee0f85d155a7c45" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -6698,20 +6623,20 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "sea-orm" -version = "1.1.17" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "699b1ec145a6530c8f862eed7529d8a6068392e628d81cc70182934001e9c2a3" +checksum = "6d945f62558fac19e5988680d2fdf747b734c2dbc6ce2cb81ba33ed8dde5b103" dependencies = [ "async-stream", "async-trait", "bigdecimal", "chrono", - "derive_more 2.0.1", + "derive_more 2.1.1", "futures-util", "log", "ouroboros", @@ -6733,9 +6658,9 @@ dependencies = [ [[package]] name = "sea-orm-cli" -version = "1.1.17" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cd31ebb07814d4c7b73796708bfab6c13d22f8db072cdb5115f967f4d5d2c" +checksum = "c94492e2ab6c045b4cc38013809ce255d14c3d352c9f0d11e6b920e2adc948ad" dependencies = [ "chrono", "clap", @@ -6752,23 +6677,23 @@ dependencies = [ [[package]] name = "sea-orm-macros" -version = "1.1.17" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c964f4b7f34f53decf381bc88f03187b9355e07f356ce65544626e781a9585" +checksum = "84c2e64a50a9cc8339f10a27577e10062c7f995488e469f2c95762c5ee847832" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", "sea-bae", - "syn 2.0.106", + "syn 2.0.114", "unicode-ident", ] [[package]] name = "sea-orm-migration" -version = "1.1.17" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "977e3f71486b04371026d1ecd899f49cf437f832cd11d463f8948ee02e47ed9e" +checksum = "7315c0cadb7e60fb17ee2bb282aa27d01911fc2a7e5836ec1d4ac37d19250bb4" dependencies = [ "async-trait", "clap", @@ -6823,7 +6748,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", "thiserror 2.0.18", ] @@ -6849,7 +6774,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -6866,7 +6791,7 @@ checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" dependencies = [ "base16ct 0.1.1", "der 0.6.1", - "generic-array 0.14.9", + "generic-array 0.14.7", "pkcs8 0.9.0", "subtle", "zeroize", @@ -6880,7 +6805,7 @@ checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ "base16ct 0.2.0", "der 0.7.10", - "generic-array 0.14.9", + "generic-array 0.14.7", "pkcs8 0.10.2", "subtle", "zeroize", @@ -6906,7 +6831,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation 0.9.4", "core-foundation-sys", "libc", @@ -6915,11 +6840,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "3.5.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc198e42d9b7510827939c9a15f5062a0c913f3371d765977e586d2fe6c16f4a" +checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation 0.10.1", "core-foundation-sys", "libc", @@ -6948,9 +6873,9 @@ dependencies = [ [[package]] name = "sequoia-openpgp" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "015e5fc3d023418b9db98ca9a7f3e90b305872eeafe5ca45c5c32b5eb335c1e8" +checksum = "f0e334ce3ec5b9b47d86a80563b3ecec435f59acf37e86058b3b686a42c5a2ba" dependencies = [ "anyhow", "argon2", @@ -6958,7 +6883,7 @@ dependencies = [ "buffered-reader", "chrono", "dyn-clone", - "getrandom 0.2.16", + "getrandom 0.2.17", "idna", "lalrpop", "lalrpop-util", @@ -6997,7 +6922,7 @@ dependencies = [ "schemafy_lib", "serde", "serde_json", - "syn 2.0.106", + "syn 2.0.114", "thiserror 1.0.69", ] @@ -7028,7 +6953,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7039,7 +6964,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7048,7 +6973,7 @@ version = "1.0.149" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.13.0", "itoa", "memchr", "serde", @@ -7062,7 +6987,7 @@ version = "0.9.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e408f29489b5fd500fab51ff1484fc859bb655f32c671f307dcd733b72e8168c" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.13.0", "itoa", "ryu", "serde", @@ -7103,19 +7028,18 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.14.1" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c522100790450cf78eeac1507263d0a350d4d5b30df0c8e1fe051a10c22b376e" +checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.11.4", + "indexmap 2.13.0", "schemars 0.9.0", - "schemars 1.0.4", - "serde", - "serde_derive", + "schemars 1.2.0", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -7123,14 +7047,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.14.1" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327ada00f7d64abaac1e55a6911e90cf665aa051b9a561c7006c157f4633135e" +checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7139,7 +7063,7 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4db627b98b36d4203a7b458cf3573730f2bb591b28871d916dfa9efabfd41f" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.13.0", "itoa", "ryu", "serde", @@ -7170,7 +7094,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f606421e4a6012877e893c399822a4ed4b089164c5969424e1b9d1e66e6964b" dependencies = [ "digest", - "generic-array 1.3.3", + "generic-array 1.3.5", ] [[package]] @@ -7201,10 +7125,11 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ + "errno", "libc", ] @@ -7230,9 +7155,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" [[package]] name = "simdutf8" @@ -7242,9 +7167,9 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "siphasher" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" +checksum = "b2aa850e253778c88a04c3d7323b043aeda9d3e30d5971937c1855769763678e" [[package]] name = "slab" @@ -7283,9 +7208,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", "windows-sys 0.60.2", @@ -7389,14 +7314,14 @@ dependencies = [ "futures-util", "hashbrown 0.15.5", "hashlink", - "indexmap 2.11.4", + "indexmap 2.13.0", "log", "memchr", "native-tls", "once_cell", "percent-encoding", "rust_decimal", - "rustls 0.23.32", + "rustls 0.23.36", "serde", "serde_json", "sha2", @@ -7421,7 +7346,7 @@ dependencies = [ "quote", "sqlx-core", "sqlx-macros-core", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7444,7 +7369,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 2.0.106", + "syn 2.0.114", "tokio", "url", ] @@ -7458,7 +7383,7 @@ dependencies = [ "atoi", "base64 0.22.1", "bigdecimal", - "bitflags 2.9.4", + "bitflags 2.10.0", "byteorder", "bytes", "chrono", @@ -7470,7 +7395,7 @@ dependencies = [ "futures-core", "futures-io", "futures-util", - "generic-array 0.14.9", + "generic-array 0.14.7", "hex", "hkdf", "hmac", @@ -7505,7 +7430,7 @@ dependencies = [ "atoi", "base64 0.22.1", "bigdecimal", - "bitflags 2.9.4", + "bitflags 2.10.0", "byteorder", "chrono", "crc", @@ -7613,7 +7538,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" dependencies = [ "new_debug_unreachable", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "phf_shared", "precomputed-hash", ] @@ -7669,7 +7594,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7682,7 +7607,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7694,7 +7619,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7716,9 +7641,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" dependencies = [ "proc-macro2", "quote", @@ -7742,7 +7667,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7751,7 +7676,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "core-foundation 0.9.4", "system-configuration-sys", ] @@ -7801,27 +7726,27 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96374855068f47402c3121c6eed88d29cb1de8f3ab27090e273e420bdabcf050" dependencies = [ - "parking_lot 0.12.4", + "parking_lot 0.12.5", ] [[package]] name = "tempfile" -version = "3.23.0" +version = "3.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" +checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" dependencies = [ "fastrand", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "rustix", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] name = "tera" -version = "1.20.0" +version = "1.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9d851b45e865f178319da0abdbfe6acbc4328759ff18dafc3a41c16b4cd2ee" +checksum = "e8004bca281f2d32df3bacd59bc67b312cb4c70cea46cbd79dbe8ac5ed206722" dependencies = [ "chrono", "chrono-tz", @@ -7836,7 +7761,7 @@ dependencies = [ "serde", "serde_json", "slug", - "unic-segment", + "unicode-segmentation", ] [[package]] @@ -7868,14 +7793,14 @@ checksum = "aabcca9d2cad192cfe258cd3562b7584516191a5c9b6a0002a6bb8b75ee7d21d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "test-log" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e33b98a582ea0be1168eba097538ee8dd4bbe0f2b01b22ac92ea30054e5be7b" +checksum = "37d53ac171c92a39e4769491c4b4dde7022c60042254b5fc044ae409d34a24d4" dependencies = [ "env_logger", "test-log-macros", @@ -7884,13 +7809,13 @@ dependencies = [ [[package]] name = "test-log-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451b374529930d7601b1eef8d32bc79ae870b6079b069401709c2a8bf9e75f36" +checksum = "be35209fd0781c5401458ab66e4f98accf63553e8fae7425503e92fdd319783b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7919,7 +7844,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7930,7 +7855,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -7950,9 +7875,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.44" +version = "0.3.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d" +checksum = "9da98b7d9b7dad93488a84b8248efc35352b0b2657397d4167e7ad67e5d535e5" dependencies = [ "deranged", "itoa", @@ -7960,22 +7885,22 @@ dependencies = [ "num-conv", "num_threads", "powerfmt", - "serde", + "serde_core", "time-core", "time-macros", ] [[package]] name = "time-core" -version = "0.1.6" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "time-macros" -version = "0.2.24" +version = "0.2.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3" +checksum = "78cc610bac2dcee56805c99642447d4c5dbde4d01f752ffea0199aee1f601dc4" dependencies = [ "num-conv", "time-core", @@ -7992,9 +7917,9 @@ dependencies = [ [[package]] name = "tinystr" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b" +checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869" dependencies = [ "displaydoc", "zerovec", @@ -8034,12 +7959,12 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "pin-project-lite", "signal-hook-registry", - "socket2 0.6.1", + "socket2 0.6.2", "tokio-macros", - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -8050,7 +7975,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -8086,19 +8011,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f63835928ca123f1bef57abbcd23bb2ba0ac9ae1235f1e65bda0d06e7786bd" +checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.32", + "rustls 0.23.36", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -8107,9 +8032,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.16" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" +checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" dependencies = [ "bytes", "futures-core", @@ -8134,20 +8059,20 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.3" +version = "0.7.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533" +checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.7" +version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.13.0", "toml_datetime", "toml_parser", "winnow", @@ -8155,26 +8080,26 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.4" +version = "1.0.6+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" +checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" dependencies = [ "winnow", ] [[package]] name = "tonic" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" +checksum = "a286e33f82f8a1ee2df63f4fa35c0becf4a85a0cb03091a15fd7bf0b402dc94a" dependencies = [ "async-trait", "base64 0.22.1", "bytes", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-timeout", "hyper-util", "percent-encoding", @@ -8190,9 +8115,9 @@ dependencies = [ [[package]] name = "tonic-prost" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" +checksum = "d6c55a2d6a14174563de34409c9f92ff981d006f56da9c6ecd40d9d4a31500b0" dependencies = [ "bytes", "prost", @@ -8201,13 +8126,13 @@ dependencies = [ [[package]] name = "tower" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" dependencies = [ "futures-core", "futures-util", - "indexmap 2.11.4", + "indexmap 2.13.0", "pin-project-lite", "slab", "sync_wrapper", @@ -8224,10 +8149,10 @@ version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" dependencies = [ - "bitflags 2.9.4", + "bitflags 2.10.0", "bytes", "futures-util", - "http 1.3.1", + "http 1.4.0", "http-body 1.0.1", "iri-string", "pin-project-lite", @@ -8250,9 +8175,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", "pin-project-lite", @@ -8262,20 +8187,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" dependencies = [ "once_cell", "valuable", @@ -8317,16 +8242,13 @@ dependencies = [ [[package]] name = "tracing-opentelemetry" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6e5658463dd88089aba75c7791e1d3120633b1bfde22478b28f625a9bb1b8e" +checksum = "1ac28f2d093c6c477eaa76b23525478f38de514fa9aeb1285738d4b97a9552fc" dependencies = [ "js-sys", "opentelemetry", - "opentelemetry_sdk", - "rustversion", "smallvec", - "thiserror 2.0.18", "tracing", "tracing-core", "tracing-log", @@ -8336,9 +8258,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", @@ -8371,8 +8293,8 @@ dependencies = [ "jsonpath-rust", "log", "openid 0.18.3", - "reqwest 0.13.1", - "schemars 1.0.4", + "reqwest", + "schemars 1.2.0", "serde", "serde_json", "serde_yaml_ng", @@ -8394,7 +8316,7 @@ dependencies = [ "dotenvy", "futures", "indicatif", - "reqwest 0.13.1", + "reqwest", "serde", "serde_json", "thiserror 2.0.18", @@ -8425,11 +8347,11 @@ dependencies = [ "pem", "rand 0.9.2", "regex", - "reqwest 0.13.1", + "reqwest", "ring", "rstest", "sbom-walker", - "schemars 1.0.4", + "schemars 1.2.0", "sea-orm", "sea-orm-migration", "sea-query", @@ -8491,7 +8413,7 @@ dependencies = [ "deepsize", "log", "rstest", - "schemars 1.0.4", + "schemars 1.2.0", "sea-orm", "serde", "serde_json", @@ -8520,7 +8442,7 @@ dependencies = [ "bytesize", "clap", "futures", - "http 1.3.1", + "http 1.4.0", "log", "mime", "openssl", @@ -8528,8 +8450,8 @@ dependencies = [ "opentelemetry-instrumentation-actix-web", "opentelemetry-otlp", "opentelemetry_sdk", - "parking_lot 0.12.4", - "reqwest 0.13.1", + "parking_lot 0.12.5", + "reqwest", "serde", "serde_json", "tokio", @@ -8603,8 +8525,8 @@ dependencies = [ "moka", "opentelemetry", "packageurl", - "parking_lot 0.12.4", - "petgraph 0.8.2", + "parking_lot 0.12.5", + "petgraph 0.8.3", "rstest", "sea-orm", "sea-query", @@ -8661,7 +8583,7 @@ dependencies = [ "osv", "packageurl", "regex", - "reqwest 0.13.1", + "reqwest", "roxmltree", "sanitize-filename", "sea-orm", @@ -8751,11 +8673,11 @@ dependencies = [ "oci-client", "opentelemetry", "osv", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "regex", - "reqwest 0.13.1", + "reqwest", "sbom-walker", - "schemars 1.0.4", + "schemars 1.2.0", "sea-orm", "sea-query", "serde", @@ -8807,7 +8729,7 @@ dependencies = [ "log", "osv", "packageurl", - "parking_lot 0.12.4", + "parking_lot 0.12.5", "quick-xml", "rand 0.9.2", "roxmltree", @@ -8929,7 +8851,7 @@ name = "trustify-query-derive" version = "0.4.0-beta.1" dependencies = [ "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -8989,7 +8911,7 @@ dependencies = [ "osv", "peak_alloc", "postgresql_embedded", - "reqwest 0.13.1", + "reqwest", "serde", "serde_json", "sha2", @@ -9040,7 +8962,7 @@ dependencies = [ [[package]] name = "trustify-ui" version = "0.1.0" -source = "git+https://github.com/guacsec/trustify-ui.git?branch=publish%2Fmain#5e64b9adcc138efb1b4cc21cfc60d19a46e8e174" +source = "git+https://github.com/guacsec/trustify-ui.git?branch=publish%2Fmain#d95f54b161d894c45c4d48fb077b1308eaab0cba" dependencies = [ "anyhow", "base64 0.22.1", @@ -9059,9 +8981,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" +checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" [[package]] name = "ucd-trie" @@ -9069,61 +8991,11 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" -[[package]] -name = "unic-char-property" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" -dependencies = [ - "unic-char-range", -] - -[[package]] -name = "unic-char-range" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" - -[[package]] -name = "unic-common" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" - -[[package]] -name = "unic-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" -dependencies = [ - "unic-ucd-segment", -] - -[[package]] -name = "unic-ucd-segment" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" -dependencies = [ - "unic-char-property", - "unic-char-range", - "unic-ucd-version", -] - -[[package]] -name = "unic-ucd-version" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" -dependencies = [ - "unic-common", -] - [[package]] name = "unicase" -version = "2.8.1" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" +checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142" [[package]] name = "unicode-bidi" @@ -9133,30 +9005,36 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" +checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" [[package]] name = "unicode-xid" @@ -9166,9 +9044,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unit-prefix" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" [[package]] name = "unsafe-libyaml" @@ -9206,14 +9084,15 @@ dependencies = [ [[package]] name = "url" -version = "2.5.7" +version = "2.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b" +checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" dependencies = [ "form_urlencoded", "idna", "percent-encoding", "serde", + "serde_derive", ] [[package]] @@ -9224,9 +9103,9 @@ checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" [[package]] name = "utf8-width" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" +checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091" [[package]] name = "utf8_iter" @@ -9246,7 +9125,7 @@ version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fcc29c80c21c31608227e0912b2d7fddba57ad76b606890627ba8ee7964e993" dependencies = [ - "indexmap 2.11.4", + "indexmap 2.13.0", "serde", "serde_json", "serde_norway", @@ -9273,7 +9152,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.106", + "syn 2.0.114", "url", "uuid", ] @@ -9322,13 +9201,13 @@ dependencies = [ [[package]] name = "uuid" -version = "1.18.1" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", "js-sys", - "serde", + "serde_core", "sha1_smol", "wasm-bindgen", ] @@ -9360,7 +9239,7 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -9380,7 +9259,7 @@ checksum = "4e3a32a9bcc0f6c6ccfd5b27bcf298c58e753bcc9eeff268157a303393183a6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -9448,7 +9327,7 @@ dependencies = [ "log", "openid 0.17.0", "pem", - "reqwest 0.12.24", + "reqwest", "sequoia-openpgp", "serde", "serde_json", @@ -9477,20 +9356,11 @@ version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" -[[package]] -name = "wasi" -version = "0.14.7+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ "wit-bindgen", ] @@ -9503,9 +9373,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1da10c01ae9f1ae40cbfac0bac3b1e724b320abfcf52229f80b547c0d250e2d" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -9514,27 +9384,14 @@ dependencies = [ "wasm-bindgen-shared", ] -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671c9a5a66f49d8a47345ab942e2cb93c7d1d0339065d4f8139c486121b43b19" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.106", - "wasm-bindgen-shared", -] - [[package]] name = "wasm-bindgen-futures" -version = "0.4.54" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -9543,9 +9400,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ca60477e4c59f5f2986c50191cd972e3a50d8a95603bc9434501cf156a9a119" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9553,22 +9410,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07d2f20d4da7b26400c9f4a0511e6e0345b040694e8a75bd41d578fa4421d7" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.106", - "wasm-bindgen-backend", + "syn 2.0.114", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.104" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad67dc8b2a1a6e5448428adec4c3e84c43e561d8c9ee8a9e5aabeb193ec41d1" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] @@ -9603,9 +9460,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.81" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -9621,29 +9478,20 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-root-certs" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36a29fc0408b113f68cf32637857ab740edfafdf460c326cd2afaa2d84cc05dc" -dependencies = [ - "rustls-pki-types", -] - [[package]] name = "webpki-roots" version = "0.26.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9" dependencies = [ - "webpki-roots 1.0.3", + "webpki-roots 1.0.5", ] [[package]] name = "webpki-roots" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b130c0d2d49f8b6889abc456e795e82525204f27c42cf767cf0d7734e089b8" +checksum = "12bed680863276c63889429bfd6cab3b99943659923822de1c8a39c49e4d722c" dependencies = [ "rustls-pki-types", ] @@ -9686,7 +9534,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.0", + "windows-sys 0.61.2", ] [[package]] @@ -9719,15 +9567,15 @@ dependencies = [ [[package]] name = "windows-core" -version = "0.62.0" +version = "0.62.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fe7168f7de578d2d8a05b07fd61870d2e73b4020e9f49aa00da8471723497c" +checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ - "windows-implement 0.60.0", - "windows-interface 0.59.1", - "windows-link 0.2.0", - "windows-result 0.4.0", - "windows-strings 0.5.0", + "windows-implement 0.60.2", + "windows-interface 0.59.3", + "windows-link", + "windows-result 0.4.1", + "windows-strings", ] [[package]] @@ -9738,18 +9586,18 @@ checksum = "f6fc35f58ecd95a9b71c4f2329b911016e6bec66b3f2e6a4aad86bd2e99e2f9b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "windows-implement" -version = "0.60.0" +version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -9760,41 +9608,35 @@ checksum = "08990546bf4edef8f431fa6326e032865f27138718c587dc21bc0265bbcb57cc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "windows-interface" -version = "0.59.1" +version = "0.59.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - -[[package]] -name = "windows-link" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" [[package]] name = "windows-registry" -version = "0.5.3" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" +checksum = "02752bf7fbdcce7f2a27a742f798510f3e5ad88dbe84871e5168e2120c3d5720" dependencies = [ - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", + "windows-link", + "windows-result 0.4.1", + "windows-strings", ] [[package]] @@ -9808,47 +9650,20 @@ dependencies = [ [[package]] name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link 0.1.3", -] - -[[package]] -name = "windows-result" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7084dcc306f89883455a206237404d3eaf961e5bd7e0f312f7c91f57eb44167f" -dependencies = [ - "windows-link 0.2.0", -] - -[[package]] -name = "windows-strings" -version = "0.4.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" +checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.1.3", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7218c655a553b0bed4426cf54b20d7ba363ef543b52d515b3e48d7fd55318dda" -dependencies = [ - "windows-link 0.2.0", -] - -[[package]] -name = "windows-sys" -version = "0.45.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-targets 0.42.2", + "windows-link", ] [[package]] @@ -9869,46 +9684,22 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.3", + "windows-targets 0.53.5", ] [[package]] name = "windows-sys" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" -dependencies = [ - "windows-link 0.2.0", -] - -[[package]] -name = "windows-targets" -version = "0.42.2" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-link", ] [[package]] @@ -9944,27 +9735,21 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.53.3" +version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.1.3", - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", + "windows-link", + "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_msvc 0.53.1", + "windows_i686_gnu 0.53.1", + "windows_i686_gnullvm 0.53.1", + "windows_i686_msvc 0.53.1", + "windows_x86_64_gnu 0.53.1", + "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.42.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -9979,15 +9764,9 @@ checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.2" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" [[package]] name = "windows_aarch64_msvc" @@ -10003,15 +9782,9 @@ checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.2" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" [[package]] name = "windows_i686_gnu" @@ -10027,9 +9800,9 @@ checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnu" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" +checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" [[package]] name = "windows_i686_gnullvm" @@ -10039,15 +9812,9 @@ checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - -[[package]] -name = "windows_i686_msvc" -version = "0.42.2" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" [[package]] name = "windows_i686_msvc" @@ -10063,15 +9830,9 @@ checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.2" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" [[package]] name = "windows_x86_64_gnu" @@ -10087,15 +9848,9 @@ checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.42.2" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" [[package]] name = "windows_x86_64_gnullvm" @@ -10111,15 +9866,9 @@ checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.2" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" [[package]] name = "windows_x86_64_msvc" @@ -10135,15 +9884,15 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "windows_x86_64_msvc" -version = "0.53.0" +version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -10168,9 +9917,9 @@ dependencies = [ "base64 0.22.1", "deadpool", "futures", - "http 1.3.1", + "http 1.4.0", "http-body-util", - "hyper 1.7.0", + "hyper 1.8.1", "hyper-util", "log", "once_cell", @@ -10183,15 +9932,15 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "writeable" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb" +checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9" [[package]] name = "wyz" @@ -10227,7 +9976,7 @@ dependencies = [ "clap", "log", "postgresql_commands", - "schemars 1.0.4", + "schemars 1.2.0", "serde", "serde_json", "serde_yaml_ng", @@ -10259,11 +10008,10 @@ checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] name = "yoke" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc" +checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954" dependencies = [ - "serde", "stable_deref_trait", "yoke-derive", "zerofrom", @@ -10271,34 +10019,34 @@ dependencies = [ [[package]] name = "yoke-derive" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6" +checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", "synstructure", ] [[package]] name = "zerocopy" -version = "0.8.27" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" +checksum = "fdea86ddd5568519879b8187e1cf04e24fce28f7fe046ceecbce472ff19a2572" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.27" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" +checksum = "0c15e1b46eff7c6c91195752e0eeed8ef040e391cdece7c25376957d5f15df22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -10318,35 +10066,35 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", "synstructure", ] [[package]] name = "zeroize" -version = "1.8.1" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" +checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.4.2" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +checksum = "85a5b4158499876c763cb03bc4e49185d3cccbabb15b33c627f7884f43db852e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] name = "zerotrie" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595" +checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851" dependencies = [ "displaydoc", "yoke", @@ -10355,9 +10103,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b" +checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002" dependencies = [ "yoke", "zerofrom", @@ -10366,13 +10114,13 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.1" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f" +checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.106", + "syn 2.0.114", ] [[package]] @@ -10384,7 +10132,7 @@ dependencies = [ "arbitrary", "crc32fast", "flate2", - "indexmap 2.11.4", + "indexmap 2.13.0", "memchr", "zopfli", ] @@ -10398,13 +10146,13 @@ dependencies = [ "aes", "arbitrary", "bzip2", - "constant_time_eq", + "constant_time_eq 0.3.1", "crc32fast", "deflate64", "flate2", - "getrandom 0.3.3", + "getrandom 0.3.4", "hmac", - "indexmap 2.11.4", + "indexmap 2.13.0", "lzma-rust2", "memchr", "pbkdf2", @@ -10418,9 +10166,9 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.5.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f06ae92f42f5e5c42443fd094f245eb656abf56dd7cce9b8b263236565e00f2" +checksum = "40990edd51aae2c2b6907af74ffb635029d5788228222c4bb811e9351c0caad3" [[package]] name = "zmij" @@ -10430,9 +10178,9 @@ checksum = "02aae0f83f69aafc94776e879363e9771d7ecbffe2c7fbb6c14c5e00dfe88439" [[package]] name = "zopfli" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfc5ee405f504cd4984ecc6f14d02d55cfda60fa4b689434ef4102aae150cd7" +checksum = "f05cd8797d63865425ff89b5c4a48804f35ba0ce8d125800027ad6017d2b5249" dependencies = [ "bumpalo", "crc32fast", diff --git a/Cargo.toml b/Cargo.toml index c3cd74cf4..694a61634 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -112,7 +112,7 @@ petgraph = { version = "0.8.0", features = ["serde-1"] } quick-xml = "0.38.0" rand = "0.9.0" regex = "1.10.3" -reqwest = "0.13.1" +reqwest = "0.12" ring = "0.17.8" roxmltree = "0.20.0" rstest = "0.26.1" diff --git a/tools/trustify-cli/Cargo.toml b/tools/trustify-cli/Cargo.toml index 3e0cbae4d..22c64b1f2 100644 --- a/tools/trustify-cli/Cargo.toml +++ b/tools/trustify-cli/Cargo.toml @@ -12,7 +12,7 @@ clap = { workspace = true, features = ["derive", "env"] } dotenvy = { workspace = true } futures = { workspace = true } indicatif = { workspace = true } -reqwest = { workspace = true , features = ["blocking", "form", "json", "query"] } +reqwest = { workspace = true, features = ["blocking", "json"] } serde = { workspace = true , features = ["derive"] } serde_json = { workspace = true } thiserror = { workspace = true } diff --git a/tools/trustify-cli/src/api/auth.rs b/tools/trustify-cli/src/api/auth.rs index 79199ca66..1fb6bf0b6 100644 --- a/tools/trustify-cli/src/api/auth.rs +++ b/tools/trustify-cli/src/api/auth.rs @@ -7,7 +7,9 @@ pub enum AuthError { #[error("Failed to connect to SSO server: {0}")] ConnectionError(#[from] reqwest::Error), - #[error("Authentication failed: Invalid client_id, client_secret, or SSO URL. Please verify your credentials.")] + #[error( + "Authentication failed: Invalid client_id, client_secret, or SSO URL. Please verify your credentials." + )] AuthenticationFailed, #[error("SSO server returned an error: {0}")] diff --git a/tools/trustify-cli/src/api/client.rs b/tools/trustify-cli/src/api/client.rs index d06704d0f..ba52e0b28 100644 --- a/tools/trustify-cli/src/api/client.rs +++ b/tools/trustify-cli/src/api/client.rs @@ -1,12 +1,12 @@ use std::sync::Arc; use std::time::Duration; +use indicatif::style::TemplateError; use reqwest::{Client, RequestBuilder, StatusCode}; use thiserror::Error; use tokio::sync::RwLock; use tokio::time::sleep; - const MAX_RETRIES: u32 = 3; const RETRY_DELAY_MS: u64 = 1000; @@ -35,6 +35,9 @@ pub enum ApiError { #[error("{0}")] InternalError(String), + + #[error("Template error: {0}")] + TemplateError(String), } impl From for ApiError { @@ -51,6 +54,12 @@ impl From for ApiError { } } +impl From for ApiError { + fn from(e: TemplateError) -> Self { + ApiError::TemplateError(e.to_string()) + } +} + // Re-export AuthCredentials from auth module pub use super::auth::AuthCredentials; diff --git a/tools/trustify-cli/src/api/mod.rs b/tools/trustify-cli/src/api/mod.rs index 666dc0fd0..0cb893a05 100644 --- a/tools/trustify-cli/src/api/mod.rs +++ b/tools/trustify-cli/src/api/mod.rs @@ -1,4 +1,4 @@ +pub mod auth; pub mod client; pub mod sbom; -pub mod auth; pub use client::ApiClient; diff --git a/tools/trustify-cli/src/api/sbom.rs b/tools/trustify-cli/src/api/sbom.rs index 57d490543..0a9641055 100644 --- a/tools/trustify-cli/src/api/sbom.rs +++ b/tools/trustify-cli/src/api/sbom.rs @@ -2,8 +2,8 @@ use std::collections::HashMap; use std::fs::File; use std::io::{BufReader, Write}; use std::path::Path; -use std::sync::atomic::{AtomicU32, Ordering}; use std::sync::Arc; +use std::sync::atomic::{AtomicU32, Ordering}; use futures::future::join_all; use futures::stream::{self, StreamExt}; @@ -203,8 +203,7 @@ pub async fn find_duplicates( // Set up progress bars let multi_progress = MultiProgress::new(); let style = ProgressStyle::default_bar() - .template("{prefix:>12} [{bar:30.cyan/blue}] {pos}/{len} ({percent}%)") - .unwrap() + .template("{prefix:>12} [{bar:30.cyan/blue}] {pos}/{len} ({percent}%)")? .progress_chars("█▓░"); let results: Arc>> = Arc::new(Mutex::new(Vec::new())); @@ -385,8 +384,7 @@ pub async fn delete_duplicates( let progress = ProgressBar::new(total as u64); progress.set_style( ProgressStyle::default_bar() - .template("{spinner:.green} [{bar:40.cyan/blue}] {pos}/{len} ({percent}%) {msg}") - .unwrap() + .template("{spinner:.green} [{bar:40.cyan/blue}] {pos}/{len} ({percent}%) {msg}")? .progress_chars("█▓░"), ); diff --git a/tools/trustify-cli/src/commands/auth.rs b/tools/trustify-cli/src/commands/auth.rs index 7ca608fb5..a9eb68002 100644 --- a/tools/trustify-cli/src/commands/auth.rs +++ b/tools/trustify-cli/src/commands/auth.rs @@ -1,8 +1,8 @@ use clap::Subcommand; -use std::process; use crate::Context; use crate::api::auth::AuthCredentials; +use std::process; #[derive(Subcommand)] pub enum AuthCommands { @@ -13,24 +13,22 @@ pub enum AuthCommands { impl AuthCommands { pub async fn run(&self, ctx: &Context) { match self { - AuthCommands::Token {} => { - match ctx.config.auth_credentials() { - Some((token_url, client_id, client_secret)) => { - let creds = AuthCredentials::new(token_url, client_id, client_secret); - match creds.get_token().await { - Ok(token) => println!("{}", token), - Err(e) => { - eprintln!("Error: {}", e); - process::exit(1); - } + AuthCommands::Token {} => match ctx.config.auth_credentials() { + Some((token_url, client_id, client_secret)) => { + let creds = AuthCredentials::new(token_url, client_id, client_secret); + match creds.get_token().await { + Ok(token) => println!("{}", token), + Err(e) => { + eprintln!("Error: {}", e); + process::exit(1); } } - None => { - eprintln!("Error: SSO URL, client ID, and client secret are all required"); - process::exit(1); - } } - } + None => { + eprintln!("Error: SSO URL, client ID, and client secret are all required"); + process::exit(1); + } + }, } } } diff --git a/tools/trustify-cli/src/commands/mod.rs b/tools/trustify-cli/src/commands/mod.rs index 74fd2746f..d279a6c9c 100644 --- a/tools/trustify-cli/src/commands/mod.rs +++ b/tools/trustify-cli/src/commands/mod.rs @@ -1,11 +1,11 @@ -pub mod sbom; pub mod auth; +pub mod sbom; use clap::Subcommand; use crate::Context; -pub use sbom::SbomCommands; pub use auth::AuthCommands; +pub use sbom::SbomCommands; #[derive(Subcommand)] pub enum Commands { diff --git a/tools/trustify-cli/src/commands/sbom.rs b/tools/trustify-cli/src/commands/sbom.rs index cb79d51d9..0cb0f5083 100644 --- a/tools/trustify-cli/src/commands/sbom.rs +++ b/tools/trustify-cli/src/commands/sbom.rs @@ -5,8 +5,8 @@ use std::process; use clap::{Subcommand, ValueEnum}; use serde_json::Value; -use crate::api::sbom as sbom_api; use crate::Context; +use crate::api::sbom as sbom_api; /// Output format for SBOM list #[derive(Clone, Default, ValueEnum)] @@ -172,7 +172,7 @@ impl DuplicatesCommands { eprintln!("Operation cancelled."); process::exit(0); } - let final_output = final_output.unwrap(); + let final_output = final_output.unwrap_or("duplicates.json".to_string()); let params = sbom_api::FindDuplicatesParams { batch_size: *batch_size, diff --git a/tools/trustify-cli/src/main.rs b/tools/trustify-cli/src/main.rs index 560c2946b..728cd674a 100644 --- a/tools/trustify-cli/src/main.rs +++ b/tools/trustify-cli/src/main.rs @@ -7,8 +7,8 @@ use std::process; use clap::Parser; -use api::auth::AuthCredentials; use api::ApiClient; +use api::auth::AuthCredentials; use cli::Cli; /// Runtime context containing config and API client From 3ec7612e4484aedba6041c31b2789412b652dd02 Mon Sep 17 00:00:00 2001 From: "bxf12315@gmail.com" Date: Mon, 2 Feb 2026 11:49:07 +0800 Subject: [PATCH 09/10] move to etc --- Cargo.toml | 2 +- {tools => etc}/trustify-cli/Cargo.lock | 0 {tools => etc}/trustify-cli/Cargo.toml | 0 {tools => etc}/trustify-cli/LICENSE | 0 {tools => etc}/trustify-cli/README.md | 0 {tools => etc}/trustify-cli/src/api/auth.rs | 0 {tools => etc}/trustify-cli/src/api/client.rs | 0 {tools => etc}/trustify-cli/src/api/mod.rs | 0 {tools => etc}/trustify-cli/src/api/sbom.rs | 0 {tools => etc}/trustify-cli/src/cli.rs | 0 {tools => etc}/trustify-cli/src/commands/auth.rs | 0 {tools => etc}/trustify-cli/src/commands/mod.rs | 0 {tools => etc}/trustify-cli/src/commands/sbom.rs | 0 {tools => etc}/trustify-cli/src/config.rs | 0 {tools => etc}/trustify-cli/src/main.rs | 0 15 files changed, 1 insertion(+), 1 deletion(-) rename {tools => etc}/trustify-cli/Cargo.lock (100%) rename {tools => etc}/trustify-cli/Cargo.toml (100%) rename {tools => etc}/trustify-cli/LICENSE (100%) rename {tools => etc}/trustify-cli/README.md (100%) rename {tools => etc}/trustify-cli/src/api/auth.rs (100%) rename {tools => etc}/trustify-cli/src/api/client.rs (100%) rename {tools => etc}/trustify-cli/src/api/mod.rs (100%) rename {tools => etc}/trustify-cli/src/api/sbom.rs (100%) rename {tools => etc}/trustify-cli/src/cli.rs (100%) rename {tools => etc}/trustify-cli/src/commands/auth.rs (100%) rename {tools => etc}/trustify-cli/src/commands/mod.rs (100%) rename {tools => etc}/trustify-cli/src/commands/sbom.rs (100%) rename {tools => etc}/trustify-cli/src/config.rs (100%) rename {tools => etc}/trustify-cli/src/main.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 694a61634..d10adff34 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ members = [ "test-context", "trustd", "xtask", - "tools/trustify-cli" + "etc/trustify-cli" ] [workspace.package] diff --git a/tools/trustify-cli/Cargo.lock b/etc/trustify-cli/Cargo.lock similarity index 100% rename from tools/trustify-cli/Cargo.lock rename to etc/trustify-cli/Cargo.lock diff --git a/tools/trustify-cli/Cargo.toml b/etc/trustify-cli/Cargo.toml similarity index 100% rename from tools/trustify-cli/Cargo.toml rename to etc/trustify-cli/Cargo.toml diff --git a/tools/trustify-cli/LICENSE b/etc/trustify-cli/LICENSE similarity index 100% rename from tools/trustify-cli/LICENSE rename to etc/trustify-cli/LICENSE diff --git a/tools/trustify-cli/README.md b/etc/trustify-cli/README.md similarity index 100% rename from tools/trustify-cli/README.md rename to etc/trustify-cli/README.md diff --git a/tools/trustify-cli/src/api/auth.rs b/etc/trustify-cli/src/api/auth.rs similarity index 100% rename from tools/trustify-cli/src/api/auth.rs rename to etc/trustify-cli/src/api/auth.rs diff --git a/tools/trustify-cli/src/api/client.rs b/etc/trustify-cli/src/api/client.rs similarity index 100% rename from tools/trustify-cli/src/api/client.rs rename to etc/trustify-cli/src/api/client.rs diff --git a/tools/trustify-cli/src/api/mod.rs b/etc/trustify-cli/src/api/mod.rs similarity index 100% rename from tools/trustify-cli/src/api/mod.rs rename to etc/trustify-cli/src/api/mod.rs diff --git a/tools/trustify-cli/src/api/sbom.rs b/etc/trustify-cli/src/api/sbom.rs similarity index 100% rename from tools/trustify-cli/src/api/sbom.rs rename to etc/trustify-cli/src/api/sbom.rs diff --git a/tools/trustify-cli/src/cli.rs b/etc/trustify-cli/src/cli.rs similarity index 100% rename from tools/trustify-cli/src/cli.rs rename to etc/trustify-cli/src/cli.rs diff --git a/tools/trustify-cli/src/commands/auth.rs b/etc/trustify-cli/src/commands/auth.rs similarity index 100% rename from tools/trustify-cli/src/commands/auth.rs rename to etc/trustify-cli/src/commands/auth.rs diff --git a/tools/trustify-cli/src/commands/mod.rs b/etc/trustify-cli/src/commands/mod.rs similarity index 100% rename from tools/trustify-cli/src/commands/mod.rs rename to etc/trustify-cli/src/commands/mod.rs diff --git a/tools/trustify-cli/src/commands/sbom.rs b/etc/trustify-cli/src/commands/sbom.rs similarity index 100% rename from tools/trustify-cli/src/commands/sbom.rs rename to etc/trustify-cli/src/commands/sbom.rs diff --git a/tools/trustify-cli/src/config.rs b/etc/trustify-cli/src/config.rs similarity index 100% rename from tools/trustify-cli/src/config.rs rename to etc/trustify-cli/src/config.rs diff --git a/tools/trustify-cli/src/main.rs b/etc/trustify-cli/src/main.rs similarity index 100% rename from tools/trustify-cli/src/main.rs rename to etc/trustify-cli/src/main.rs From 91eb73d04e7429f0b25294bb5f9a500bceb24ad6 Mon Sep 17 00:00:00 2001 From: Bai Xiaofeng Date: Fri, 6 Feb 2026 19:44:03 +0800 Subject: [PATCH 10/10] Completed the SBOM delete logic and added unit tests. (#5) --- Cargo.lock | 73 +++++++ Cargo.toml | 1 + etc/trustify-cli/Cargo.toml | 5 + etc/trustify-cli/src/api/mod.rs | 3 + etc/trustify-cli/src/api/sbom.rs | 131 ++++++++++--- etc/trustify-cli/src/api/test.rs | 271 ++++++++++++++++++++++++++ etc/trustify-cli/src/commands/sbom.rs | 61 +++++- 7 files changed, 508 insertions(+), 37 deletions(-) create mode 100644 etc/trustify-cli/src/api/test.rs diff --git a/Cargo.lock b/Cargo.lock index 7185e2d8d..67f358e14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2581,6 +2581,12 @@ version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "dunce" version = "1.0.5" @@ -2945,6 +2951,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" + [[package]] name = "fs_extra" version = "1.3.0" @@ -4494,6 +4506,33 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "mockall" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43766c2b5203b10de348ffe19f7e54564b64f3d6018ff7648d1e2d6d3a0f0a48" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cbce79ec385a1d4f54baa90a76401eb15d9cab93685f62e7e9f942aa00ae2" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.114", +] + [[package]] name = "moka" version = "0.12.13" @@ -5627,6 +5666,32 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "predicates" +version = "3.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5d19ee57562043d37e82899fade9a22ebab7be9cef5026b07fda9cdd4293573" +dependencies = [ + "anstyle", + "predicates-core", +] + +[[package]] +name = "predicates-core" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" + +[[package]] +name = "predicates-tree" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "pretty_assertions" version = "1.4.1" @@ -7775,6 +7840,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "termtree" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" + [[package]] name = "test-context" version = "0.5.4" @@ -8316,11 +8387,13 @@ dependencies = [ "dotenvy", "futures", "indicatif", + "mockall", "reqwest", "serde", "serde_json", "thiserror 2.0.18", "tokio", + "wiremock", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index d10adff34..38ed2e703 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,6 +94,7 @@ libz-sys = "*" log = "0.4.19" mime = "0.3.17" moka = "0.12.10" +mockall = "0.12" native-tls = "0.2" num-traits = "0.2" oci-client = "0.15" diff --git a/etc/trustify-cli/Cargo.toml b/etc/trustify-cli/Cargo.toml index 22c64b1f2..20b5910e7 100644 --- a/etc/trustify-cli/Cargo.toml +++ b/etc/trustify-cli/Cargo.toml @@ -17,3 +17,8 @@ serde = { workspace = true , features = ["derive"] } serde_json = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true, features = ["rt-multi-thread", "macros", "sync"] } + +[dev-dependencies] +mockall = { workspace = true } +wiremock = { workspace = true } + diff --git a/etc/trustify-cli/src/api/mod.rs b/etc/trustify-cli/src/api/mod.rs index 0cb893a05..8e4c0ef7f 100644 --- a/etc/trustify-cli/src/api/mod.rs +++ b/etc/trustify-cli/src/api/mod.rs @@ -2,3 +2,6 @@ pub mod auth; pub mod client; pub mod sbom; pub use client::ApiClient; + +#[cfg(test)] +mod test; diff --git a/etc/trustify-cli/src/api/sbom.rs b/etc/trustify-cli/src/api/sbom.rs index 0a9641055..fd571a502 100644 --- a/etc/trustify-cli/src/api/sbom.rs +++ b/etc/trustify-cli/src/api/sbom.rs @@ -308,8 +308,67 @@ pub async fn delete(client: &ApiClient, id: &str) -> Result<(), ApiError> { Ok(()) } +/// Delete all SBOMs by listing and deleting each one +pub async fn delete_by_query( + client: &ApiClient, + query: Option<&str>, + dry_run: bool, + concurrency: usize, + limit: Option, +) -> Result { + let params = ListParams { + q: query.map(|s| s.to_string()), + limit, + offset: None, + sort: None, + }; + + let response = list(client, ¶ms).await?; + let parsed: Value = serde_json::from_str(&response) + .map_err(|e| ApiError::InternalError(format!("Failed to parse response: {}", e)))?; + + let items = parsed + .get("items") + .and_then(|v| v.as_array()) + .ok_or_else(|| ApiError::InternalError("No items in response".to_string()))?; + + let total = items.len() as u32; + + let entries: Vec = items + .iter() + .filter_map(|item| { + let id = item.get("id").and_then(|v| v.as_str())?; + let document_id = item + .get("document_id") + .and_then(|v| v.as_str()) + .unwrap_or("unknown"); + Some(DeleteEntry { + id: id.to_string(), + document_id: document_id.to_string(), + }) + }) + .collect(); + + if dry_run { + for entry in &entries { + eprintln!( + "[DRY-RUN] Would delete: {} (document_id: {})", + entry.id, entry.document_id + ); + } + return Ok(DeleteResult { + deleted: 0, + skipped: 0, + failed: 0, + total, + }); + } + + delete_list(client, entries, concurrency).await +} + /// Result of deleting duplicates -pub struct DeleteDuplicatesResult { +pub struct DeleteResult { pub deleted: u32, pub skipped: u32, pub failed: u32, @@ -318,19 +377,13 @@ pub struct DeleteDuplicatesResult { /// Entry to delete with its document_id for logging #[derive(Clone)] -struct DeleteEntry { +pub struct DeleteEntry { id: String, document_id: String, } -/// Delete duplicates from a file with progress bar -pub async fn delete_duplicates( - client: &ApiClient, - input_file: &str, - concurrency: usize, - dry_run: bool, -) -> Result { - // Check if file exists +/// Read delete entries from a file +pub fn read_delete_entries_from_file(input_file: &str) -> Result, ApiError> { let path = Path::new(input_file); if !path.exists() { return Err(ApiError::InternalError(format!( @@ -339,7 +392,6 @@ pub async fn delete_duplicates( ))); } - // Read and parse the file let file = File::open(path) .map_err(|e| ApiError::InternalError(format!("Failed to open input file: {}", e)))?; let reader = BufReader::new(file); @@ -347,7 +399,6 @@ pub async fn delete_duplicates( let groups: Vec = serde_json::from_reader(reader) .map_err(|e| ApiError::InternalError(format!("Failed to parse input file: {}", e)))?; - // Collect all duplicate entries to delete let entries: Vec = groups .iter() .flat_map(|group| { @@ -358,29 +409,22 @@ pub async fn delete_duplicates( }) .collect(); - let total = entries.len() as u32; + Ok(entries) +} - if dry_run { - for entry in &entries { - eprintln!( - "[DRY-RUN] Would delete: {} (document_id: {})", - entry.id, entry.document_id - ); - } - return Ok(DeleteDuplicatesResult { - deleted: 0, - skipped: 0, - failed: 0, - total, - }); - } +/// Delete a list of entries with progress bar +pub async fn delete_list( + client: &ApiClient, + entries: Vec, + concurrency: usize, +) -> Result { + let total = entries.len() as u32; eprintln!( "Deleting {} duplicates with {} concurrent requests...\n", total, concurrency ); - // Set up progress bar let progress = ProgressBar::new(total as u64); progress.set_style( ProgressStyle::default_bar() @@ -405,7 +449,6 @@ pub async fn delete_duplicates( deleted.fetch_add(1, Ordering::Relaxed); } Err(ApiError::NotFound(_)) => { - // SBOM already deleted or doesn't exist - skip silently skipped.fetch_add(1, Ordering::Relaxed); } Err(e) => { @@ -423,10 +466,38 @@ pub async fn delete_duplicates( progress.finish_with_message("complete"); - Ok(DeleteDuplicatesResult { + Ok(DeleteResult { deleted: deleted.load(Ordering::Relaxed), skipped: skipped.load(Ordering::Relaxed), failed: failed.load(Ordering::Relaxed), total, }) } + +/// Delete duplicates from a file with progress bar +pub async fn delete_duplicates( + client: &ApiClient, + input_file: &str, + concurrency: usize, + dry_run: bool, +) -> Result { + let entries = read_delete_entries_from_file(input_file)?; + let total = entries.len() as u32; + + if dry_run { + for entry in &entries { + eprintln!( + "[DRY-RUN] Would delete: {} (document_id: {})", + entry.id, entry.document_id + ); + } + return Ok(DeleteResult { + deleted: 0, + skipped: 0, + failed: 0, + total, + }); + } + + delete_list(client, entries, concurrency).await +} diff --git a/etc/trustify-cli/src/api/test.rs b/etc/trustify-cli/src/api/test.rs new file mode 100644 index 000000000..570b8b704 --- /dev/null +++ b/etc/trustify-cli/src/api/test.rs @@ -0,0 +1,271 @@ +use super::client::{ApiClient, ApiError}; +use super::sbom::{ListParams, delete_by_query, list}; +use serde_json::json; +use wiremock::matchers::{method, path, path_regex}; +use wiremock::{Mock, MockServer, ResponseTemplate}; + +/// Helper function to create a test client connected to a mock server +async fn create_test_client() -> (ApiClient, MockServer) { + let mock_server = MockServer::start().await; + let client = ApiClient::new(&mock_server.uri(), None, None); + (client, mock_server) +} + +/// Helper function to create a mock response with 3 SBOM items +fn create_mock_sbom_response() -> serde_json::Value { + json!({ + "items": [ + { + "id": "urn:uuid:019c2415-ccb6-7081-a80a-9bd15137faeb", + "document_id": "https://access.redhat.com/security/data/sbom/spdx/MTV-2.6", + "labels": { + "type": "spdx" + }, + "data_licenses": ["CC0-1.0"], + "published": "2024-09-17T11:31:02Z", + "authors": ["Organization: Red Hat Product Security (secalert@redhat.com)"], + "suppliers": [], + "name": "MTV-2.6", + "number_of_packages": 5388, + "sha256": "sha256:c7caabdc60d456efbed6e3634c9969c4ca04b41216e7e951bfd44510bf565614", + "sha384": "sha384:7c5452eee045931d53640986bf8d7e7ba7f5ffcc3956563d3e46571e5759ca7f8f64c4ba7a6c1ac316ead118d3ea8ed1", + "sha512": "sha512:411b78bf380851082064da58a465620b707dec0f65a7c84cd2c563862d87b61d14aa4b35657ce91d9f60eb387869627a92e3eb23d35423b843df2b89c1d7e391", + "size": 8941362, + "ingested": "2026-02-03T15:18:54.375162Z", + "described_by": [ + { + "id": "SPDXRef-018cf2a3-f3dd-4100-b0c0-2f1fe97d0419", + "name": "MTV-2.6", + "group": null, + "version": "2.6", + "purl": [], + "cpe": [ + "cpe:/a:redhat:migration_toolkit_virtualization:2.6:*:el9:*", + "cpe:/a:redhat:migration_toolkit_virtualization:2.6:*:el8:*" + ], + "licenses": [ + { + "license_name": "NOASSERTION", + "license_type": "declared" + }, + { + "license_name": "NOASSERTION", + "license_type": "concluded" + } + ], + "licenses_ref_mapping": [] + } + ] + }, + { + "id": "urn:uuid:019c2415-ccb6-7081-a80a-9bd15137faec", + "document_id": "https://access.redhat.com/security/data/sbom/spdx/MTV-2.7", + "labels": { + "type": "spdx" + }, + "data_licenses": ["MIT"], + "published": "2024-09-18T12:00:00Z", + "authors": ["Organization: Red Hat Product Security (secalert@redhat.com)"], + "suppliers": [], + "name": "MTV-2.7", + "number_of_packages": 400, + "sha256": "sha256:d8ebdc60d456efbed6e3634c9969c4ca04b41216e7e951bfd44510bf565615", + "sha384": "sha384:8d5452eee045931d53640986bf8d7e7ba7f5ffcc3956563d3e46571e5759ca7f8f64c4ba7a6c1ac316ead118d3ea8ed2", + "sha512": "sha512:522b78bf380851082064da58a465620b707dec0f65a7c84cd2c563862d87b61d14aa4b35657ce91d9f60eb387869627a92e3eb23d35423b843df2b89c1d7e392", + "size": 7500000, + "ingested": "2026-02-04T10:00:00.000000Z", + "described_by": [ + { + "id": "SPDXRef-018cf2a3-f3dd-4100-b0c0-2f1fe97d0420", + "name": "MTV-2.7", + "group": null, + "version": "2.7", + "purl": [], + "cpe": [ + "cpe:/a:redhat:migration_toolkit_virtualization:2.7:*:el9:*" + ], + "licenses": [ + { + "license_name": "MIT", + "license_type": "declared" + } + ], + "licenses_ref_mapping": [] + } + ] + }, + { + "id": "urn:uuid:019c2415-ccb6-7081-a80a-9bd15137faed", + "document_id": "https://access.redhat.com/security/data/sbom/spdx/MTV-2.8", + "labels": { + "type": "cyclonedx" + }, + "data_licenses": ["Apache-2.0"], + "published": "2024-09-19T13:00:00Z", + "authors": ["Organization: Red Hat Product Security (secalert@redhat.com)"], + "suppliers": [], + "name": "MTV-2.8", + "number_of_packages": 250, + "sha256": "sha256:e9fbdc60d456efbed6e3634c9969c4ca04b41216e7e951bfd44510bf565616", + "sha384": "sha384:9e5452eee045931d53640986bf8d7e7ba7f5ffcc3956563d3e46571e5759ca7f8f64c4ba7a6c1ac316ead118d3ea8ed3", + "sha512": "sha512:633b78bf380851082064da58a465620b707dec0f65a7c84cd2c563862d87b61d14aa4b35657ce91d9f60eb387869627a92e3eb23d35423b843df2b89c1d7e393", + "size": 6000000, + "ingested": "2026-02-05T08:00:00.000000Z", + "described_by": [ + { + "id": "SPDXRef-018cf2a3-f3dd-4100-b0c0-2f1fe97d0421", + "name": "MTV-2.8", + "group": null, + "version": "2.8", + "purl": [], + "cpe": [ + "cpe:/a:redhat:migration_toolkit_virtualization:2.8:*:el9:*" + ], + "licenses": [ + { + "license_name": "Apache-2.0", + "license_type": "declared" + } + ], + "licenses_ref_mapping": [] + } + ] + } + ], + "total": 3 + }) +} + +#[tokio::test] +async fn test_list_sboms_success() { + let (client, mock_server) = create_test_client().await; + + let mock_response = create_mock_sbom_response(); + + Mock::given(method("GET")) + .and(path("/api/v2/sbom")) + .respond_with(ResponseTemplate::new(200).set_body_json(&mock_response)) + .expect(1) + .mount(&mock_server) + .await; + + let params = ListParams { + q: None, + limit: Some(10), + offset: Some(0), + sort: None, + }; + + let result = list(&client, ¶ms).await; + + assert!(result.is_ok()); + let response_json: serde_json::Value = serde_json::from_str(&result.unwrap()).unwrap(); + assert_eq!(response_json["total"], 3); + assert_eq!(response_json["items"].as_array().unwrap().len(), 3); +} + +#[tokio::test] +async fn test_delete_by_query_success() { + let (client, mock_server) = create_test_client().await; + + let mock_response = create_mock_sbom_response(); + + Mock::given(method("GET")) + .and(path("/api/v2/sbom")) + .respond_with(ResponseTemplate::new(200).set_body_json(&mock_response)) + .expect(1) + .mount(&mock_server) + .await; + + Mock::given(method("DELETE")) + .and(path_regex(r"^/api/v2/sbom/urn:uuid:019c.*$")) + .respond_with(ResponseTemplate::new(204)) + .expect(3) + .mount(&mock_server) + .await; + + let result: Result = + delete_by_query(&client, Some("name:test"), false, 2, None).await; + + assert!(result.is_ok()); + let delete_result = result.unwrap(); + assert_eq!(delete_result.total, 3); + assert_eq!(delete_result.deleted, 3); + assert_eq!(delete_result.skipped, 0); + assert_eq!(delete_result.failed, 0); +} + +#[tokio::test] +async fn test_delete_by_query_dry_run() { + let (client, mock_server) = create_test_client().await; + + let mock_response = create_mock_sbom_response(); + + Mock::given(method("GET")) + .and(path("/api/v2/sbom")) + .respond_with(ResponseTemplate::new(200).set_body_json(&mock_response)) + .expect(1) + .mount(&mock_server) + .await; + + let result: Result = + delete_by_query(&client, Some("name:test"), true, 2, None).await; + + assert!(result.is_ok()); + let delete_result = result.unwrap(); + assert_eq!(delete_result.total, 3); + assert_eq!(delete_result.deleted, 0); + assert_eq!(delete_result.skipped, 0); + assert_eq!(delete_result.failed, 0); +} + +#[tokio::test] +async fn test_delete_by_query_with_not_found_and_failed() { + let (client, mock_server) = create_test_client().await; + + let mock_response = create_mock_sbom_response(); + + Mock::given(method("GET")) + .and(path("/api/v2/sbom")) + .respond_with(ResponseTemplate::new(200).set_body_json(&mock_response)) + .expect(1) + .mount(&mock_server) + .await; + + Mock::given(method("DELETE")) + .and(path( + "/api/v2/sbom/urn:uuid:019c2415-ccb6-7081-a80a-9bd15137faeb", + )) + .respond_with(ResponseTemplate::new(204)) + .expect(1) + .mount(&mock_server) + .await; + + Mock::given(method("DELETE")) + .and(path( + "/api/v2/sbom/urn:uuid:019c2415-ccb6-7081-a80a-9bd15137faec", + )) + .respond_with(ResponseTemplate::new(404)) + .expect(1) + .mount(&mock_server) + .await; + + Mock::given(method("DELETE")) + .and(path( + "/api/v2/sbom/urn:uuid:019c2415-ccb6-7081-a80a-9bd15137faed", + )) + .respond_with(ResponseTemplate::new(502)) + .expect(3) + .mount(&mock_server) + .await; + + let result: Result = + delete_by_query(&client, Some("name:test"), false, 2, None).await; + + assert!(result.is_ok()); + let delete_result = result.unwrap(); + assert_eq!(delete_result.total, 3); + assert_eq!(delete_result.deleted, 1); + assert_eq!(delete_result.skipped, 1); + assert_eq!(delete_result.failed, 1); +} diff --git a/etc/trustify-cli/src/commands/sbom.rs b/etc/trustify-cli/src/commands/sbom.rs index 0cb0f5083..43c0b18b9 100644 --- a/etc/trustify-cli/src/commands/sbom.rs +++ b/etc/trustify-cli/src/commands/sbom.rs @@ -93,6 +93,14 @@ pub enum SbomCommands { /// Perform a dry run without actually deleting #[arg(long)] dry_run: bool, + + /// Number of concurrent delete requests (default: 10) + #[arg(long, default_value = "10")] + concurrency: usize, + + /// Limit the number of SBOMs to query and delete (default: 100) + #[arg(long, default_value = "100")] + limit: Option, }, /// Manage duplicate SBOMs Duplicates { @@ -137,16 +145,55 @@ impl SbomCommands { } } } - SbomCommands::Delete { id, query, dry_run } => { - println!( - "SBOM delete command executed successfully!{}", - if *dry_run { " (dry-run)" } else { "" } - ); + SbomCommands::Delete { + id, + query, + dry_run, + concurrency, + limit, + } => { if let Some(i) = id { - println!(" ID: {}", i); + match sbom_api::delete(&ctx.client, i).await { + Ok(_) => println!("Deleted SBOM ID: {}", i), + Err(e) => { + eprintln!("Error deleting ID {}: {}", i, e); + process::exit(1); + } + } } if let Some(q) = query { - println!(" Query: {}", q); + match sbom_api::delete_by_query( + &ctx.client, + Some(q.as_str()), + *dry_run, + *concurrency, + *limit, + ) + .await + { + Ok(result) => { + if *dry_run { + println!("[DRY-RUN] Would delete {} SBOM(s)", result.total); + } else { + let mut msg = format!("Deleted {} SBOM(s)", result.deleted); + if result.skipped > 0 { + msg.push_str(&format!( + ", {} skipped (not found)", + result.skipped + )); + } + if result.failed > 0 { + msg.push_str(&format!(", {} failed", result.failed)); + } + msg.push_str(&format!(" out of {} total", result.total)); + println!("{}", msg); + } + } + Err(e) => { + eprintln!("Error deleting SBOMs: {}", e); + process::exit(1); + } + } } } }