You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate the code, include the server in a Rust project, then run cargo deny --all-features check which fails due to a security vulnerability in time 0.1.45. The expected result is that there are no security vulnerabilities.
A fix for this situation (indirect dependency through chrono is suggested here: https://rustsec.org/advisories/RUSTSEC-2020-0071
Applied to rust-server this would be the fix which I have tested successfully:
diff --git a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache
index b0df1bc51bf..5d4e393de2f 100644
--- a/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache+++ b/modules/openapi-generator/src/main/resources/rust-server/Cargo.mustache@@ -81,7 +81,7 @@ openssl = {version = "0.10", optional = true }
[dependencies]
# Common
async-trait = "0.1.24"
-chrono = { version = "0.4", features = ["serde"] }+chrono = { version = "0.4", default-features = false, features = ["serde", "clock"] }
futures = "0.3"
swagger = { version = "6.1", features = ["serdejson", "server", "client", "tls", "tcp"] }
log = "0.4.0"
I can provide a pull request if desirable.
The text was updated successfully, but these errors were encountered:
Bug Report Checklist
Description
The
rust-server
generator has an indirect dependency on thetime
crate in version 0.1 which is affected by this vulnerability: https://rustsec.org/advisories/RUSTSEC-2020-0071This is the dependency tree:
openapi-generator version
6.6.0, but I have verified that the issue persists with the
Cargo.mustache
from the current main branchOpenAPI declaration file content or url
The dependency is hard-coded in
Cargo.mustache
and thus any specification will reproduce the issue.Generation Details
Generation is done in a script along the following lines
Steps to reproduce
Generate the code, include the server in a Rust project, then run
cargo deny --all-features check
which fails due to a security vulnerability intime
0.1.45. The expected result is that there are no security vulnerabilities.Related issues/PRs
I haven't found any but have reported a similar issue here: Metaswitch/swagger-rs#169
Suggest a fix
A fix for this situation (indirect dependency through
chrono
is suggested here: https://rustsec.org/advisories/RUSTSEC-2020-0071Applied to
rust-server
this would be the fix which I have tested successfully:I can provide a pull request if desirable.
The text was updated successfully, but these errors were encountered: