Skip to content

Commit

Permalink
Merge pull request #590 from jbpaux/fix/rustsec
Browse files Browse the repository at this point in the history
Update env_logger and clap to fix RUSTSEC-2021-0145
  • Loading branch information
diconico07 authored May 25, 2023
2 parents 1d8189b + 7eb7fd7 commit b2e069d
Show file tree
Hide file tree
Showing 18 changed files with 279 additions and 127 deletions.
319 changes: 234 additions & 85 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions agent/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>", "<[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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
4 changes: 2 additions & 2 deletions controller/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "controller"
version = "0.10.6"
version = "0.10.7"
authors = ["<[email protected]>", "<[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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
4 changes: 2 additions & 2 deletions deployment/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.10.6
version: 0.10.7

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 0.10.6
appVersion: 0.10.7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "debug-echo-discovery-handler"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions discovery-handler-modules/onvif-discovery-handler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "onvif-discovery-handler"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions discovery-handler-modules/opcua-discovery-handler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "opcua-discovery-handler"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions discovery-handler-modules/udev-discovery-handler/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-discovery-handler"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions discovery-handlers/debug-echo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-debug-echo"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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
4 changes: 2 additions & 2 deletions discovery-handlers/onvif/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-onvif"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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
4 changes: 2 additions & 2 deletions discovery-handlers/opcua/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-opcua"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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
4 changes: 2 additions & 2 deletions discovery-handlers/udev/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-udev"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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 discovery-utils/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-discovery-utils"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand Down
4 changes: 2 additions & 2 deletions samples/brokers/udev-video-broker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "udev-video-broker"
version = "0.10.6"
version = "0.10.7"
authors = ["Kate Goldenring <[email protected]>", "<[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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
4 changes: 2 additions & 2 deletions shared/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "akri-shared"
version = "0.10.6"
version = "0.10.7"
authors = ["<[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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 version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.6
0.10.7
4 changes: 2 additions & 2 deletions webhooks/validating/configuration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "webhook-configuration"
version = "0.10.6"
version = "0.10.7"
authors = ["DazWilkin <[email protected]>"]
edition = "2018"
rust-version = "1.68.1"
Expand All @@ -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 b2e069d

Please sign in to comment.