Update some crates to avoid cargo audit errors

As part of this, update clap for app-services examples.
This commit is contained in:
Mark Hammond 2024-03-05 11:14:20 -05:00
Родитель 01a52c7e6d
Коммит 47ef7c8c98
15 изменённых файлов: 137 добавлений и 98 удалений

4
.github/workflows/dependency-check.yaml поставляемый
Просмотреть файл

@ -55,13 +55,11 @@ jobs:
run: |
cargo install cargo-audit
# Explanation for ignored issues:
# * RUSTSEC-2020-0071: `time` has a problem where invocations of `localtime_r` could segfault, our code base doesn't trigger this,
# but time is a transitive dependency for other crates so is difficult to update.
# * RUSTSEC-2018-0006: Uncontrolled recursion in `yaml-rust`, which is included by `clap` v2. `clap` itself already updated to a safe
# version of `yaml-rust`, which will be released in `v3` and additionally,
# reading https://github.com/rustsec/advisory-db/issues/288, this is a false
# positive for clap and based on our dependency tree, we only use `yaml-rust` in `clap`.
cargo audit --ignore RUSTSEC-2020-0071 --ignore RUSTSEC-2018-0006
cargo audit --ignore RUSTSEC-2018-0006
- name: Check for any unrecorded changes in our dependency trees
run: |
cargo metadata --locked > /dev/null

135
Cargo.lock сгенерированный
Просмотреть файл

@ -565,18 +565,17 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.26"
version = "0.4.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"serde",
"time 0.1.44",
"wasm-bindgen",
"winapi",
"windows-targets 0.52.4",
]
[[package]]
@ -1298,7 +1297,7 @@ name = "example-places-autocomplete"
version = "0.1.0"
dependencies = [
"anyhow",
"clap 2.34.0",
"clap 4.2.2",
"find-places-db",
"interrupt-support",
"log",
@ -1356,7 +1355,7 @@ dependencies = [
"anyhow",
"base64",
"chrono",
"clap 2.34.0",
"clap 4.2.2",
"cli-support",
"fxa-client",
"log",
@ -1695,7 +1694,7 @@ dependencies = [
"cfg-if 1.0.0",
"js-sys",
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
"wasm-bindgen",
]
@ -2132,7 +2131,7 @@ dependencies = [
"regex",
"serde",
"serde_json",
"time 0.3.11",
"time",
"url",
"uuid",
]
@ -2180,9 +2179,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "libc"
version = "0.2.147"
version = "0.2.153"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3"
checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd"
[[package]]
name = "libloading"
@ -2465,12 +2464,12 @@ dependencies = [
[[package]]
name = "mio"
version = "0.8.8"
version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
dependencies = [
"libc",
"wasi 0.11.0+wasi-snapshot-preview1",
"wasi",
"windows-sys 0.48.0",
]
@ -3024,7 +3023,7 @@ checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929"
dependencies = [
"cfg-if 1.0.0",
"libc",
"redox_syscall",
"redox_syscall 0.2.13",
"smallvec",
"windows-sys 0.36.1",
]
@ -3504,13 +3503,22 @@ dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "redox_syscall"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
dependencies = [
"bitflags 1.3.2",
]
[[package]]
name = "redox_termios"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8440d8acb4fd3d277125b4bd01a6f38aee8d814b3b5fc09b3f2b825d37d3fe8f"
dependencies = [
"redox_syscall",
"redox_syscall 0.2.13",
]
[[package]]
@ -3520,7 +3528,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
"getrandom",
"redox_syscall",
"redox_syscall 0.2.13",
"thiserror",
]
@ -4228,7 +4236,7 @@ checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"
dependencies = [
"cfg-if 1.0.0",
"fastrand",
"redox_syscall",
"redox_syscall 0.2.13",
"rustix 0.36.7",
"windows-sys 0.42.0",
]
@ -4271,7 +4279,7 @@ checksum = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e"
dependencies = [
"libc",
"numtoa",
"redox_syscall",
"redox_syscall 0.2.13",
"redox_termios",
]
@ -4331,17 +4339,6 @@ dependencies = [
"once_cell",
]
[[package]]
name = "time"
version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
dependencies = [
"libc",
"wasi 0.10.0+wasi-snapshot-preview1",
"winapi",
]
[[package]]
name = "time"
version = "0.3.11"
@ -4920,18 +4917,18 @@ dependencies = [
"try-lock",
]
[[package]]
name = "wasi"
version = "0.10.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
[[package]]
name = "wasite"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
[[package]]
name = "wasm-bindgen"
version = "0.2.81"
@ -5158,11 +5155,12 @@ dependencies = [
[[package]]
name = "whoami"
version = "1.4.0"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c70234412ca409cc04e864e89523cb0fc37f5e1344ebed5a3ebf4192b6b9f68"
checksum = "0fec781d48b41f8163426ed18e8fc2864c12937df9ce54c88ede7bd47270893e"
dependencies = [
"wasm-bindgen",
"redox_syscall 0.4.1",
"wasite",
"web-sys",
]
@ -5212,7 +5210,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
dependencies = [
"windows-targets",
"windows-targets 0.48.0",
]
[[package]]
@ -5249,7 +5247,7 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
dependencies = [
"windows-targets",
"windows-targets 0.48.0",
]
[[package]]
@ -5267,6 +5265,21 @@ dependencies = [
"windows_x86_64_msvc 0.48.0",
]
[[package]]
name = "windows-targets"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b"
dependencies = [
"windows_aarch64_gnullvm 0.52.4",
"windows_aarch64_msvc 0.52.4",
"windows_i686_gnu 0.52.4",
"windows_i686_msvc 0.52.4",
"windows_x86_64_gnu 0.52.4",
"windows_x86_64_gnullvm 0.52.4",
"windows_x86_64_msvc 0.52.4",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.0"
@ -5279,6 +5292,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9"
[[package]]
name = "windows_aarch64_msvc"
version = "0.36.1"
@ -5297,6 +5316,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675"
[[package]]
name = "windows_i686_gnu"
version = "0.36.1"
@ -5315,6 +5340,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
[[package]]
name = "windows_i686_gnu"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3"
[[package]]
name = "windows_i686_msvc"
version = "0.36.1"
@ -5333,6 +5364,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
[[package]]
name = "windows_i686_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02"
[[package]]
name = "windows_x86_64_gnu"
version = "0.36.1"
@ -5351,6 +5388,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.0"
@ -5363,6 +5406,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177"
[[package]]
name = "windows_x86_64_msvc"
version = "0.36.1"
@ -5381,6 +5430,12 @@ version = "0.48.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8"
[[package]]
name = "winreg"
version = "0.10.1"

Просмотреть файл

@ -572,7 +572,6 @@ The following text applies to code linked from these dependencies:
[tempfile](https://github.com/Stebalien/tempfile),
[thiserror-impl](https://github.com/dtolnay/thiserror),
[thiserror](https://github.com/dtolnay/thiserror),
[time](https://github.com/time-rs/time),
[tinyvec](https://github.com/Lokathor/tinyvec),
[tinyvec_macros](https://github.com/Soveu/tinyvec_macros),
[toml](https://github.com/alexcrichton/toml-rs),

Просмотреть файл

@ -47,5 +47,5 @@ glean-build = { path = "../external/glean/glean-core/build" }
[dev-dependencies]
viaduct-reqwest = { path = "../support/viaduct-reqwest" }
env_logger = "0.10"
clap = "2.33.3"
clap = "2.34"
tempfile = "3"

Просмотреть файл

@ -418,7 +418,7 @@ impl NimbusClient {
fn get_installation_date(&self, db: &Database, writer: &mut Writer) -> Result<DateTime<Utc>> {
// we first check our context
if let Some(context_installation_date) = self.app_context.installation_date {
let res = DateTime::<Utc>::from_utc(
let res = DateTime::<Utc>::from_naive_utc_and_offset(
NaiveDateTime::from_timestamp_opt(context_installation_date / 1_000, 0).unwrap(),
Utc,
);

Просмотреть файл

@ -14,7 +14,7 @@ uniffi-bindings = ["client-lib", "dep:uniffi"]
name = "nimbus_fml"
[dependencies]
clap = {version = "2.33.0", features = ["yaml"]}
clap = {version = "2.34.0", features = ["yaml"]}
anyhow = "1.0.44"
serde_json = { version = "1", features = ["preserve_order"] }
serde_yaml = "0.8.21"

Просмотреть файл

@ -18,7 +18,7 @@ anyhow = "1.0"
interrupt-support = { path = "../../components/support/interrupt" }
sql-support = { path = "../../components/support/sql" }
types = { path = "../../components/support/types" }
clap = "2.33"
clap = "4"
tempfile = "3.1"
rand = "0.8"
find-places-db = { path = "../../components/support/find-places-db" }

Просмотреть файл

@ -5,7 +5,6 @@
#![warn(rust_2018_idioms)]
use anyhow::Result;
use clap::value_t;
use places::{PlacesDb, VisitObservation, VisitType};
use sql_support::ConnExt;
use std::io::prelude::*;
@ -728,42 +727,42 @@ mod autocomplete {
}
fn main() -> Result<()> {
let matches = clap::App::new("autocomplete-example")
.arg(clap::Arg::with_name("database_path")
let matches = clap::Command::new("autocomplete-example")
.arg(clap::Arg::new("database_path")
.long("database")
.short("d")
.takes_value(true)
.help("Path to the database (with the *new* schema). Defaults to './new-places.db'"))
.arg(clap::Arg::with_name("import_places")
.short('d')
.default_value("./new-places.db")
.num_args(1)
.help(""))
.arg(clap::Arg::new("import_places")
.long("import-places")
.short("p")
.takes_value(true)
.short('p')
.num_args(1)
.value_name("'auto'|'path/to/places.sqlite'")
.help("Source places db to import from, or 'auto' to import from the largest places.sqlite"))
.arg(clap::Arg::with_name("import_places_remote_weight")
.arg(clap::Arg::new("import_places_remote_weight")
.long("import-places-remote-weight")
.takes_value(true)
.num_args(1)
.value_name("WEIGHT")
.help("Probability (between 0.0 and 1.0, default = 0.1) that a given visit from `places` should \
be considered `remote`. Ignored when --import-places is not passed"))
.arg(clap::Arg::with_name("no_interactive")
.arg(clap::Arg::new("no_interactive")
.long("no-interactive")
.short("x")
.short('x')
.help("Don't run the interactive demo after completion (if you just want to run an \
import and exit, for example)"))
.get_matches();
let db_path = matches
.value_of("database_path")
.unwrap_or("./new-places.db");
let db_path = matches.get_one::<String>("database_path").unwrap();
let api = places::PlacesApi::new(db_path)?;
let mut conn = api.open_connection(places::ConnectionType::ReadWrite)?;
if let Some(import_places_arg) = matches.value_of("import_places") {
if let Some(import_places_arg) = matches.get_one::<String>("import_places") {
let options = ImportPlacesOptions {
remote_probability: value_t!(matches, "import_places_remote_weight", f64)
.unwrap_or(0.1),
remote_probability: *matches
.get_one::<f64>("import_places_remote_weight")
.unwrap_or(&0.1),
};
let import_source = if import_places_arg == "auto" {
log::info!("Automatically locating largest places DB in your profile(s)");
@ -808,7 +807,7 @@ fn main() -> Result<()> {
}
// Close our connection before starting autocomplete.
drop(conn);
if !matches.is_present("no_interactive") {
if !matches.contains_id("no_interactive") {
#[cfg(not(windows))]
{
// Can't use cfg! macro, this module doesn't exist at all on windows

Просмотреть файл

@ -21,7 +21,7 @@ anyhow = "1.0"
prettytable-rs = "0.10"
fxa-client = { path = "../../components/fxa-client" }
chrono = "0.4"
clap = "2.33"
clap = "4"
cli-support = { path = "../cli-support" }
tempfile = "3"
serde_json = "1.0"

Просмотреть файл

@ -378,32 +378,32 @@ fn main() -> Result<()> {
cli_support::init_trace_logging();
viaduct_reqwest::use_reqwest_backend();
let matches = clap::App::new("sync_pass_sql")
let matches = clap::Command::new("sync_pass_sql")
.about("CLI login syncing tool")
.arg(
clap::Arg::with_name("database_path")
.short("d")
clap::Arg::new("database_path")
.short('d')
.long("database")
.default_value("./logins.db")
.value_name("LOGINS_DATABASE")
.takes_value(true)
.num_args(1)
.help("Path to the logins database (default: \"./logins.db\")"),
)
.arg(
clap::Arg::with_name("credential_file")
.short("c")
clap::Arg::new("credential_file")
.short('c')
.long("credentials")
.default_value("./credentials.json")
.value_name("CREDENTIAL_JSON")
.takes_value(true)
.num_args(1)
.help(
"Path to store our cached fxa credentials (defaults to \"./credentials.json\"",
),
)
.get_matches();
let cred_file = matches
.value_of("credential_file")
.unwrap_or("./credentials.json");
let db_path = matches.value_of("database_path").unwrap_or("./logins.db");
let cred_file = matches.get_one::<String>("credential_file").unwrap();
let db_path = matches.get_one::<String>("database_path").unwrap();
log::debug!("credential file: {:?}", cred_file);
log::debug!("db: {:?}", db_path);

Просмотреть файл

@ -515,7 +515,6 @@ The following text applies to code linked from these dependencies:
[tempfile](https://github.com/Stebalien/tempfile),
[thiserror-impl](https://github.com/dtolnay/thiserror),
[thiserror](https://github.com/dtolnay/thiserror),
[time](https://github.com/time-rs/time),
[tinyvec](https://github.com/Lokathor/tinyvec),
[tinyvec_macros](https://github.com/Soveu/tinyvec_macros),
[toml](https://github.com/alexcrichton/toml-rs),
@ -529,9 +528,8 @@ The following text applies to code linked from these dependencies:
[uuid](https://github.com/uuid-rs/uuid),
[vcpkg](https://github.com/mcgoo/vcpkg-rs),
[version_check](https://github.com/SergioBenitez/version_check),
[winapi-x86_64-pc-windows-gnu](https://github.com/retep998/winapi-rs),
[winapi](https://github.com/retep998/winapi-rs),
[windows-sys](https://github.com/microsoft/windows-rs),
[windows-targets](https://github.com/microsoft/windows-rs),
[windows_x86_64_gnu](https://github.com/microsoft/windows-rs),
[windows_x86_64_msvc](https://github.com/microsoft/windows-rs),
[xshell-macros](https://github.com/matklad/xshell),

Просмотреть файл

@ -420,10 +420,6 @@ the details of which are reproduced below.
<name>Apache License 2.0: thiserror-impl</name>
<url>https://github.com/dtolnay/thiserror/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: time</name>
<url>https://github.com/time-rs/time/blob/master/LICENSE-Apache</url>
</license>
<license>
<name>Apache License 2.0: tinyvec</name>
<url>https://github.com/Lokathor/tinyvec/blob/main/LICENSE-ZLIB.md</url>
@ -476,18 +472,14 @@ the details of which are reproduced below.
<name>Apache License 2.0: version_check</name>
<url>https://github.com/SergioBenitez/version_check/blob/master/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: winapi</name>
<url>https://github.com/retep998/winapi-rs/blob/master/LICENSE-MIT</url>
</license>
<license>
<name>Apache License 2.0: winapi-x86_64-pc-windows-gnu</name>
<url>https://github.com/retep998/winapi-rs/blob/0.3/LICENSE-APACHE</url>
</license>
<license>
<name>Apache License 2.0: windows-sys</name>
<url>https://github.com/microsoft/windows-rs/blob/master/license-mit</url>
</license>
<license>
<name>Apache License 2.0: windows-targets</name>
<url>https://github.com/microsoft/windows-rs/blob/master/license-mit</url>
</license>
<license>
<name>Apache License 2.0: windows_x86_64_gnu</name>
<url>https://github.com/microsoft/windows-rs/blob/master/license-mit</url>

Просмотреть файл

@ -557,7 +557,6 @@ The following text applies to code linked from these dependencies:
[tempfile](https://github.com/Stebalien/tempfile),
[thiserror-impl](https://github.com/dtolnay/thiserror),
[thiserror](https://github.com/dtolnay/thiserror),
[time](https://github.com/time-rs/time),
[tinyvec](https://github.com/Lokathor/tinyvec),
[tinyvec_macros](https://github.com/Soveu/tinyvec_macros),
[toml](https://github.com/alexcrichton/toml-rs),

Просмотреть файл

@ -525,7 +525,6 @@ The following text applies to code linked from these dependencies:
[tempfile](https://github.com/Stebalien/tempfile),
[thiserror-impl](https://github.com/dtolnay/thiserror),
[thiserror](https://github.com/dtolnay/thiserror),
[time](https://github.com/time-rs/time),
[tinyvec](https://github.com/Lokathor/tinyvec),
[tinyvec_macros](https://github.com/Soveu/tinyvec_macros),
[toml](https://github.com/alexcrichton/toml-rs),

Просмотреть файл

@ -6,7 +6,7 @@ edition = "2021"
license = "MPL-2.0"
[dependencies]
clap = "2.33"
clap = "2.34"
prost-build = "0.12"
serde = "1"
serde_derive = "1"