Skip to content

Commit

Permalink
Update env_logger and clap to fix RUSTSEC-2021-0145
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Benoit Paux <9682558+jbpaux@users.noreply.github.com>
  • Loading branch information
jbpaux committed Apr 22, 2023
1 parent 629bb54 commit 30b36b7
Show file tree
Hide file tree
Showing 15 changed files with 248 additions and 96 deletions.
291 changes: 220 additions & 71 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ async-trait = "0.1.0"
blake2 = "0.9.0"
chrono = "0.4.10"
cfg-if = "1.0.0"
env_logger = "0.9.0"
env_logger = "0.10.0"
futures = { version = "0.3.1", package = "futures" }
futures-core = "0.3"
futures-util = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion controller/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ akri-shared = { path = "../shared" }
async-std = "1.5.0"
async-trait = "0.1.0"
chrono = "0.4.10"
env_logger = "0.9.0"
env_logger = "0.10.0"
futures = "0.3.1"
anyhow = "1.0.38"
kube = { version = "0.80.0", features = ["derive"] }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ rust-version = "1.68.1"
[dependencies]
akri-discovery-utils = { path = "../../discovery-utils" }
akri-debug-echo = { path = "../../discovery-handlers/debug-echo" }
env_logger = "0.9.0"
env_logger = "0.10.0"
log = "0.4"
tokio = { version = "1.0.1" }
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ rust-version = "1.68.1"
[dependencies]
akri-discovery-utils = { path = "../../discovery-utils" }
akri-onvif = { path = "../../discovery-handlers/onvif" }
env_logger = "0.9.0"
env_logger = "0.10.0"
log = "0.4"
tokio = { version = "1.0.1" }
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ rust-version = "1.68.1"
[dependencies]
akri-discovery-utils = { path = "../../discovery-utils" }
akri-opcua = { path = "../../discovery-handlers/opcua" }
env_logger = "0.9.0"
env_logger = "0.10.0"
log = "0.4"
tokio = { version = "1.0.1" }
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ rust-version = "1.68.1"
[dependencies]
akri-discovery-utils = { path = "../../discovery-utils" }
akri-udev = { path = "../../discovery-handlers/udev" }
env_logger = "0.9.0"
env_logger = "0.10.0"
log = "0.4"
tokio = { version = "1.0.1" }
2 changes: 1 addition & 1 deletion discovery-handlers/debug-echo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rust-version = "1.68.1"
akri-discovery-utils = { path = "../../discovery-utils" }
anyhow = "1.0.38"
async-trait = "0.1.0"
env_logger = "0.9.0"
env_logger = "0.10.0"
futures-util = "0.3"
log = "0.4"
serde = "1.0.104"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ akri-shared = { path = "../../shared" }
anyhow = "1.0.38"
async-trait = "0.1.0"
bytes = "1.0.1"
env_logger = "0.9.0"
env_logger = "0.10.0"
futures-util = "0.3"
hyper = { version = "0.14.11", package = "hyper" }
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/opcua/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ akri-discovery-utils = { path = "../../discovery-utils" }
akri-shared = { path = "../../shared" }
anyhow = "1.0.38"
async-trait = "0.1.0"
env_logger = "0.9.0"
env_logger = "0.10.0"
futures-util = "0.3"
log = "0.4"
opcua = { version = "0.11.0", features = ["client"] }
Expand Down
2 changes: 1 addition & 1 deletion discovery-handlers/udev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ rust-version = "1.68.1"
akri-discovery-utils = { path = "../../discovery-utils" }
anyhow = "1.0.38"
async-trait = "0.1.0"
env_logger = "0.9.0"
env_logger = "0.10.0"
futures-util = "0.3"
log = "0.4"
pest = "2.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/brokers/udev-video-broker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ rust-version = "1.68.1"

[dependencies]
akri-shared = { path = "../../../shared" }
env_logger = "0.9.0"
env_logger = "0.10.0"
lazy_static = "1.4"
log = "0.4.3"
prometheus = { version = "0.12.0", features = ["process"] }
Expand Down
2 changes: 1 addition & 1 deletion shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ either = '*'
anyhow = "1.0.38"
futures = "0.3.1"
futures-util = "0.3"
env_logger = "0.9.0"
env_logger = "0.10.0"
hyper = { version = "0.14.2", package = "hyper" }
kube = { version = "0.80.0", features = ["derive"] }
kube-runtime = "0.80.0"
Expand Down
2 changes: 1 addition & 1 deletion webhooks/validating/configuration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ actix = "0.12.0"
actix-web = { version = "3.3.2", features = ["openssl"] }
actix-rt = "2.2.0"
akri-shared = { path = "../../../shared" }
clap = "3.2.20"
clap = "4.2.2"
kube = { version = "0.80.0", features = ["derive"] }
kube-runtime = "0.80.0"
k8s-openapi = { version = "0.17.0", default-features = false, features = ["schemars", "v1_23"] }
Expand Down
27 changes: 15 additions & 12 deletions webhooks/validating/configuration/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,37 +198,40 @@ async fn validate(rqst: web::Json<AdmissionReview>) -> impl Responder {

#[actix_web::main]
async fn main() -> std::io::Result<()> {
let matches = clap::App::new("Akri Webhook")
let matches = clap::Command::new("Akri Webhook")
.arg(
Arg::with_name("crt_file")
Arg::new("crt_file")
.long("tls-crt-file")
.takes_value(true)
.required(true)
.help("TLS certificate file"),
)
.arg(
Arg::with_name("key_file")
Arg::new("key_file")
.long("tls-key-file")
.takes_value(true)
.required(true)
.help("TLS private key file"),
)
.arg(
Arg::with_name("port")
Arg::new("port")
.long("port")
.takes_value(true)
.value_parser(clap::value_parser!(u16))
.default_value("8443")
.required(true)
.help("port"),
)
.get_matches();

let crt_file = matches.value_of("crt_file").expect("TLS certificate file");
let key_file = matches.value_of("key_file").expect("TLS private key file");
let crt_file = matches
.get_one::<String>("crt_file")
.map(|v| v.as_str())
.expect("TLS certificate file");
let key_file = matches
.get_one::<String>("key_file")
.map(|v| v.as_str())
.expect("TLS private key file");

let port = matches
.value_of("port")
.unwrap_or("8443")
.parse::<u16>()
.get_one::<u16>("port")
.expect("valid port [0-65535]");

let endpoint = format!("0.0.0.0:{}", port);
Expand Down

0 comments on commit 30b36b7

Please sign in to comment.