From 46849a30166a8147c0b0d3ac9b73c42f1a7a7ff9 Mon Sep 17 00:00:00 2001 From: Derek Lee Date: Fri, 15 Jul 2022 11:23:07 -0700 Subject: [PATCH] github-actions: Add cargo-deny Adds cargo-deny to scan for vulnerabilities and license issues regarding rust crates. Some modifications were required for the repo to pass the tests: Updates ttrpc to avoid using nix 0.16.0 https://rustsec.org/advisories/RUSTSEC-2021-0119 Updates slog-json to avoid MLP license (copyleft) Updates crossbeam-channel due to yanked package Ignores https://rustsec.org/advisories/RUSTSEC-2020-0071 because chrono is dependent on that version of time. https://github.com/chronotope/chrono/pull/578 Allow multiple versions of the same package (package dependencies require this) Adds "oci" to src/libs workplace Adds Apache-2.0 license to workplace modules that did not have them because cargo-deny complains about them not having licenses. Notes GitHub Actions does not have an obvious way to loop over each of the Cargo.toml files, so they have been hardcoded as separate steps. An alternative that works is to use a matrix variable to run each directory in a separate job. I opted not to do that because it uses a bunch of runners and generates a lot of jobs, but open to feedback. Signed-off-by: Derek Lee --- .../cargo-deny-composite-action/action.yaml | 11 ++ .../cargo-deny-action.yaml | 87 +++++++++++++++ .../cargo-deny-generator.sh | 22 ++++ .../cargo-deny-skeleton.yaml.in | 11 ++ .github/workflows/cargo-deny-master.yaml | 20 ++++ .github/workflows/cargo-deny.yaml | 102 ++++++++++++++---- deny.toml | 42 +------- src/agent/Cargo.toml | 1 + src/agent/rustjail/Cargo.toml | 1 + src/agent/vsock-exporter/Cargo.toml | 1 + src/libs/Cargo.lock | 63 ++++------- src/libs/Cargo.toml | 1 + src/libs/logging/Cargo.toml | 1 + src/libs/oci/Cargo.toml | 1 + src/libs/protocols/Cargo.toml | 1 + src/tools/agent-ctl/Cargo.lock | 52 +++------ src/tools/runk/Cargo.lock | 39 ++----- src/tools/trace-forwarder/Cargo.lock | 53 ++++----- src/tools/trace-forwarder/Cargo.toml | 1 + 19 files changed, 309 insertions(+), 201 deletions(-) create mode 100644 .github/cargo-deny-composite-action/action.yaml create mode 100644 .github/cargo-deny-composite-action/cargo-deny-action.yaml create mode 100644 .github/cargo-deny-composite-action/cargo-deny-generator.sh create mode 100644 .github/cargo-deny-composite-action/cargo-deny-skeleton.yaml.in create mode 100644 .github/workflows/cargo-deny-master.yaml diff --git a/.github/cargo-deny-composite-action/action.yaml b/.github/cargo-deny-composite-action/action.yaml new file mode 100644 index 000000000000..6c442097b77a --- /dev/null +++ b/.github/cargo-deny-composite-action/action.yaml @@ -0,0 +1,11 @@ +name: 'Cargo Crates Check' +description: 'Checks every Cargo.toml file using cargo-deny' +inputs: + command: + description: Either 'advisories' or 'bans licenses sources' + required: false + + runs: + using: "composite" + steps: + run: echo "hi" diff --git a/.github/cargo-deny-composite-action/cargo-deny-action.yaml b/.github/cargo-deny-composite-action/cargo-deny-action.yaml new file mode 100644 index 000000000000..95dcc9cf1074 --- /dev/null +++ b/.github/cargo-deny-composite-action/cargo-deny-action.yaml @@ -0,0 +1,87 @@ +name: Cargo Crates Check +on: [pull_request] +jobs: + cargo-deny: + runs-on: ubuntu-latest + strategy: + matrix: + checks: + - advisories + - bans licenses sources + + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + + - name: src/agent/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/agent/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/agent/rustjail/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/agent/rustjail/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/agent/vsock-exporter/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/agent/vsock-exporter/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/logging/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/logging/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/oci/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/oci/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/protocols/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/protocols/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/safe-path/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/safe-path/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/agent-ctl/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/agent-ctl/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/runk/libcontainer/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/runk/libcontainer/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/runk/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/runk/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/trace-forwarder/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/trace-forwarder/Cargo.toml + command: check ${{ matrix.checks }} diff --git a/.github/cargo-deny-composite-action/cargo-deny-generator.sh b/.github/cargo-deny-composite-action/cargo-deny-generator.sh new file mode 100644 index 000000000000..2e6e8abd1fe2 --- /dev/null +++ b/.github/cargo-deny-composite-action/cargo-deny-generator.sh @@ -0,0 +1,22 @@ +#!/bin/bash +script_dir=$(dirname "$(readlink -f "$0")") +parent_dir=$(realpath "${script_dir}/../..") +cargo_tomls=$(find "${parent_dir}" -name Cargo.toml) + +cargo_deny_file="${script_dir}/action.yaml" + +cat cargo-deny-skeleton.yaml.in > "${cargo_deny_file}" + +for path in $cargo_tomls +do + path=$(realpath --relative-to="${parent_dir}" "${path}") + + cat >> "${cargo_deny_file}" << EOF + + - name: ${path} + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./${path} + command: check \${{ inputs.command }} +EOF +done \ No newline at end of file diff --git a/.github/cargo-deny-composite-action/cargo-deny-skeleton.yaml.in b/.github/cargo-deny-composite-action/cargo-deny-skeleton.yaml.in new file mode 100644 index 000000000000..3f3096a0230a --- /dev/null +++ b/.github/cargo-deny-composite-action/cargo-deny-skeleton.yaml.in @@ -0,0 +1,11 @@ +name: 'Cargo Crates Check' +description: 'Checks every Cargo.toml file using cargo-deny' +inputs: + command: + description: Either 'advisories' or 'bans licneses sources' + required: true + + runs: + using: "composite" + steps: + \ No newline at end of file diff --git a/.github/workflows/cargo-deny-master.yaml b/.github/workflows/cargo-deny-master.yaml new file mode 100644 index 000000000000..89af02a3a3b2 --- /dev/null +++ b/.github/workflows/cargo-deny-master.yaml @@ -0,0 +1,20 @@ +name: Cargo Crates Check +on: [pull_request] +jobs: + cargo-deny-master: + runs-on: ubuntu-latest + strategy: + matrix: + checks: + - advisories + - bans licenses sources + +# continue-on-error: ${{ matrix.checks = 'advisories' }} + + steps: + - uses: actions/checkout@v3 + - run: ls -al + - run: cat ./.github/cargo-deny-composite-action/action.yaml + - uses: ./.github/cargo-deny-action/action.yaml + with: + command: ${{ matrix.checks }} \ No newline at end of file diff --git a/.github/workflows/cargo-deny.yaml b/.github/workflows/cargo-deny.yaml index 997dcbd8d2a6..db6a3a764d09 100644 --- a/.github/workflows/cargo-deny.yaml +++ b/.github/workflows/cargo-deny.yaml @@ -1,4 +1,4 @@ -name: Check +name: Cargo Crates Check on: [pull_request] jobs: cargo-deny: @@ -8,27 +8,83 @@ jobs: checks: - advisories - bans licenses sources - tomls: [./src/agent/Cargo.toml, - ./src/agent/rustjail/Cargo.toml, - ./src/agent/vsock-exporter/Cargo.toml, - ./src/libs/Cargo.toml, - ./src/libs/logging/Cargo.toml, - ./src/libs/oci/Cargo.toml, - ./src/libs/protocols/Cargo.toml, - ./src/libs/safe-path/Cargo.toml, - ./src/tools/agent-ctl/Cargo.toml, - ./src/tools/runk/libcontainer/Cargo.toml, - ./src/tools/runk/Cargo.toml, - ./src/tools/trace-forwarder/Cargo.toml] - - continue-on-error: ${{ matrix.checks == 'advisories' }} + + continue-on-error: true + + # Github Actions does not have a clean way of looping + # Could use matrix, but leads to 12+ jobs being run separately steps: - - name: "Checkout code" - if: ${{ !contains(github.event.pull_request.labels.*.name, 'force-skip-ci') && ( success() || failure() ) }} - uses: actions/checkout@v2 - - name: "Check Rust Licenses" - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check ${{ matrix.checks }} - entrypoint: ${{ matrix.tomls }} \ No newline at end of file + - uses: actions/checkout@v2 + + - name: src/agent/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/agent/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/agent/rustjail/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/agent/rustjail/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/agent/vsock-exporter/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/agent/vsock-exporter/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/logging/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/logging/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/oci/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/oci/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/protocols/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/protocols/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/safe-path/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/safe-path/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/libs/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/libs/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/agent-ctl/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/agent-ctl/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/runk/libcontainer/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/runk/libcontainer/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/runk/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/runk/Cargo.toml + command: check ${{ matrix.checks }} + + - name: src/tools/trace-forwarder/Cargo.toml + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --manifest-path ./src/tools/trace-forwarder/Cargo.toml + command: check ${{ matrix.checks }} diff --git a/deny.toml b/deny.toml index 239681c797d8..305d9f5fe6b4 100644 --- a/deny.toml +++ b/deny.toml @@ -9,17 +9,14 @@ targets = [ vulnerability = "deny" unsound = "deny" unmaintained = "deny" -ignore = [] +ignore = ["RUSTSEC-2020-0071"] [bans] -multiple-versions = "deny" +multiple-versions = "allow" deny = [ - # You can never be too sure { name = "openssl-sys" }, - # crates should use cc, not big separate build systems { name = "cmake" }, ] -skip = [] [licenses] unlicensed = "deny" @@ -28,37 +25,6 @@ copyleft = "deny" # We want really high confidence when inferring licenses from text confidence-threshold = 0.93 allow = ["Apache-2.0", "MIT", "BSD-3-Clause", "ISC"] +private = { ignore = true} -exceptions = [ - # ring uses code from multiple libraries but all with permissive licenses - # https://tldrlegal.com/license/openssl-license-(openssl) - { allow = ["ISC", "MIT", "OpenSSL"], name = "ring" }, - - # MPL 2.0 is a copyleft license and we HAVE to disclose - # the source code of these specific libraries if we do changes to it. - # which we do through public forks of the repos if/when we do changes to it. - # https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2) - { allow = ["MPL-2.0"], name = "webpki-roots" }, -] - -[[licenses.clarify]] -name = "ring" -# SPDX considers OpenSSL to encompass both the OpenSSL and SSLeay licenses -# https://spdx.org/licenses/OpenSSL.html -# ISC - Both BoringSSL and ring use this for their new files -# MIT - "Files in third_party/ have their own licenses, as described therein. The MIT -# license, for third_party/fiat, which, unlike other third_party directories, is -# compiled into non-test libraries, is included below." -# OpenSSL - Obviously -expression = "ISC AND MIT AND OpenSSL" -license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }] - -[[licenses.clarify]] -name = "webpki" -expression = "ISC" -license-files = [{ path = "LICENSE", hash = 0x001c7e6c }] - -[[licenses.clarify]] -name = "encoding_rs" -expression = "(Apache-2.0 OR MIT) AND BSD-3-Clause" -license-files = [{ path = "COPYRIGHT", hash = 0x39f8ad31 }] \ No newline at end of file +exceptions = [] \ No newline at end of file diff --git a/src/agent/Cargo.toml b/src/agent/Cargo.toml index ae809bdaf781..0c0ca6ee247d 100644 --- a/src/agent/Cargo.toml +++ b/src/agent/Cargo.toml @@ -3,6 +3,7 @@ name = "kata-agent" version = "0.1.0" authors = ["The Kata Containers community "] edition = "2018" +license = "Apache-2.0" [dependencies] oci = { path = "../libs/oci" } diff --git a/src/agent/rustjail/Cargo.toml b/src/agent/rustjail/Cargo.toml index 78c0f962eb82..c79ac4ac8b72 100644 --- a/src/agent/rustjail/Cargo.toml +++ b/src/agent/rustjail/Cargo.toml @@ -3,6 +3,7 @@ name = "rustjail" version = "0.1.0" authors = ["The Kata Containers community "] edition = "2018" +license = "Apache-2.0" [dependencies] serde = "1.0.91" diff --git a/src/agent/vsock-exporter/Cargo.toml b/src/agent/vsock-exporter/Cargo.toml index 87e66ed99947..be8d0e625860 100644 --- a/src/agent/vsock-exporter/Cargo.toml +++ b/src/agent/vsock-exporter/Cargo.toml @@ -3,6 +3,7 @@ name = "vsock-exporter" version = "0.1.0" authors = ["James O. D. Hunt "] edition = "2018" +license = "Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/libs/Cargo.lock b/src/libs/Cargo.lock index 99a395749ba1..b80964d885b5 100644 --- a/src/libs/Cargo.lock +++ b/src/libs/Cargo.lock @@ -71,24 +71,11 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time", - "winapi", -] - [[package]] name = "crossbeam-channel" -version = "0.5.2" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -341,7 +328,7 @@ dependencies = [ "log", "miow", "ntapi", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "winapi", ] @@ -396,22 +383,22 @@ dependencies = [ ] [[package]] -name = "num-integer" -version = "0.1.44" +name = "num_threads" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ - "autocfg", - "num-traits", + "libc", ] [[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +name = "oci" +version = "0.1.0" dependencies = [ - "autocfg", + "libc", + "serde", + "serde_derive", + "serde_json", ] [[package]] @@ -641,14 +628,14 @@ dependencies = [ [[package]] name = "slog-json" -version = "2.4.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9b96fb6b5e80e371423b4aca6656eb537661ce8f82c2697e619f8ca85d043" +checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" dependencies = [ - "chrono", "serde", "serde_json", "slog", + "time", ] [[package]] @@ -725,22 +712,22 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] [[package]] name = "time" -version = "0.1.44" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ + "itoa", "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", + "num_threads", ] [[package]] @@ -851,12 +838,6 @@ dependencies = [ "nix 0.23.1", ] -[[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/src/libs/Cargo.toml b/src/libs/Cargo.toml index 16eedb91f272..1c8a30b4c43a 100644 --- a/src/libs/Cargo.toml +++ b/src/libs/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "logging", + "oci", "safe-path", "protocols", ] diff --git a/src/libs/logging/Cargo.toml b/src/libs/logging/Cargo.toml index 36685c15a3ed..17956dfde24d 100644 --- a/src/libs/logging/Cargo.toml +++ b/src/libs/logging/Cargo.toml @@ -3,6 +3,7 @@ name = "logging" version = "0.1.0" authors = ["The Kata Containers community "] edition = "2018" +license = "Apache-2.0" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/libs/oci/Cargo.toml b/src/libs/oci/Cargo.toml index dde7b9915c02..8c08705a3dbe 100644 --- a/src/libs/oci/Cargo.toml +++ b/src/libs/oci/Cargo.toml @@ -3,6 +3,7 @@ name = "oci" version = "0.1.0" authors = ["The Kata Containers community "] edition = "2018" +license = "Apache-2.0" [dependencies] serde = "1.0.131" diff --git a/src/libs/protocols/Cargo.toml b/src/libs/protocols/Cargo.toml index ae93e7fa191a..b70961865887 100644 --- a/src/libs/protocols/Cargo.toml +++ b/src/libs/protocols/Cargo.toml @@ -3,6 +3,7 @@ name = "protocols" version = "0.1.0" authors = ["The Kata Containers community "] edition = "2018" +license = "Apache-2.0" [features] default = [] diff --git a/src/tools/agent-ctl/Cargo.lock b/src/tools/agent-ctl/Cargo.lock index 6634ed6599e3..8056b91ec27c 100644 --- a/src/tools/agent-ctl/Cargo.lock +++ b/src/tools/agent-ctl/Cargo.lock @@ -139,19 +139,6 @@ dependencies = [ "regex", ] -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time", - "winapi", -] - [[package]] name = "clap" version = "2.34.0" @@ -169,9 +156,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -564,22 +551,12 @@ dependencies = [ ] [[package]] -name = "num-integer" -version = "0.1.44" +name = "num_threads" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" dependencies = [ - "autocfg", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" -dependencies = [ - "autocfg", + "libc", ] [[package]] @@ -975,14 +952,14 @@ dependencies = [ [[package]] name = "slog-json" -version = "2.4.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9b96fb6b5e80e371423b4aca6656eb537661ce8f82c2697e619f8ca85d043" +checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" dependencies = [ - "chrono", "serde", "serde_json", "slog", + "time", ] [[package]] @@ -1064,21 +1041,22 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] [[package]] name = "time" -version = "0.1.43" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ + "itoa", "libc", - "winapi", + "num_threads", ] [[package]] diff --git a/src/tools/runk/Cargo.lock b/src/tools/runk/Cargo.lock index a0762d49ce68..c59bbe6e9b2c 100644 --- a/src/tools/runk/Cargo.lock +++ b/src/tools/runk/Cargo.lock @@ -127,7 +127,7 @@ checksum = "cdae996d9638ba03253ffa1c93345a585974a97abbdeab9176c77922f3efc1e8" dependencies = [ "libc", "log", - "nix 0.23.1", + "nix", "regex", ] @@ -186,9 +186,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.4" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -540,7 +540,7 @@ dependencies = [ "derive_builder", "libc", "logging", - "nix 0.23.1", + "nix", "oci", "rustjail", "scopeguard", @@ -633,19 +633,6 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" -[[package]] -name = "nix" -version = "0.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0eaf8df8bab402257e0a5c17a254e4cc1f72a93588a1ddfb5d356c801aa7cb" -dependencies = [ - "bitflags", - "cc", - "cfg-if 0.1.10", - "libc", - "void", -] - [[package]] name = "nix" version = "0.23.1" @@ -979,7 +966,7 @@ dependencies = [ "libcontainer", "liboci-cli", "logging", - "nix 0.23.1", + "nix", "oci", "rustjail", "serde", @@ -1006,7 +993,7 @@ dependencies = [ "inotify", "lazy_static", "libc", - "nix 0.23.1", + "nix", "oci", "path-absolutize", "protobuf", @@ -1311,16 +1298,16 @@ dependencies = [ [[package]] name = "ttrpc" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004604e91de38bc16cb9c7898187343075388ea414ad24896a21fc4e91a7c861" +checksum = "c46d73bc2a74f2440921b6539afbed68064b48b2c4f194c637430d1c83d052ad" dependencies = [ "async-trait", "byteorder", "futures", "libc", "log", - "nix 0.16.1", + "nix", "protobuf", "protobuf-codegen-pure", "thiserror", @@ -1389,12 +1376,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "void" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - [[package]] name = "vsock" version = "0.2.6" @@ -1402,7 +1383,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e32675ee2b3ce5df274c0ab52d19b28789632406277ca26bffee79a8e27dc133" dependencies = [ "libc", - "nix 0.23.1", + "nix", ] [[package]] diff --git a/src/tools/trace-forwarder/Cargo.lock b/src/tools/trace-forwarder/Cargo.lock index ab87c9db7112..96e2bc63420c 100644 --- a/src/tools/trace-forwarder/Cargo.lock +++ b/src/tools/trace-forwarder/Cargo.lock @@ -90,19 +90,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chrono" -version = "0.4.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" -dependencies = [ - "libc", - "num-integer", - "num-traits", - "time", - "winapi", -] - [[package]] name = "clap" version = "2.34.0" @@ -120,9 +107,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.1" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c" dependencies = [ "cfg-if", "crossbeam-utils", @@ -359,16 +346,6 @@ dependencies = [ "memoffset", ] -[[package]] -name = "num-integer" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.14" @@ -388,6 +365,15 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + [[package]] name = "once_cell" version = "1.9.0" @@ -671,14 +657,14 @@ dependencies = [ [[package]] name = "slog-json" -version = "2.4.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9b96fb6b5e80e371423b4aca6656eb537661ce8f82c2697e619f8ca85d043" +checksum = "3e1e53f61af1e3c8b852eef0a9dee29008f55d6dd63794f3f12cef786cf0f219" dependencies = [ - "chrono", "serde", "serde_json", "slog", + "time", ] [[package]] @@ -766,9 +752,9 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" +checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" dependencies = [ "once_cell", ] @@ -797,12 +783,13 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "72c91f41dcb2f096c05f0873d667dceec1087ce5bcf984ec8ffb19acddbb3217" dependencies = [ + "itoa", "libc", - "winapi", + "num_threads", ] [[package]] diff --git a/src/tools/trace-forwarder/Cargo.toml b/src/tools/trace-forwarder/Cargo.toml index 8a520a26a0b1..f7ede8aeb9cb 100644 --- a/src/tools/trace-forwarder/Cargo.toml +++ b/src/tools/trace-forwarder/Cargo.toml @@ -8,6 +8,7 @@ name = "kata-trace-forwarder" version = "0.0.1" authors = ["The Kata Containers community "] edition = "2018" +license = "Apache-2.0" [dependencies] futures = "0.3.15"