diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 0000000000000..805aa65f9a06d --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,25 @@ +name: Security audit +on: + pull_request: + paths: + - '**/Cargo.toml' + - '**/Cargo.lock' + push: + branches: + - main + +env: + RUST_BACKTRACE: 1 + CARGO_TERM_COLOR: always + CLICOLOR: 1 + +jobs: + security_audit: + runs-on: ubuntu-latest + # Prevent sudden announcement of a new advisory from failing ci: + continue-on-error: true + steps: + - uses: actions/checkout@v3 + - uses: rustsec/audit-check@v1.4.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/Cargo.lock b/Cargo.lock index c6378ddedb9fa..84a95ff72d91c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -568,20 +568,17 @@ checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ "android-tzdata", "iana-time-zone", - "js-sys", "num-traits", "pure-rust-locales", "serde", - "time 0.1.45", - "wasm-bindgen", "winapi", ] [[package]] name = "chrono-humanize" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32dce1ea1988dbdf9f9815ff11425828523bd2a134ec0805d2ac8af26ee6096e" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" dependencies = [ "chrono", ] @@ -1087,9 +1084,9 @@ dependencies = [ [[package]] name = "dtparse" -version = "1.5.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68235de3c014ade82e550337b2c88a2a884361793ed3be2d74ee703bd810e401" +checksum = "458c7cfe1c34b1ef7c2c435076064711050aedabae9952a261687c500f80e839" dependencies = [ "chrono", "lazy_static", @@ -1490,7 +1487,7 @@ dependencies = [ "cfg-if", "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "wasm-bindgen", ] @@ -2407,7 +2404,7 @@ checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", "log", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] @@ -2603,7 +2600,7 @@ dependencies = [ "signal-hook", "simplelog", "tempfile", - "time 0.3.22", + "time", "winresource", ] @@ -4679,7 +4676,7 @@ checksum = "970538704756fd0bb4ec8cb89f80674afb661e7c0fe716f9ba5be57717742300" dependencies = [ "const_format", "is_debug", - "time 0.3.22", + "time", ] [[package]] @@ -4760,7 +4757,7 @@ checksum = "acee08041c5de3d5048c8b3f6f13fafb3026b24ba43c6a695a0c76179b844369" dependencies = [ "log", "termcolor", - "time 0.3.22", + "time", ] [[package]] @@ -5157,17 +5154,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.22" @@ -5612,12 +5598,6 @@ 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" diff --git a/crates/nu-command/Cargo.toml b/crates/nu-command/Cargo.toml index 4583a9a6c3a1f..784bc70965acd 100644 --- a/crates/nu-command/Cargo.toml +++ b/crates/nu-command/Cargo.toml @@ -34,13 +34,13 @@ byteorder = "1.4" bytesize = "1.2" calamine = "0.21" chrono = { version = "0.4", features = ["std", "unstable-locales"], default-features = false } -chrono-humanize = "0.2" +chrono-humanize = "0.2.3" chrono-tz = "0.8" crossterm = "0.26" csv = "1.2" dialoguer = { default-features = false, features = ["fuzzy-select"], version = "0.10" } digest = { default-features = false, version = "0.10" } -dtparse = "1.5" +dtparse = "2.0" encoding_rs = "0.8" fancy-regex = "0.11" filesize = "0.2" diff --git a/crates/nu-system/Cargo.toml b/crates/nu-system/Cargo.toml index ee81a2ce163fb..dbae7384cbae7 100644 --- a/crates/nu-system/Cargo.toml +++ b/crates/nu-system/Cargo.toml @@ -28,7 +28,7 @@ libproc = "0.14" mach2 = "0.4" [target.'cfg(target_os = "windows")'.dependencies] -chrono = "0.4" +chrono = { version = "0.4", default-features = false } ntapi = "0.4" once_cell = "1.18" winapi = { version = "0.3", features = [